litex: reorganize things, first work working version
[litex.git] / litex / soc / software / libbase / exception.c
1 void isr(void);
2
3 #ifdef __or1k__
4
5 #define EXTERNAL_IRQ 0x8
6
7 void exception_handler(unsigned long vect, unsigned long *regs,
8 unsigned long pc, unsigned long ea);
9 void exception_handler(unsigned long vect, unsigned long *regs,
10 unsigned long pc, unsigned long ea)
11 {
12 if(vect == EXTERNAL_IRQ) {
13 isr();
14 } else {
15 /* Unhandled exception */
16 for(;;);
17 }
18 }
19 #endif