mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 21:57:35 +00:00
Kernel/aarch64: Implement set_return_reg and capture_syscall_params
This commit is contained in:
parent
293ece6fad
commit
cab725cdfb
1 changed files with 10 additions and 0 deletions
|
@ -40,6 +40,16 @@ struct RegisterState {
|
|||
{
|
||||
return ((spsr_el1 & 0b1111) == 0) ? ExecutionMode::User : ExecutionMode::Kernel;
|
||||
}
|
||||
|
||||
void set_return_reg(FlatPtr value) { x[0] = value; }
|
||||
void capture_syscall_params(FlatPtr& function, FlatPtr& arg1, FlatPtr& arg2, FlatPtr& arg3, FlatPtr& arg4) const
|
||||
{
|
||||
function = x[8];
|
||||
arg1 = x[1];
|
||||
arg2 = x[2];
|
||||
arg3 = x[3];
|
||||
arg4 = x[4];
|
||||
}
|
||||
};
|
||||
|
||||
inline void copy_kernel_registers_into_ptrace_registers(PtraceRegisters& ptrace_regs, RegisterState const& kernel_regs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue