Rev 1507 | Rev 1621 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 1507 | Rev 1595 | ||
|---|---|---|---|
| Line 44... | Line 44... | ||
| 44 | #include <print.h> |
44 | #include <print.h> |
| 45 | #include <proc/scheduler.h> |
45 | #include <proc/scheduler.h> |
| 46 | #include <ipc/sysipc.h> |
46 | #include <ipc/sysipc.h> |
| 47 | #include <ipc/irq.h> |
47 | #include <ipc/irq.h> |
| 48 | #include <ipc/ipc.h> |
48 | #include <ipc/ipc.h> |
| - | 49 | #include <interrupt.h> |
|
| 49 | 50 | ||
| 50 | 51 | ||
| 51 | #define VECTORS_64_BUNDLE 20 |
52 | #define VECTORS_64_BUNDLE 20 |
| 52 | #define VECTORS_16_BUNDLE 48 |
53 | #define VECTORS_16_BUNDLE 48 |
| 53 | #define VECTORS_16_BUNDLE_START 0x5000 |
54 | #define VECTORS_16_BUNDLE_START 0x5000 |
| Line 148... | Line 149... | ||
| 148 | 149 | ||
| 149 | void general_exception(__u64 vector, istate_t *istate) |
150 | void general_exception(__u64 vector, istate_t *istate) |
| 150 | { |
151 | { |
| 151 | char *desc = ""; |
152 | char *desc = ""; |
| 152 | 153 | ||
| 153 | dump_interrupted_context(istate); |
- | |
| 154 | - | ||
| 155 | switch (istate->cr_isr.ge_code) { |
154 | switch (istate->cr_isr.ge_code) { |
| 156 | case GE_ILLEGALOP: |
155 | case GE_ILLEGALOP: |
| 157 | desc = "Illegal Operation fault"; |
156 | desc = "Illegal Operation fault"; |
| 158 | break; |
157 | break; |
| 159 | case GE_PRIVOP: |
158 | case GE_PRIVOP: |
| Line 174... | Line 173... | ||
| 174 | default: |
173 | default: |
| 175 | desc = "unknown"; |
174 | desc = "unknown"; |
| 176 | break; |
175 | break; |
| 177 | } |
176 | } |
| 178 | 177 | ||
| - | 178 | fault_if_from_uspace(istate, "General Exception (%s)", desc); |
|
| - | 179 | ||
| - | 180 | dump_interrupted_context(istate); |
|
| 179 | panic("General Exception (%s)\n", desc); |
181 | panic("General Exception (%s)\n", desc); |
| 180 | } |
182 | } |
| 181 | 183 | ||
| 182 | void fpu_enable(void); |
184 | void fpu_enable(void); |
| 183 | 185 | ||
| 184 | void disabled_fp_register(__u64 vector, istate_t *istate) |
186 | void disabled_fp_register(__u64 vector, istate_t *istate) |
| 185 | { |
187 | { |
| 186 | #ifdef CONFIG_FPU_LAZY |
188 | #ifdef CONFIG_FPU_LAZY |
| 187 | scheduler_fpu_lazy_request(); |
189 | scheduler_fpu_lazy_request(); |
| 188 | #else |
190 | #else |
| - | 191 | fault_if_from_uspace(istate, "Interruption: %#hx (%s)", (__u16) vector, vector_to_string(vector)); |
|
| 189 | dump_interrupted_context(istate); |
192 | dump_interrupted_context(istate); |
| 190 | panic("Interruption: %#hx (%s)\n", (__u16) vector, vector_to_string(vector)); |
193 | panic("Interruption: %#hx (%s)\n", (__u16) vector, vector_to_string(vector)); |
| 191 | #endif |
194 | #endif |
| 192 | } |
195 | } |
| 193 | 196 | ||
| Line 265... | Line 268... | ||
| 265 | return; |
268 | return; |
| 266 | } |
269 | } |
| 267 | panic("not implemented\n"); |
270 | panic("not implemented\n"); |
| 268 | /* TODO */ |
271 | /* TODO */ |
| 269 | } |
272 | } |
| 270 | - | ||
| 271 | - | ||
| 272 | - | ||