26 lines
708 B
C++
26 lines
708 B
C++
/*
|
|
* SyscallFrame.hpp
|
|
* aarch64 system-call frame (see Arch/Syscall.hpp)
|
|
* Copyright (c) 2026 Daniel Hammer
|
|
*/
|
|
|
|
#pragma once
|
|
#include <cstdint>
|
|
|
|
namespace Arch {
|
|
|
|
// The exception frame Vectors.S saves for `svc #0` (the same layout as
|
|
// Arch::PanicFrame): x0-x5 carry the arguments and x8 the system-call
|
|
// number; the result is written back to x0.
|
|
struct SyscallFrame {
|
|
uint64_t arg1, arg2, arg3, arg4, arg5, arg6; // x0-x5
|
|
uint64_t x6, x7;
|
|
uint64_t syscall_nr; // x8
|
|
uint64_t x9_x30[22];
|
|
uint64_t sp_el0, elr, spsr, esr, far;
|
|
};
|
|
|
|
static_assert(sizeof(SyscallFrame) == 288, "must match Vectors.S");
|
|
|
|
}
|