:: commit 6374a0027bdd7275e16bbc42d8ea6ec570ecba16

48cf <32851089+48cf@users.noreply.github.com> — 2023-11-23 23:43

parents: 356eb24bf2

smp/aarch64: Fix trampoline alignment and allocation size

diff --git a/common/sys/smp.c b/common/sys/smp.c
index bb0ceb4b..23dd1d8a 100644
--- a/common/sys/smp.c
+++ b/common/sys/smp.c
@@ -298,7 +298,7 @@ static bool try_start_ap(int boot_method, uint64_t method_ptr,
     // Prepare the trampoline
     static void *trampoline = NULL;
     if (trampoline == NULL) {
-        trampoline = ext_mem_alloc(0x1000);
+        trampoline = ext_mem_alloc(smp_trampoline_size);
 
         memcpy(trampoline, smp_trampoline_start, smp_trampoline_size);
     }
diff --git a/common/sys/smp_trampoline.asm_aarch64 b/common/sys/smp_trampoline.asm_aarch64
index d65c9db2..b3b37889 100644
--- a/common/sys/smp_trampoline.asm_aarch64
+++ b/common/sys/smp_trampoline.asm_aarch64
@@ -99,7 +99,7 @@ smp_trampoline_start:
     br x8
 
 // Alignment required by VBAR register
-.align 11
+.align 12
 2:
     // Zero out VBAR to avoid confusion
     msr vbar_el1, xzr
tab: 248 wrap: offon