Rev 501 | Rev 532 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 501 | Rev 509 | ||
---|---|---|---|
Line 33... | Line 33... | ||
33 | #include <time/clock.h> |
33 | #include <time/clock.h> |
34 | #include <panic.h> |
34 | #include <panic.h> |
35 | #include <print.h> |
35 | #include <print.h> |
36 | #include <symtab.h> |
36 | #include <symtab.h> |
37 | #include <arch/drivers/arc.h> |
37 | #include <arch/drivers/arc.h> |
- | 38 | #include <arch/drivers/keyboard.h> |
|
38 | 39 | ||
39 | static void print_regdump(struct exception_regdump *pstate) |
40 | static void print_regdump(struct exception_regdump *pstate) |
40 | { |
41 | { |
41 | char *pcsymbol = ""; |
42 | char *pcsymbol = ""; |
42 | char *rasymbol = ""; |
43 | char *rasymbol = ""; |
Line 108... | Line 109... | ||
108 | break; |
109 | break; |
109 | case 1: /* SW1 - Software interrupt 1 */ |
110 | case 1: /* SW1 - Software interrupt 1 */ |
110 | cp0_cause_write(cp0_cause_read() & ~(1 << 9)); /* clear SW1 interrupt */ |
111 | cp0_cause_write(cp0_cause_read() & ~(1 << 9)); /* clear SW1 interrupt */ |
111 | break; |
112 | break; |
112 | case 2: /* IRQ0 */ |
113 | case 2: /* IRQ0 */ |
113 | case 3: /* IRQ1 */ |
114 | case KEYBOARD_IRQ: |
- | 115 | keyboard(); |
|
- | 116 | break; |
|
114 | case 4: /* IRQ2 */ |
117 | case 4: /* IRQ2 */ |
115 | case 5: /* IRQ3 */ |
118 | case 5: /* IRQ3 */ |
116 | case 6: /* IRQ4 */ |
119 | case 6: /* IRQ4 */ |
117 | default: |
120 | default: |
118 | print_regdump(pstate); |
121 | print_regdump(pstate); |
119 | panic("unhandled interrupt %d\n", i); |
122 | panic("unhandled interrupt %d\n", i); |
120 | break; |
123 | break; |
121 | case TIMER_INTERRUPT: |
124 | case TIMER_IRQ: |
122 | /* clear timer interrupt & set new */ |
125 | /* clear timer interrupt & set new */ |
123 | cp0_compare_write(cp0_count_read() + cp0_compare_value); |
126 | cp0_compare_write(cp0_count_read() + cp0_compare_value); |
124 | clock(); |
127 | clock(); |
125 | break; |
128 | break; |
126 | } |
129 | } |