mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 20:07:36 +00:00
Kernel/aarch64: Implement set_exec_state in ThreadRegisters
This sets up the correct ThreadRegisters state when a process is exec'ed, which happens when the first userspace application is executed. Also changes Processor.cpp to get the stack pointer from the ThreadRegisters.
This commit is contained in:
parent
8960662e57
commit
5781d58fe8
2 changed files with 5 additions and 5 deletions
|
@ -241,7 +241,7 @@ FlatPtr Processor::init_context(Thread& thread, bool leave_crit)
|
|||
// x30 is the Link Register for the aarch64 ABI, so this will return to exit_kernel_thread when main thread function returns.
|
||||
eretframe.x[30] = FlatPtr(&exit_kernel_thread);
|
||||
eretframe.elr_el1 = thread_regs.elr_el1;
|
||||
eretframe.sp_el0 = kernel_stack_top;
|
||||
eretframe.sp_el0 = thread_regs.sp_el0;
|
||||
eretframe.tpidr_el0 = 0; // FIXME: Correctly initialize this when aarch64 has support for thread local storage.
|
||||
eretframe.spsr_el1 = thread_regs.spsr_el1;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue