mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 15:46:33 +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
Notes:
sideshowbarker
2024-07-17 01:53:23 +09:00
Author: https://github.com/FireFox317
Commit: 5781d58fe8
Pull-request: https://github.com/SerenityOS/serenity/pull/17249
Reviewed-by: https://github.com/linusg
Reviewed-by: https://github.com/nico ✅
Reviewed-by: https://github.com/supercomputer7
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