Rev 959 | Rev 1019 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 959 | Rev 1008 | ||
---|---|---|---|
Line 47... | Line 47... | ||
47 | 47 | ||
48 | void (* disable_irqs_function)(__u16 irqmask) = NULL; |
48 | void (* disable_irqs_function)(__u16 irqmask) = NULL; |
49 | void (* enable_irqs_function)(__u16 irqmask) = NULL; |
49 | void (* enable_irqs_function)(__u16 irqmask) = NULL; |
50 | void (* eoi_function)(void) = NULL; |
50 | void (* eoi_function)(void) = NULL; |
51 | 51 | ||
52 | #define PRINT_INFO_ERRCODE(istate) do { \ |
52 | static void PRINT_INFO_ERRCODE(istate_t *istate) |
- | 53 | { |
|
53 | char *symbol = get_symtab_entry(istate->eip); \ |
54 | char *symbol = get_symtab_entry(istate->eip); |
- | 55 | ||
54 | if (!symbol) \ |
56 | if (!symbol) |
55 | symbol = ""; \ |
57 | symbol = ""; |
- | 58 | ||
- | 59 | if (CPU) |
|
- | 60 | printf("----------------EXCEPTION OCCURED (cpu%d)----------------\n", CPU->id); |
|
- | 61 | else |
|
56 | printf("----------------EXCEPTION OCCURED----------------\n"); \ |
62 | printf("----------------EXCEPTION OCCURED----------------\n"); |
- | 63 | ||
57 | printf("%%eip: %X (%s)\n",istate->eip,symbol); \ |
64 | printf("%%eip: %X (%s)\n",istate->eip,symbol); |
58 | printf("ERROR_WORD=%X\n", istate->error_word); \ |
65 | printf("ERROR_WORD=%X\n", istate->error_word); |
59 | printf("%%cs=%X,flags=%X\n", istate->cs, istate->eflags); \ |
66 | printf("%%cs=%X,flags=%X\n", istate->cs, istate->eflags); |
60 | printf("%%eax=%X, %%ebx=%X, %%ecx=%X, %%edx=%X\n",\ |
- | |
61 | istate->eax,istate->ebx,istate->ecx,istate->edx); \ |
67 | printf("%%eax=%X, %%ebx=%X, %%ecx=%X, %%edx=%X\n", istate->eax,istate->ebx,istate->ecx,istate->edx); |
62 | printf("%%esi=%X, %%edi=%X, %%ebp=%X, %%esp=%X\n",\ |
- | |
63 | istate->esi,istate->edi,istate->ebp,istate->esp); \ |
68 | printf("%%esi=%X, %%edi=%X, %%ebp=%X, %%esp=%X\n", istate->esi,istate->edi,istate->ebp,istate->esp); |
64 | printf("stack: %X, %X, %X, %X\n", istate->stack[0], istate->stack[1], istate->stack[2], istate->stack[3]); \ |
69 | printf("stack: %X, %X, %X, %X\n", istate->stack[0], istate->stack[1], istate->stack[2], istate->stack[3]); |
65 | printf(" %X, %X, %X, %X\n", istate->stack[4], istate->stack[5], istate->stack[6], istate->stack[7]); \ |
70 | printf(" %X, %X, %X, %X\n", istate->stack[4], istate->stack[5], istate->stack[6], istate->stack[7]); |
66 | } while(0) |
71 | } |
67 | 72 | ||
68 | void null_interrupt(int n, istate_t *istate) |
73 | void null_interrupt(int n, istate_t *istate) |
69 | { |
74 | { |
70 | PRINT_INFO_ERRCODE(istate); |
75 | PRINT_INFO_ERRCODE(istate); |
71 | panic("unserviced interrupt: %d\n", n); |
76 | panic("unserviced interrupt: %d\n", n); |