mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:58:11 +00:00
Kernel: Add ThreadRegisters::set_exec_state and use it in execve.cpp
Using this abstraction it is possible to compile this file for aarch64.
This commit is contained in:
parent
171a8ca478
commit
1fbf562e7e
3 changed files with 19 additions and 4 deletions
|
@ -685,10 +685,9 @@ ErrorOr<void> Process::do_exec(NonnullLockRefPtr<OpenFileDescription> main_progr
|
|||
new_main_thread->reset_fpu_state();
|
||||
|
||||
auto& regs = new_main_thread->m_regs;
|
||||
regs.cs = GDT_SELECTOR_CODE3 | 3;
|
||||
regs.rip = load_result.entry_eip;
|
||||
regs.rsp = new_userspace_sp;
|
||||
regs.cr3 = address_space().with([](auto& space) { return space->page_directory().cr3(); });
|
||||
address_space().with([&](auto& space) {
|
||||
regs.set_exec_state(load_result.entry_eip, new_userspace_sp, *space);
|
||||
});
|
||||
|
||||
{
|
||||
TemporaryChange profiling_disabler(m_profiling, was_profiling);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue