From ad6db14526dd3834a2294c609f67e85609fb0ab0 Mon Sep 17 00:00:00 2001 From: TuxSH <1922548+TuxSH@users.noreply.github.com> Date: Tue, 30 Jul 2019 02:16:25 +0200 Subject: [PATCH] thermosphere: Fix wrong register allocation --- thermosphere/src/start.s | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/thermosphere/src/start.s b/thermosphere/src/start.s index d99348671..a6082dede 100644 --- a/thermosphere/src/start.s +++ b/thermosphere/src/start.s @@ -58,9 +58,6 @@ _startCommon: dsb sy isb - // Mov x20 (and no other register (?)) with != 0 is needed to unfuck QEMU's JIT - mov x20, #0x31 - // Get core ID mrs x10, mpidr_el1 and x10, x10, #0xFF @@ -73,7 +70,7 @@ _startCommon: // Set up x18 adrp x18, g_coreCtxs add x18, x18, #:lo12:g_coreCtxs - add x18, x18, x20, lsl #3 + add x18, x18, x10, lsl #3 stp x18, xzr, [sp, #-0x10]! // Store entrypoint if first core @@ -86,7 +83,7 @@ _store_arg: // Don't call init array to save space? // Clear BSS & call main for the first core executing this code - cbz x20, _jump_to_main + cbz x19, _jump_to_main ldr x0, =__bss_start__ mov w1, #0 ldr x2, =__end__