summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimon Kruiper <timonkruiper@gmail.com>2023-01-25 16:02:11 +0100
committerLinus Groh <mail@linusgroh.de>2023-01-27 20:47:08 +0000
commitcab725cdfb69669699c2dc80cb329622970531b2 (patch)
tree154ca86555563f494a1a6ec668cdabe7788d579c
parent293ece6fad67a7201a160b501d2a8dd8841404f7 (diff)
downloadserenity-cab725cdfb69669699c2dc80cb329622970531b2.zip
Kernel/aarch64: Implement set_return_reg and capture_syscall_params
-rw-r--r--Kernel/Arch/aarch64/RegisterState.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/Kernel/Arch/aarch64/RegisterState.h b/Kernel/Arch/aarch64/RegisterState.h
index 6aa6e4452f..14b0fdaaed 100644
--- a/Kernel/Arch/aarch64/RegisterState.h
+++ b/Kernel/Arch/aarch64/RegisterState.h
@@ -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)