mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 10:37:45 +00:00
Kernel/aarch64: Execute kernel with SP_EL1 instead of SP_EL0
Until now the kernel was always executing with SP_EL0, as this made the initial dropping to EL1 a bit easier. This commit changes this behaviour to use the corresponding SP_ELx for each exception level. To make sure that the execution of the C++ code can continue, the current stack pointer is copied into the corresponding SP_ELx just before dropping an exception level.
This commit is contained in:
parent
05659debd1
commit
247109cee6
5 changed files with 23 additions and 20 deletions
|
@ -18,7 +18,6 @@ start:
|
|||
// Let stack start before .text for now.
|
||||
// 512 kiB (0x80000) of stack are probably not sufficient, especially once we give the other cores some stack too,
|
||||
// but for now it's ok.
|
||||
msr SPSel, #0 //Use the same SP as we descend into EL1
|
||||
adrp x14, start
|
||||
add x14, x14, :lo12:start
|
||||
mov sp, x14
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue