Changeset e41c47e in mainline
- Timestamp:
- 2005-07-15T20:27:46Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 76cec1e
- Parents:
- 568337b
- Location:
- arch/mips
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/mips/include/exception.h
r568337b re41c47e 31 31 32 32 #define EXC_Int 0 33 #define EXC_M OD133 #define EXC_Mod 1 34 34 #define EXC_TLBL 2 35 35 #define EXC_TLBS 3 -
arch/mips/src/asm.s
r568337b re41c47e 68 68 .global cp0_status_write 69 69 .global cp0_cause_read 70 .global cp0_cause_write 70 71 .global cp0_epc_read 71 72 .global cp0_epc_write … … 107 108 108 109 cp0_cause_read: cp0_read $13 110 cp0_cause_write: cp0_write $13 109 111 110 112 cp0_epc_read: cp0_read $14 -
arch/mips/src/interrupt.c
r568337b re41c47e 62 62 { 63 63 __u32 cause; 64 65 64 int i; 65 66 66 /* decode interrupt number and process the interrupt */ 67 cause = (cp0_cause_read()>>8)&0xff; 68 69 for (i=0; i<8; i++) { 70 if (cause & (1<<i)) { 71 switch (i) { 72 case 0x0: 73 case 0x1: 74 case 0x2: 75 case 0x3: 76 case 0x4: 77 case 0x5: 78 case 0x6: panic("unhandled interrupt %d\n", i); break; 79 case 0x7: 80 /* clear timer interrupt */ 81 cp0_compare_write(cp0_compare_value); 67 cause = (cp0_cause_read() >> 8) &0xff; 68 69 for (i = 0; i < 8; i++) { 70 if (cause & (1 << i)) { 71 switch (i) { 72 case 0: /* SW0 - Software interrupt 0 */ 73 cp0_cause_write(cause & ~(1 << 8)); /* clear SW0 interrupt */ 74 break; 75 case 1: /* SW1 - Software interrupt 1 */ 76 cp0_cause_write(cause & ~(1 << 9)); /* clear SW1 interrupt */ 77 break; 78 case 2: /* IRQ0 */ 79 case 3: /* IRQ1 */ 80 case 4: /* IRQ2 */ 81 case 5: /* IRQ3 */ 82 case 6: /* IRQ4 */ 83 panic("unhandled interrupt %d\n", i); 84 break; 85 case 7: /* Timer Interrupt */ 86 cp0_compare_write(cp0_compare_value); /* clear timer interrupt */ 82 87 /* start counting over again */ 83 84 85 86 87 88 88 cp0_count_write(0); 89 clock(); 90 break; 91 } 92 } 93 } 89 94 90 95 }
Note:
See TracChangeset
for help on using the changeset viewer.