1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 22:07:36 +00:00

Kernel/aarch64: Implement thread_context_first_enter

This requires two new functions, context_first_init and
restore_context_and_eret. With this code in place, we are now running
the first idle thread! :^)
This commit is contained in:
Timon Kruiper 2022-12-27 17:14:35 +01:00 committed by Andrew Kaster
parent 262309d9bf
commit 0b95d8cd24
2 changed files with 34 additions and 4 deletions

View file

@ -85,8 +85,6 @@
msr elr_el1, x0
ldr x0, [sp, #TPIDR_EL0_SLOT]
msr tpidr_el0, x0
ldr x0, [sp, #SP_EL0_SLOT]
msr sp_el0, x0
ldp x0, x1, [sp, #(0 * 0)]
ldp x2, x3, [sp, #(2 * 8)]
@ -186,3 +184,8 @@ system_error_current_elsp_el0:
bl exception_common
restore_previous_context
eret
.global restore_context_and_eret
restore_context_and_eret:
restore_previous_context
eret