diff options
author | Furquan Shaikh <furquan@google.com> | 2014-08-27 21:40:23 -0700 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2015-03-21 13:35:33 +0100 |
commit | 02efc9413b076d869da86017eff188741d114991 (patch) | |
tree | 0f3ca76d93cf7ed8619777c4a220f75ad1885703 /payloads/libpayload/arch/arm64/head.S | |
parent | 68cb88e0559108e934cfae49531c8f3295b868a3 (diff) |
libpayload arm64: Initialize exception stack
Initialize exception stack to be able to handle exceptions properly
BUG=chrome-os-partner:31634
BRANCH=None
TEST=test_exc successfully generates and handles exceptions on ryu
Change-Id: I19163fae080b9ac3297a7ffe404446e427bf9a1c
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 99157687c5178c3b3eb79f5589343db1b2b4cc86
Original-Change-Id: I4dc83ff32c1665e22127bf0b1e6d4c6b45c07a4a
Original-Signed-off-by: Furquan Shaikh <furquan@google.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/214608
Original-Tested-by: Furquan Shaikh <furquan@chromium.org>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Commit-Queue: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: http://review.coreboot.org/8782
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'payloads/libpayload/arch/arm64/head.S')
-rw-r--r-- | payloads/libpayload/arch/arm64/head.S | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/payloads/libpayload/arch/arm64/head.S b/payloads/libpayload/arch/arm64/head.S index 214c5d7253..349dfd43ee 100644 --- a/payloads/libpayload/arch/arm64/head.S +++ b/payloads/libpayload/arch/arm64/head.S @@ -38,24 +38,23 @@ ENTRY(_entry) ldr x1, 1f str x0, [x1] - /* TODO: disable interrupts */ + /* Setup exception stack */ + ldr x1, 3f + msr SPSel, #1 + isb - /* TODO: Clear BSS */ + mov sp, x1 /* Setup new stack */ ldr x1, 2f - mov sp, x1 + msr SPSel, #0 + isb - /* TODO: Save old stack pointer and link register */ + mov sp, x1 /* Let's rock. */ bl start_main - /* %r0 has the return value - pass it on unmolested */ - - /* TODO: restore old stack pointer and link register */ - - /* Return to the original context. */ ret ENDPROC(_entry) @@ -64,3 +63,5 @@ ENDPROC(_entry) .quad cb_header_ptr 2: .quad _stack +3: +.quad _exc_stack |