diff --git a/linker/x86_64.ld b/linker/x86_64.ld index 39ed68b..4c4229e 100644 --- a/linker/x86_64.ld +++ b/linker/x86_64.ld @@ -2,8 +2,6 @@ ENTRY(_start) SECTIONS { - . = 2M; - kernel_start = .; .text : diff --git a/src/boot/start.c b/src/boot/start.c index fd6171a..cb280db 100644 --- a/src/boot/start.c +++ b/src/boot/start.c @@ -33,7 +33,7 @@ extern uptr kernel_start; extern uptr kernel_end; static region regions[MAX_REGIONS] = {0}; -static u32 region_count = 0; +static size_t region_count = 0; static void find_memory_regions(uptr multiboot_info) { multiboot_tag_mmap *tag = multiboot_find_tag(multiboot_info, MULTIBOOT_TAG_TYPE_MMAP); @@ -63,12 +63,12 @@ void c_start(u32 magic, uptr multiboot_info) { console_clear(); if (magic != MULTIBOOT_BOOTLOADER_MAGIC) { - boot_panic("Expected bootloader magic 0x%x, but got 0x%x", MULTIBOOT_BOOTLOADER_MAGIC, magic); + boot_panic("Expected bootloader magic 0x%x, got 0x%x", MULTIBOOT_BOOTLOADER_MAGIC, magic); } find_memory_regions(multiboot_info); - for (u32 i = 0; i < region_count; ++i) { - kprintf("base: 0x%X, length: 0x%X\n", regions[i].base_address, regions[i].length); + for (size_t i = 0; i < region_count; i++) { + kprintf("Memory region %d: base=0x%X, length=0x%X\n", i, regions[i].base_address, regions[i].length); } } \ No newline at end of file