diff options
author | Timon Kruiper <timonkruiper@gmail.com> | 2023-01-06 14:50:05 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-01-24 14:54:44 +0000 |
commit | 91d04519991083c2d6bdf85f535a2e64278e86ca (patch) | |
tree | 07501786b1fa09ad0327a165687159781cfbee22 /Kernel/Arch/aarch64/boot.S | |
parent | a581cae4d411401aba5857add7e308a6cc7b55cf (diff) | |
download | serenity-91d04519991083c2d6bdf85f535a2e64278e86ca.zip |
Kernel/aarch64: Use relative addressing in boot.S
As the kernel is now linked at high address in virtual memory, we cannot
use absolute addresses as they refer to high addresses in virtual
memory. At this point in the boot process we are still running with the
MMU off, so we have to make sure the accesses are using physical memory
addresses.
Diffstat (limited to 'Kernel/Arch/aarch64/boot.S')
-rw-r--r-- | Kernel/Arch/aarch64/boot.S | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Kernel/Arch/aarch64/boot.S b/Kernel/Arch/aarch64/boot.S index 2a582e4300..ac4796f616 100644 --- a/Kernel/Arch/aarch64/boot.S +++ b/Kernel/Arch/aarch64/boot.S @@ -19,11 +19,13 @@ start: // 512 kiB (0x80000) of stack are probably not sufficient, especially once we give the other cores some stack too, // but for now it's ok. msr SPSel, #0 //Use the same SP as we descend into EL1 - ldr x14, =start + adrp x14, start + add x14, x14, :lo12:start mov sp, x14 // Clear BSS. - ldr x14, =start_of_bss + adrp x14, start_of_bss + add x14, x14, :lo12:start_of_bss ldr x15, =size_of_bss_divided_by_8 Lbss_clear_loop: str xzr, [x14], #8 |