]>
git.dujemihanovic.xyz Git - nameless-os.git/blob - kernel/kernel.c
5 #include <irq/interrupt.h>
6 #include <irq/i8259a.h>
9 struct idt_descriptor idt
[256] __attribute__((aligned(0x10)));
10 struct idtr idtr
__attribute__((aligned(0x10)));
11 extern void (*_int_handler_table
[48])(void);
17 kprint("Welcome to Nameless OS!\nRunning revision: ", 0);
18 kprint(GIT_COMMIT
, 0);
20 kprint("Preparing IDT...\n", 0);
21 for (int i
=0; i
<48; i
++) {
22 idt_set_descriptor(idt
, i
, 0x8, _int_handler_table
[i
], IDT_INTERRUPT_GATE
, 0);
24 kprint("IDT prepared, loading...\n", 0);
25 populate_idtr(&idtr
, idt
);
27 kprint("Setting up interrupts...\n", 0);
30 ps2_success
= ps2_initialize();
31 switch (ps2_success
) {
33 kprint("No PS/2 devices found or working, we will have no input\n", 0);
36 kprint("Found one working PS/2 device\n", 0);
39 kprint("Found two working PS/2 devices\n", 0);
42 kprint("All done\n", 0);