Rev 2274 | Rev 2282 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2274 | Rev 2277 | ||
---|---|---|---|
Line 37... | Line 37... | ||
37 | #include <arch/debug_print/print.h> |
37 | #include <arch/debug_print/print.h> |
38 | #include <arch/memstr.h> |
38 | #include <arch/memstr.h> |
39 | #include <arch/regutils.h> |
39 | #include <arch/regutils.h> |
40 | #include <interrupt.h> |
40 | #include <interrupt.h> |
41 | #include <arch/drivers/gxemul.h> |
41 | #include <arch/drivers/gxemul.h> |
- | 42 | #include <arch/mm/page.h> |
|
42 | 43 | ||
43 | #define PREFETCH_OFFSET 0x8 |
44 | #define PREFETCH_OFFSET 0x8 |
44 | #define BRANCH_OPCODE 0xea000000 |
45 | #define BRANCH_OPCODE 0xea000000 |
45 | #define LDR_OPCODE 0xe59ff000 |
46 | #define LDR_OPCODE 0xe59ff000 |
46 | #define VALID_BRANCH_MASK 0xff000000 |
47 | #define VALID_BRANCH_MASK 0xff000000 |
Line 135... | Line 136... | ||
135 | { |
136 | { |
136 | asm("sub lr, lr, #4"); |
137 | asm("sub lr, lr, #4"); |
137 | PROCESS_EXCEPTION(EXC_IRQ); |
138 | PROCESS_EXCEPTION(EXC_IRQ); |
138 | } |
139 | } |
139 | 140 | ||
140 | static void prefetch_abort_exception(int exc_no, istate_t* istate) |
- | |
141 | { |
- | |
142 | //aux_puts("(PREFETCH|DATA) ABORT exception caught, not processed.\n"); |
- | |
143 | } |
- | |
144 | - | ||
145 | 141 | ||
146 | /** Interrupt Exception handler. |
142 | /** Interrupt Exception handler. |
147 | * Determines the sources of interrupt, and calls their handlers. |
143 | * Determines the sources of interrupt, and calls their handlers. |
148 | */ |
144 | */ |
149 | static void irq_exception(int exc_no, istate_t* istate) |
145 | static void irq_exception(int exc_no, istate_t* istate) |
Line 243... | Line 239... | ||
243 | #endif |
239 | #endif |
244 | 240 | ||
245 | install_exception_handlers(); |
241 | install_exception_handlers(); |
246 | 242 | ||
247 | exc_register(EXC_IRQ, "interrupt", (iroutine) irq_exception); |
243 | exc_register(EXC_IRQ, "interrupt", (iroutine) irq_exception); |
248 | exc_register(EXC_PREFETCH_ABORT, "prefetch abort", (iroutine) prefetch_abort_exception); |
244 | exc_register(EXC_PREFETCH_ABORT, "prefetch abort", (iroutine) prefetch_abort); |
249 | exc_register(EXC_DATA_ABORT, "data abort", (iroutine) prefetch_abort_exception); |
245 | exc_register(EXC_DATA_ABORT, "data abort", (iroutine) data_abort); |
250 | /* TODO add next */ |
246 | /* TODO add next */ |
251 | } |
247 | } |
252 | 248 | ||
253 | /* TODO change soon, temporary hack. */ |
249 | /* TODO change soon, temporary hack. */ |
254 | void setup_exception_stacks() |
250 | void setup_exception_stacks() |