moved stuff around
This commit is contained in:
28
kernel/kmain.c
Normal file
28
kernel/kmain.c
Normal file
@@ -0,0 +1,28 @@
|
||||
#include <stdint.h>
|
||||
|
||||
extern void halt();
|
||||
extern void idt_load();
|
||||
extern void reboot();
|
||||
|
||||
typedef struct {
|
||||
uint16_t offset_low;
|
||||
uint16_t selector;
|
||||
uint8_t zero;
|
||||
uint8_t flags;
|
||||
uint16_t offset_high;
|
||||
} idt_entry_t __attribute__((packed));
|
||||
|
||||
typedef struct {
|
||||
uint16_t limit;
|
||||
uint32_t base;
|
||||
} idt_ptr_t;
|
||||
|
||||
idt_entry_t idt[256];
|
||||
idt_ptr_t idtr;
|
||||
|
||||
void load_idt() {}
|
||||
|
||||
void kmain() {
|
||||
load_idt();
|
||||
halt();
|
||||
}
|
||||
Reference in New Issue
Block a user