mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 03:17:34 +00:00
Kernel/aarch64: Add getters/setters in RegisterState and ThreadRegisters
Specifically this commit implements two setters set_userspace_sp and set_ip in RegisterState.h, and also adds a stack pointer getter (sp) in ThreadRegisters.h. Contributed by konrad, thanks for that.
This commit is contained in:
parent
36362b9679
commit
ec765544a5
2 changed files with 3 additions and 4 deletions
|
@ -24,14 +24,12 @@ struct RegisterState {
|
||||||
FlatPtr userspace_sp() const { return sp_el0; }
|
FlatPtr userspace_sp() const { return sp_el0; }
|
||||||
void set_userspace_sp(FlatPtr value)
|
void set_userspace_sp(FlatPtr value)
|
||||||
{
|
{
|
||||||
(void)value;
|
sp_el0 = value;
|
||||||
TODO_AARCH64();
|
|
||||||
}
|
}
|
||||||
FlatPtr ip() const { return elr_el1; }
|
FlatPtr ip() const { return elr_el1; }
|
||||||
void set_ip(FlatPtr value)
|
void set_ip(FlatPtr value)
|
||||||
{
|
{
|
||||||
(void)value;
|
elr_el1 = value;
|
||||||
TODO_AARCH64();
|
|
||||||
}
|
}
|
||||||
FlatPtr bp() const { return x[29]; }
|
FlatPtr bp() const { return x[29]; }
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@ struct ThreadRegisters {
|
||||||
FlatPtr ip() const { return elr_el1; }
|
FlatPtr ip() const { return elr_el1; }
|
||||||
void set_ip(FlatPtr value) { elr_el1 = value; }
|
void set_ip(FlatPtr value) { elr_el1 = value; }
|
||||||
|
|
||||||
|
FlatPtr sp() const { return sp_el0; }
|
||||||
void set_sp(FlatPtr value) { sp_el0 = value; }
|
void set_sp(FlatPtr value) { sp_el0 = value; }
|
||||||
|
|
||||||
void set_initial_state(bool is_kernel_process, Memory::AddressSpace& space, FlatPtr kernel_stack_top)
|
void set_initial_state(bool is_kernel_process, Memory::AddressSpace& space, FlatPtr kernel_stack_top)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue