Changes in kernel/arch/ppc32/src/interrupt.c [d99c1d2:22a28a69] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ppc32/src/interrupt.c
rd99c1d2 r22a28a69 44 44 #include <print.h> 45 45 46 47 46 void start_decrementer(void) 48 47 { 49 48 asm volatile ( 50 "mtdec %0\n" 51 : 52 : "r" (1000) 49 "mtdec %[dec]\n" 50 :: [dec] "r" (1000) 53 51 ); 54 52 } 55 53 54 void istate_decode(istate_t *istate) 55 { 56 printf("r0 =%p\tr1 =%p\tr2 =%p\n", istate->r0, istate->sp, istate->r2); 57 printf("r3 =%p\tr4 =%p\tr5 =%p\n", istate->r3, istate->r4, istate->r5); 58 printf("r6 =%p\tr7 =%p\tr8 =%p\n", istate->r6, istate->r7, istate->r8); 59 printf("r9 =%p\tr10=%p\tr11=%p\n", 60 istate->r9, istate->r10, istate->r11); 61 printf("r12=%p\tr13=%p\tr14=%p\n", 62 istate->r12, istate->r13, istate->r14); 63 printf("r15=%p\tr16=%p\tr17=%p\n", 64 istate->r15, istate->r16, istate->r17); 65 printf("r18=%p\tr19=%p\tr20=%p\n", 66 istate->r18, istate->r19, istate->r20); 67 printf("r21=%p\tr22=%p\tr23=%p\n", 68 istate->r21, istate->r22, istate->r23); 69 printf("r24=%p\tr25=%p\tr26=%p\n", 70 istate->r24, istate->r25, istate->r26); 71 printf("r27=%p\tr28=%p\tr29=%p\n", 72 istate->r27, istate->r28, istate->r29); 73 printf("r30=%p\tr31=%p\n", istate->r30, istate->r31); 74 printf("cr =%p\tpc =%p\tlr =%p\n", istate->cr, istate->pc, istate->lr); 75 printf("ctr=%p\txer=%p\tdar=%p\n", 76 istate->ctr, istate->xer, istate->dar); 77 printf("srr1=%p\n", istate->srr1); 78 } 56 79 57 /** Handler of external interrupts */ 58 static void exception_external(int n, istate_t *istate) 80 /** External interrupts handler 81 * 82 */ 83 static void exception_external(unsigned int n, istate_t *istate) 59 84 { 60 int inum;85 uint8_t inum; 61 86 62 while ((inum = pic_get_pending()) != -1) {87 while ((inum = pic_get_pending()) != 255) { 63 88 irq_t *irq = irq_dispatch_and_lock(inum); 64 89 if (irq) { … … 80 105 } 81 106 82 spinlock_unlock(&irq->lock);107 irq_spinlock_unlock(&irq->lock, false); 83 108 } else { 84 109 /* … … 86 111 */ 87 112 #ifdef CONFIG_DEBUG 88 printf("cpu%u: spurious interrupt (inum=%d)\n", CPU->id, inum); 113 printf("cpu%" PRIs ": spurious interrupt (inum=%" PRIu8 ")\n", 114 CPU->id, inum); 89 115 #endif 90 116 } … … 92 118 } 93 119 94 95 static void exception_decrementer(int n, istate_t *istate) 120 static void exception_decrementer(unsigned int n, istate_t *istate) 96 121 { 97 122 start_decrementer(); … … 99 124 } 100 125 101 102 126 /* Initialize basic tables for exception dispatching */ 103 127 void interrupt_init(void) 104 128 { 105 exc_register(VECTOR_DATA_STORAGE, "data_storage", pht_refill); 106 exc_register(VECTOR_INSTRUCTION_STORAGE, "instruction_storage", pht_refill); 107 exc_register(VECTOR_EXTERNAL, "external", exception_external); 108 exc_register(VECTOR_DECREMENTER, "timer", exception_decrementer); 129 exc_register(VECTOR_DATA_STORAGE, "data_storage", true, 130 pht_refill); 131 exc_register(VECTOR_INSTRUCTION_STORAGE, "instruction_storage", true, 132 pht_refill); 133 exc_register(VECTOR_EXTERNAL, "external", true, 134 exception_external); 135 exc_register(VECTOR_DECREMENTER, "timer", true, 136 exception_decrementer); 109 137 } 110 138
Note:
See TracChangeset
for help on using the changeset viewer.