aboutsummaryrefslogtreecommitdiff
path: root/payloads/libpayload/arch/arm64/head.S
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2018-10-10 15:42:28 -0700
committerJulius Werner <jwerner@chromium.org>2018-10-12 20:17:28 +0000
commit5c0e72ff9952bef2dcb62881ced0d95f8ad9cf1d (patch)
treee297683091fcbea2b785c289e3f3af95bef5238f /payloads/libpayload/arch/arm64/head.S
parentca52a258822c1c47d533684c5a4cbe5f2b7bd487 (diff)
libpayload: arm64: Make exception handling closer to arm32
This patch reworks the arm64 exception handling to be more similar to how it works on arm32. This includes a bunch of features like actually saving and restoring more exception state in the exception_state structure and supporting the same sort of partial reentrancy that is useful for GDB. Since there's no instruction to directly load into or store out of SP on arm64, we can't do quite the same thing where we use that to read an exception_state_ptr variable right after exception entry when no other register is available. But we can do something very similar by (ab-)using the "high" stack pointer (SP_EL2) as a pointer to the exception_state struct and providing a function to change it. Change-Id: Ia16a1124be1824392a309ae1f4cb031547d184c1 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://review.coreboot.org/29018 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'payloads/libpayload/arch/arm64/head.S')
-rw-r--r--payloads/libpayload/arch/arm64/head.S12
1 files changed, 0 insertions, 12 deletions
diff --git a/payloads/libpayload/arch/arm64/head.S b/payloads/libpayload/arch/arm64/head.S
index 349dfd43ee..8bac70fee5 100644
--- a/payloads/libpayload/arch/arm64/head.S
+++ b/payloads/libpayload/arch/arm64/head.S
@@ -38,18 +38,8 @@ ENTRY(_entry)
ldr x1, 1f
str x0, [x1]
- /* Setup exception stack */
- ldr x1, 3f
- msr SPSel, #1
- isb
-
- mov sp, x1
-
/* Setup new stack */
ldr x1, 2f
- msr SPSel, #0
- isb
-
mov sp, x1
/* Let's rock. */
@@ -63,5 +53,3 @@ ENDPROC(_entry)
.quad cb_header_ptr
2:
.quad _stack
-3:
-.quad _exc_stack