Changeset fcfac420 in mainline for arch/ia32/src/interrupt.c
- Timestamp:
- 2005-12-10T01:02:31Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6095342
- Parents:
- 973be64e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ia32/src/interrupt.c
r973be64e rfcfac420 44 44 */ 45 45 46 static iroutine ivt[IVT_ITEMS];47 48 46 void (* disable_irqs_function)(__u16 irqmask) = NULL; 49 47 void (* enable_irqs_function)(__u16 irqmask) = NULL; 50 48 void (* eoi_function)(void) = NULL; 51 49 52 #define PRINT_INFO_ERRCODE(x) { \ 53 char *symbol = get_symtab_entry(stack[1]); \ 50 #define PRINT_INFO_ERRCODE(st) { \ 51 __native *x = (__native *) st; \ 52 char *symbol = get_symtab_entry(x[1]); \ 54 53 if (!symbol) \ 55 54 symbol = ""; \ … … 66 65 } 67 66 68 iroutine trap_register(__u8 n, iroutine f)67 void null_interrupt(int n, void *st) 69 68 { 70 ASSERT(n < IVT_ITEMS); 71 72 iroutine old; 73 74 old = ivt[n]; 75 ivt[n] = f; 76 77 return old; 78 } 69 __native *stack = (__native *) st; 79 70 80 /*81 * Called directly from the assembler code.82 * CPU is interrupts_disable()'d.83 */84 void trap_dispatcher(__u8 n, __native stack[])85 {86 ASSERT(n < IVT_ITEMS);87 88 ivt[n](n, stack);89 }90 91 void null_interrupt(__u8 n, __native stack[])92 {93 71 printf("int %d: null_interrupt\n", n); 94 72 printf("stack: %L, %L, %L, %L\n", stack[0], stack[1], stack[2], stack[3]); … … 96 74 } 97 75 98 void gp_fault( __u8 n, __native stack[])76 void gp_fault(int n, void *stack) 99 77 { 100 78 PRINT_INFO_ERRCODE(stack); … … 102 80 } 103 81 104 void ss_fault( __u8 n, __native stack[])82 void ss_fault(int n, void *stack) 105 83 { 106 84 PRINT_INFO_ERRCODE(stack); … … 109 87 110 88 111 void nm_fault( __u8 n, __native stack[])89 void nm_fault(int n, void *stack) 112 90 { 113 91 #ifdef CONFIG_FPU_LAZY … … 120 98 121 99 122 void page_fault( __u8 n, __native stack[])100 void page_fault(int n, void *stack) 123 101 { 124 102 PRINT_INFO_ERRCODE(stack); … … 127 105 } 128 106 129 void syscall( __u8 n, __native stack[])107 void syscall(int n, void *stack) 130 108 { 131 109 printf("cpu%d: syscall\n", CPU->id); … … 133 111 } 134 112 135 void tlb_shootdown_ipi( __u8 n, __native stack[])113 void tlb_shootdown_ipi(int n, void *stack) 136 114 { 137 115 trap_virtual_eoi(); … … 139 117 } 140 118 141 void wakeup_ipi( __u8 n, __native stack[])119 void wakeup_ipi(int n, void *stack) 142 120 { 143 121 trap_virtual_eoi();
Note:
See TracChangeset
for help on using the changeset viewer.