From a29318d24bcb7b1748012342a8c1bee5d9769746 Mon Sep 17 00:00:00 2001 From: Chloe M Date: Fri, 10 Jul 2026 22:08:09 -0400 Subject: [PATCH] ptos/amd64: Add trapframe defs Signed-off-by: Chloe M --- service/ptos/head/arch/amd64/frame.h | 40 ++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 service/ptos/head/arch/amd64/frame.h diff --git a/service/ptos/head/arch/amd64/frame.h b/service/ptos/head/arch/amd64/frame.h new file mode 100644 index 0000000..6bf6e80 --- /dev/null +++ b/service/ptos/head/arch/amd64/frame.h @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2026, Chloe M. + * Provided under the BSD-3 clause. + * + * Description: AMD64 trapframe + * Author: Chloe M. + */ + +#ifndef _MACHINE_FRAME_H_ +#define _MACHINE_FRAME_H_ 1 + +#include + +typedef struct PACKED { + UQUAD Vector; + UQUAD Rax; + UQUAD Rbx; + UQUAD Rcx; + UQUAD Rdx; + UQUAD Rsi; + UQUAD Rdi; + UQUAD Rbp; + UQUAD R8; + UQUAD R9; + UQUAD R10; + UQUAD R11; + UQUAD R12; + UQUAD R13; + UQUAD R14; + UQUAD R15; + /* Pushed by hardawre */ + UQUAD ErrorCode; + UQUAD Rip; + UQUAD CodeSeg; + UQUAD Rflags; + UQUAD Rsp; + UQUAD StackSeg; +} TRAP_FRAME; + +#endif /* !_MACHINE_FRAME_H_ */