From cd7c110d2c21ad6ce0d3559a03baaca67afd820a Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Fri, 17 Apr 2026 19:26:45 -0400 Subject: [PATCH] sp1/amd64: Add frame.h Signed-off-by: Ian Moffett --- usr/src/sp1/head/amd64/frame.h | 49 ++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 usr/src/sp1/head/amd64/frame.h diff --git a/usr/src/sp1/head/amd64/frame.h b/usr/src/sp1/head/amd64/frame.h new file mode 100644 index 0000000..545db2c --- /dev/null +++ b/usr/src/sp1/head/amd64/frame.h @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2026, Mirocom Laboratories + * All rights reserved. + * + * The following sources are CONFIDENTIAL and PROPRIETARY + * property of Mirocom Laboratories. Unauthorized copying, + * use, distribution or modification of this file, in whole + * and in part, is strictly prohibited without the prior written + * consent from Mirocom Laboratories. + */ + +#ifndef _MACHINE_FRAME_H_ +#define _MACHINE_FRAME_H_ 1 + +#include +#include + +/* + * A trapframe holds the processor register state during + * an interrupt. + */ +struct __packed trapframe { + /* Pushed by us */ + uint64_t vector;; + uint64_t rax; + uint64_t rbx; + uint64_t rcx; + uint64_t rdx; + uint64_t rsi; + uint64_t rdi; + uint64_t rbp; + uint64_t r8; + uint64_t r9; + uint64_t r10; + uint64_t r11; + uint64_t r12; + uint64_t r13; + uint64_t r14; + uint64_t r15; + /* Pushed by hardware */ + uint64_t error_code; + uint64_t rip; + uint64_t cs; + uint64_t rflags; + uint64_t rsp; + uint64_t ss; +}; + +#endif /* !_MACHINE_FRAME_H_ */