]>
git.dujemihanovic.xyz Git - nameless-os.git/blob - kernel.c
e1a0df5158f3b06bfd44e8693db172d431737dbf
4 #include <irq/i8259a.h>
7 extern void double_fault(struct abort_frame
*frame
);
8 extern void keyb_handler(struct interrupt_frame
*frame
);
9 struct idt_descriptor idt
[256] __attribute__((aligned(0x10)));
10 struct idtr idtr
__attribute__((aligned(0x10)));
15 kprint("Welcome to Nameless OS!\nRunning revision: ", 0);
16 kprint(GIT_COMMIT
, 0);
18 kprint("Preparing IDT...\n", 0);
19 idt_set_descriptor(idt
, 0x8, 0x8, (uint32_t) double_fault
, IDT_TRAP_GATE
, 0x0);
20 idt_set_descriptor(idt
, 0x21, 0x8, (uint32_t) keyb_handler
, IDT_INTERRUPT_GATE
, 0x0);
21 kprint("IDT prepared, loading...\n", 0);
22 populate_idtr(&idtr
, idt
);
24 kprint("IDT loaded, enabling interrupts...\n", 0);
29 kprint("All done\n", 0);