Kernel/aarch64: Store and initialize TTBR0_EL1 in ThreadRegisters
This commit is contained in:
parent
9e90932bfb
commit
1f30a5e4d9
Notes:
sideshowbarker
2024-07-17 01:09:45 +09:00
Author: https://github.com/FireFox317 Commit: https://github.com/SerenityOS/serenity/commit/1f30a5e4d9 Pull-request: https://github.com/SerenityOS/serenity/pull/16911 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/nico ✅
1 changed files with 3 additions and 1 deletions
|
@ -15,15 +15,17 @@ struct ThreadRegisters {
|
|||
u64 x[31];
|
||||
u64 elr_el1;
|
||||
u64 sp_el0;
|
||||
u64 ttbr0_el1;
|
||||
|
||||
FlatPtr ip() const { return elr_el1; }
|
||||
void set_ip(FlatPtr value) { elr_el1 = value; }
|
||||
|
||||
void set_sp(FlatPtr value) { sp_el0 = value; }
|
||||
|
||||
void set_initial_state(bool, Memory::AddressSpace&, FlatPtr kernel_stack_top)
|
||||
void set_initial_state(bool, Memory::AddressSpace& space, FlatPtr kernel_stack_top)
|
||||
{
|
||||
set_sp(kernel_stack_top);
|
||||
ttbr0_el1 = space.page_directory().ttbr0();
|
||||
}
|
||||
|
||||
void set_entry_function(FlatPtr entry_ip, FlatPtr entry_data)
|
||||
|
|
Loading…
Add table
Reference in a new issue