Rev 3788 | Rev 3906 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3788 | Rev 3790 | ||
---|---|---|---|
Line 86... | Line 86... | ||
86 | printf("PC: %#x(%s) RA: %#x(%s), SP(%p)\n", istate->epc, pcsymbol, istate->ra, rasymbol, istate->sp); |
86 | printf("PC: %#x(%s) RA: %#x(%s), SP(%p)\n", istate->epc, pcsymbol, istate->ra, rasymbol, istate->sp); |
87 | } |
87 | } |
88 | 88 | ||
89 | static void unhandled_exception(int n, istate_t *istate) |
89 | static void unhandled_exception(int n, istate_t *istate) |
90 | { |
90 | { |
91 | fault_if_from_uspace(istate, "Unhandled exception %s", exctable[n]); |
91 | fault_if_from_uspace(istate, "Unhandled exception %s.", exctable[n]); |
92 | 92 | ||
93 | print_regdump(istate); |
93 | print_regdump(istate); |
94 | panic("Unhandled exception %s.\n", exctable[n]); |
94 | panic("Unhandled exception %s.", exctable[n]); |
95 | } |
95 | } |
96 | 96 | ||
97 | static void reserved_instr_exception(int n, istate_t *istate) |
97 | static void reserved_instr_exception(int n, istate_t *istate) |
98 | { |
98 | { |
99 | if (*((uint32_t *)istate->epc) == 0x7c03e83b) { |
99 | if (*((uint32_t *)istate->epc) == 0x7c03e83b) { |
Line 130... | Line 130... | ||
130 | static void cpuns_exception(int n, istate_t *istate) |
130 | static void cpuns_exception(int n, istate_t *istate) |
131 | { |
131 | { |
132 | if (cp0_cause_coperr(cp0_cause_read()) == fpu_cop_id) |
132 | if (cp0_cause_coperr(cp0_cause_read()) == fpu_cop_id) |
133 | scheduler_fpu_lazy_request(); |
133 | scheduler_fpu_lazy_request(); |
134 | else { |
134 | else { |
135 | fault_if_from_uspace(istate, "Unhandled Coprocessor Unusable Exception"); |
135 | fault_if_from_uspace(istate, "Unhandled Coprocessor Unusable Exception."); |
136 | panic("Unhandled Coprocessor Unusable Exception.\n"); |
136 | panic("Unhandled Coprocessor Unusable Exception."); |
137 | } |
137 | } |
138 | } |
138 | } |
139 | #endif |
139 | #endif |
140 | 140 | ||
141 | static void interrupt_exception(int n, istate_t *istate) |
141 | static void interrupt_exception(int n, istate_t *istate) |
Line 168... | Line 168... | ||
168 | } |
168 | } |
169 | 169 | ||
170 | /** Handle syscall userspace call */ |
170 | /** Handle syscall userspace call */ |
171 | static void syscall_exception(int n, istate_t *istate) |
171 | static void syscall_exception(int n, istate_t *istate) |
172 | { |
172 | { |
173 | panic("Syscall is handled through shortcut"); |
173 | panic("Syscall is handled through shortcut."); |
174 | } |
174 | } |
175 | 175 | ||
176 | void exception_init(void) |
176 | void exception_init(void) |
177 | { |
177 | { |
178 | int i; |
178 | int i; |