From 655b5c88d46b840b903a0fc6cf52b7dbf5327fe8 Mon Sep 17 00:00:00 2001 From: "Justin C. Miller" Date: Mon, 1 Jun 2020 00:01:07 -0700 Subject: [PATCH] [kernel] Remove obsolete 1MiB offset Back when the bootloader could only mirror higher half memory linearly to the lower half, the kernel couldn't be loaded at the beginning of kernel space because it was unlikely to find enough pages there, so it was loaded at +1MiB in kernel space. Now the bootloader can map any pages to the necessary locations, the offset can be removed. Tags: elf linker virtual memory --- src/arch/x86_64/kernel.ld | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/arch/x86_64/kernel.ld b/src/arch/x86_64/kernel.ld index 5c57969..f2a61c6 100755 --- a/src/arch/x86_64/kernel.ld +++ b/src/arch/x86_64/kernel.ld @@ -1,8 +1,7 @@ ENTRY(_start) SECTIONS { - OFFSET = 0xFFFF800000000000; - . = OFFSET + 0x100000; + . = 0xFFFF800000000000; .header : { __header_start = .;