Rev 2787 | Rev 3424 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2787 | Rev 3116 | ||
---|---|---|---|
Line 94... | Line 94... | ||
94 | { |
94 | { |
95 | clock(); |
95 | clock(); |
96 | start_decrementer(); |
96 | start_decrementer(); |
97 | } |
97 | } |
98 | 98 | ||
- | 99 | static void exception_program_trap(istate_t *istate) |
|
- | 100 | { |
|
- | 101 | if (istate_from_uspace(istate)) |
|
- | 102 | udebug_breakpoint_event(0); |
|
- | 103 | else |
|
- | 104 | panic("Program trap exception."); |
|
- | 105 | } |
|
- | 106 | ||
- | 107 | static void exception_program(int n, istate_t *istate) |
|
- | 108 | { |
|
- | 109 | if ((istate->srr1 & SRR1_TRAP_EXC) != 0) { |
|
- | 110 | exception_program_trap(istate); |
|
- | 111 | } else { |
|
- | 112 | fault_if_from_uspace(istate, "Unhandled program exception."); |
|
- | 113 | panic("Unhandled program exception."); |
|
- | 114 | } |
|
- | 115 | } |
|
99 | 116 | ||
100 | /* Initialize basic tables for exception dispatching */ |
117 | /* Initialize basic tables for exception dispatching */ |
101 | void interrupt_init(void) |
118 | void interrupt_init(void) |
102 | { |
119 | { |
103 | exc_register(VECTOR_DATA_STORAGE, "data_storage", pht_refill); |
120 | exc_register(VECTOR_DATA_STORAGE, "data_storage", pht_refill); |
104 | exc_register(VECTOR_INSTRUCTION_STORAGE, "instruction_storage", pht_refill); |
121 | exc_register(VECTOR_INSTRUCTION_STORAGE, "instruction_storage", pht_refill); |
105 | exc_register(VECTOR_EXTERNAL, "external", exception_external); |
122 | exc_register(VECTOR_EXTERNAL, "external", exception_external); |
106 | exc_register(VECTOR_DECREMENTER, "timer", exception_decrementer); |
123 | exc_register(VECTOR_DECREMENTER, "timer", exception_decrementer); |
- | 124 | exc_register(VECTOR_PROGRAM, "program", exception_program); |
|
107 | } |
125 | } |
108 | 126 | ||
109 | /** @} |
127 | /** @} |
110 | */ |
128 | */ |