Ignore:
Timestamp:
Jun 27, 2017, 5:24:02 PM (5 years ago)
Author:
max@…
Message:

add the timer vector, for now it double-faults

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/x86_64/core/hal_init.c

    r74 r80  
    184184        kernel_init(&btinfo);
    185185        x86_printf("[+] kernel_init called\n");
     186
     187
     188        sti();
     189        while (1);
    186190
    187191        int m = 0;
     
    288292static void idt_create()
    289293{
    290         extern uint64_t x86_traps[], x86_intrs[];
     294        extern uint64_t x86_traps[], x86_intrs[], x86_rsvd;
    291295        struct idt_seg *idt;
    292296        size_t i;
    293297
    294298        idt = (struct idt_seg *)&idtstore;
     299
     300        /* First, put a dead entry */
     301        for (i = 0; i < NIDT; i++) {
     302                idt_set_seg(&idt[i], (void *)&x86_rsvd, 0,
     303                    SDT_SYS386IGT, SEL_KPL, GDT_FIXED_SEL(GDT_KCODE_SEL, SEL_KPL));
     304        }
    295305
    296306        /* General exceptions */
Note: See TracChangeset for help on using the changeset viewer.