Subversion Repositories HelenOS

Rev

Rev 2462 | Rev 3790 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2462 Rev 2604
Line 64... Line 64...
64
void decode_istate(int n, istate_t *istate)
64
void decode_istate(int n, istate_t *istate)
65
{
65
{
66
    char *symbol;
66
    char *symbol;
67
/*  uint64_t *x = &istate->stack[0]; */
67
/*  uint64_t *x = &istate->stack[0]; */
68
 
68
 
69
    if (!(symbol=get_symtab_entry(istate->rip)))
69
    if (!(symbol = get_symtab_entry(istate->rip)))
70
        symbol = "";
70
        symbol = "";
71
 
71
 
72
    printf("-----EXCEPTION(%d) OCCURED----- ( %s )\n",n, __func__);
72
    printf("-----EXCEPTION(%d) OCCURED----- ( %s )\n", n, __func__);
73
    printf("%%rip: %#llx (%s)\n",istate->rip, symbol);
73
    printf("%%rip: %#llx (%s)\n", istate->rip, symbol);
74
    printf("ERROR_WORD=%#llx\n", istate->error_word);
74
    printf("ERROR_WORD=%#llx\n", istate->error_word);
75
    printf("%%rcs=%#llx, flags=%#llx, %%cr0=%#llx\n", istate->cs, istate->rflags, read_cr0());
75
    printf("%%cs=%#llx, rflags=%#llx, %%cr0=%#llx\n", istate->cs,
-
 
76
        istate->rflags, read_cr0());
76
    printf("%%rax=%#llx, %%rcx=%#llx, %%rdx=%#llx\n", istate->rax, istate->rcx, istate->rdx);
77
    printf("%%rax=%#llx, %%rcx=%#llx, %%rdx=%#llx\n", istate->rax,
-
 
78
        istate->rcx, istate->rdx);
77
    printf("%%rsi=%#llx, %%rdi=%#llx, %%r8 =%#llx\n", istate->rsi, istate->rdi, istate->r8);
79
    printf("%%rsi=%#llx, %%rdi=%#llx, %%r8=%#llx\n", istate->rsi,
-
 
80
        istate->rdi, istate->r8);
78
    printf("%%r9 =%#llx, %%r10 =%#llx, %%r11=%#llx\n", istate->r9, istate->r10, istate->r11);
81
    printf("%%r9=%#llx, %%r10=%#llx, %%r11=%#llx\n", istate->r9,
-
 
82
        istate->r10, istate->r11);
79
#ifdef CONFIG_DEBUG_ALLREGS 
83
#ifdef CONFIG_DEBUG_ALLREGS 
80
    printf("%%r12=%#llx, %%r13=%#llx, %%r14=%#llx\n", istate->r12, istate->r13, istate->r14);
84
    printf("%%r12=%#llx, %%r13=%#llx, %%r14=%#llx\n", istate->r12,
-
 
85
        istate->r13, istate->r14);
81
    printf("%%r15=%#llx, %%rbx=%#llx, %%rbp=%#llx\n", istate->r15, istate->rbx, &istate->rbp);
86
    printf("%%r15=%#llx, %%rbx=%#llx, %%rbp=%#llx\n", istate->r15,
-
 
87
        istate->rbx, &istate->rbp);
82
#endif
88
#endif
83
    printf("%%rsp=%#llx\n", &istate->stack[0]);
89
    printf("%%rsp=%#llx\n", &istate->stack[0]);
84
}
90
}
85
 
91
 
86
static void trap_virtual_eoi(void)
92
static void trap_virtual_eoi(void)
Line 193... Line 199...
193
    for (i = 0; i < IVT_ITEMS; i++)
199
    for (i = 0; i < IVT_ITEMS; i++)
194
        exc_register(i, "null", (iroutine) null_interrupt);
200
        exc_register(i, "null", (iroutine) null_interrupt);
195
   
201
   
196
    for (i = 0; i < IRQ_COUNT; i++) {
202
    for (i = 0; i < IRQ_COUNT; i++) {
197
        if ((i != IRQ_PIC_SPUR) && (i != IRQ_PIC1))
203
        if ((i != IRQ_PIC_SPUR) && (i != IRQ_PIC1))
198
            exc_register(IVT_IRQBASE + i, "irq", (iroutine) irq_interrupt);
204
            exc_register(IVT_IRQBASE + i, "irq",
-
 
205
                (iroutine) irq_interrupt);
199
    }
206
    }
200
   
207
   
201
    exc_register(7, "nm_fault", (iroutine) nm_fault);
208
    exc_register(7, "nm_fault", (iroutine) nm_fault);
202
    exc_register(12, "ss_fault", (iroutine) ss_fault);
209
    exc_register(12, "ss_fault", (iroutine) ss_fault);
203
    exc_register(13, "gp_fault", (iroutine) gp_fault);
210
    exc_register(13, "gp_fault", (iroutine) gp_fault);
204
    exc_register(14, "ident_mapper", (iroutine) ident_page_fault);
211
    exc_register(14, "ident_mapper", (iroutine) ident_page_fault);
205
   
212
   
206
#ifdef CONFIG_SMP
213
#ifdef CONFIG_SMP
207
    exc_register(VECTOR_TLB_SHOOTDOWN_IPI, "tlb_shootdown", (iroutine) tlb_shootdown_ipi);
214
    exc_register(VECTOR_TLB_SHOOTDOWN_IPI, "tlb_shootdown",
-
 
215
        (iroutine) tlb_shootdown_ipi);
208
#endif
216
#endif
209
}
217
}
210
 
218
 
211
void trap_virtual_enable_irqs(uint16_t irqmask)
219
void trap_virtual_enable_irqs(uint16_t irqmask)
212
{
220
{