summaryrefslogtreecommitdiff
path: root/Kernel/Arch/aarch64/linker.ld
diff options
context:
space:
mode:
authorTimon Kruiper <timonkruiper@gmail.com>2022-09-21 16:16:39 +0200
committerAndreas Kling <kling@serenityos.org>2022-10-01 14:09:01 +0200
commita62732ee2f029ca388b358e3cc013df9f1951d9d (patch)
treecc58112e736798d9fb122cb6278e2c767cd63f49 /Kernel/Arch/aarch64/linker.ld
parentcdf59c86ac0fa2b38af3ec0217913cab19153ab3 (diff)
downloadserenity-a62732ee2f029ca388b358e3cc013df9f1951d9d.zip
Kernel/aarch64: Only identity map kernel image, instead of all of RAM
For the initial page tables we only need to identity map the kernel image, the rest of the memory will be managed by the MemoryManager. The linker script is updated to get the kernel image start and end addresses.
Diffstat (limited to 'Kernel/Arch/aarch64/linker.ld')
-rw-r--r--Kernel/Arch/aarch64/linker.ld6
1 files changed, 4 insertions, 2 deletions
diff --git a/Kernel/Arch/aarch64/linker.ld b/Kernel/Arch/aarch64/linker.ld
index ea81f81bc5..08d34693fe 100644
--- a/Kernel/Arch/aarch64/linker.ld
+++ b/Kernel/Arch/aarch64/linker.ld
@@ -13,6 +13,8 @@ SECTIONS
{
. = 0x00080000;
+ start_of_kernel_image = .;
+
.text ALIGN(4K) : AT (ADDR(.text))
{
*(.text.first)
@@ -62,8 +64,6 @@ SECTIONS
/* FIXME: Placeholder to satisfy linker */
start_of_kernel_text = .;
end_of_kernel_text = .;
- start_of_kernel_image = .;
- end_of_kernel_image = .;
start_of_unmap_after_init = .;
end_of_unmap_after_init = .;
start_of_ro_after_init = .;
@@ -76,6 +76,8 @@ SECTIONS
. += 8M;
page_tables_phys_end = .;
+
+ end_of_kernel_image = .;
}
size_of_bss_divided_by_8 = (end_of_bss - start_of_bss + 7) / 8;