arm64: Initialize exception stack
Initialize the exception stack on stage_entry BUG=chrome-os-partner:31515 BRANCH=None TEST=Exception handling works fine Change-Id: I0b6fb95c660c68fb47a30e905acb910b0e2eafea Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://chromium-review.googlesource.com/213673 Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Commit-Queue: Furquan Shaikh <furquan@chromium.org>
This commit is contained in:
parent
131f9fca09
commit
a21d0a432e
1 changed files with 12 additions and 0 deletions
|
|
@ -55,6 +55,16 @@ ENTRY(arm64_el3_startup)
|
|||
and x0, x0, x1
|
||||
msr SCR_EL3, x0
|
||||
|
||||
/* Initialize SP_EL3 as exception stack */
|
||||
ldr x0, .exception_stack_top
|
||||
cmp x0, #0
|
||||
b.eq 2f
|
||||
msr SPSel, #1
|
||||
isb
|
||||
|
||||
mov sp, x0
|
||||
|
||||
2:
|
||||
/* Have stack pointer use SP_EL0. */
|
||||
msr SPSel, #0
|
||||
isb
|
||||
|
|
@ -81,6 +91,8 @@ ENTRY(arm64_el3_startup)
|
|||
* to the Kconfig option for cpu0. However, this code can be relocated
|
||||
* and reused to start up secondary cpus.
|
||||
*/
|
||||
.exception_stack_top:
|
||||
.quad CONFIG_EXCEPTION_STACK_TOP
|
||||
.stack_top:
|
||||
.quad _estack
|
||||
.entry:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue