X-Git-Url: http://git.dujemihanovic.xyz/%7B%7B?a=blobdiff_plain;f=kernel%2Fkernel.c;h=0aa8fc260ddfd604789fa6e2ff0050cb2f4a8970;hb=d00271672b67f2f05d061dcdc7e5c2c8d031f14a;hp=060051c25782f3317f426f0ea44362e420a98b80;hpb=e643590fbf5d867cc6f7fb597718a980aa8f72b4;p=nameless-os.git diff --git a/kernel/kernel.c b/kernel/kernel.c index 060051c..0aa8fc2 100644 --- a/kernel/kernel.c +++ b/kernel/kernel.c @@ -11,13 +11,38 @@ extern void pf_handler(struct fault_frame *frame); static struct idt_descriptor idt[256] __attribute__((aligned(0x10))); static struct idtr idtr __attribute__((aligned(0x10))); +struct e820_map { + uint64_t base; + uint64_t length; + uint32_t type; + uint32_t attrib; +}; -void kmain(void) +void print_e820(struct e820_map *mmap, int mmap_size) +{ + kprint(" Base | Length | Type | Attrib |\n", 0); + kprint("------------------------------------------------------------\n", 0); + for (int i=0; i