From d28457e416f7ba7c903c4db6bff73fb87f77e3e6 Mon Sep 17 00:00:00 2001 From: Aiden Gall Date: Wed, 15 May 2024 00:26:59 +0100 Subject: align e820 table to 8 byte boundary --- kernel/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'kernel') diff --git a/kernel/main.c b/kernel/main.c index e69af30..8c120e9 100644 --- a/kernel/main.c +++ b/kernel/main.c @@ -45,9 +45,9 @@ puts(uint16_t *dst, const char *str) } static uint16_t * -print_e820_table(uint16_t *dst, const struct e820_entry *const entries, const uint32_t count) +print_e820_table(uint16_t *dst, const struct e820_entry *const entries, const uint16_t count) { - for (uint32_t i = 0; i < count; ++i, dst += VGA_WIDTH) { + for (uint16_t i = 0; i < count; ++i, dst += VGA_WIDTH) { uint16_t *cursor; cursor = print_hex(dst, entries[i].base); @@ -74,8 +74,8 @@ kmain(void) puts(vga_memory, "ProvidenceOS v0.1"); puts(vga_memory+VGA_WIDTH*2, "e820 memory map:"); - const uint32_t e820_size = *(uint32_t *)0xf000; - const struct e820_entry *const e820_mmap = (struct e820_entry *)0xf004; + const uint16_t e820_size = *(uint16_t *)0xf000; + const struct e820_entry *const e820_mmap = (struct e820_entry *)0xf008; print_e820_table(vga_memory+(VGA_WIDTH*3), e820_mmap, e820_size); -- cgit v1.2.3