coreboot/payloads/libpayload/arch/arm64
Julius Werner 84e000b88e libpayload: arm64: Fix alignment for exception_state
In the arm64 exception handler in libpayload, we use the banked
exception stack pointer (SP_EL2, as opposed to the normal SP_EL0) not as
a normal stack pointer, but simply as a pointer to the exception_state
struct. This makes it easy to dump all registers into that struct on
context switch. We then immediately switch back to SP_EL0.

Yet, even though it is not really a stack for us, the aarch64
architecture still requires that SP_EL2 is 16 byte aligned at function
boundaries. If the exception_state struct is not thus aligned,
exceptions are broken. (I don't know why nobody ever hit this before,
but I hit it now while trying to pull in zstd code. I guess we just
don't have unaligned BSS entries that often and simply got lucky for a
while. 3 hours wasted on debugging. :( )

Change-Id: Id19184656fb9da68fe4bfdbc240c0c25b9d24cd6
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/89926
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2025-11-10 02:36:39 +00:00
..
cache.c
coreboot.c
cpu.S libpayload/arm64: Support FEAT_CCIDX 2024-06-05 11:09:16 +00:00
exception.c libpayload: arm64: Fix alignment for exception_state 2025-11-10 02:36:39 +00:00
exception_asm.S
gdb.c libpayload: arm64: Fix alignment for exception_state 2025-11-10 02:36:39 +00:00
head.S
Kconfig libpayload: Use Kconfig for architecture memcpy, not weak symbols 2025-05-22 19:27:24 +00:00
libpayload.ldscript libpayload: Move back the ttb_buffer section 2024-01-11 21:02:30 +00:00
main.c
Makefile.mk libpayload: Unify selfboot() implementations 2025-02-11 20:59:57 +00:00
memcpy.S
memmove.S
memset.S
mmu.c libpayload/arch/arm64/mmu: Fix missing CBMEM in used ranges 2025-06-13 15:23:09 +00:00
sysinfo.c
timer.c
util.S
virtual.c