From acfeffc9ca00809aefe0c29e15ca9eb74b6b47d5 Mon Sep 17 00:00:00 2001 From: Timon Kruiper Date: Tue, 25 Oct 2022 18:37:56 +0200 Subject: [PATCH] Kernel/aarch64: Branch to local halt function instead of C++ one The kernel image grew so much that it wasn't possible to jump to the C++ symbol anymore, since this generated a 'relocation truncated' error when linking. --- Kernel/Arch/aarch64/boot.S | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Kernel/Arch/aarch64/boot.S b/Kernel/Arch/aarch64/boot.S index f4ec015a4b..2a582e4300 100644 --- a/Kernel/Arch/aarch64/boot.S +++ b/Kernel/Arch/aarch64/boot.S @@ -13,7 +13,7 @@ start: // Let only core 0 continue, put other cores to sleep. mrs x13, MPIDR_EL1 and x13, x13, 0xff - cbnz x13, _ZN6Kernel9Processor4haltEv + cbnz x13, halt // Let stack start before .text for now. // 512 kiB (0x80000) of stack are probably not sufficient, especially once we give the other cores some stack too, @@ -31,3 +31,8 @@ Lbss_clear_loop: bne Lbss_clear_loop b init + +halt: + msr daifset, #2 + wfi + b halt