m1x/x86_64: Add trapframe structure

Signed-off-by: Ian Moffett <ian@mirocom.org>
This commit is contained in:
2026-03-25 10:00:05 -04:00
parent c90d339586
commit c5ccf84bfe
3 changed files with 45 additions and 1 deletions

1
.gitignore vendored
View File

@@ -1,5 +1,6 @@
/var /var
/src/boot/stand/ /src/boot/stand/
/src/m1x/target/
*.o *.o
*.d *.d
*.sys *.sys

View File

@@ -6,7 +6,12 @@
include ../mk/default.mk include ../mk/default.mk
.PHONY: all .PHONY: all
all: kern arch all: target kern arch
.PHONY: target
target:
mkdir -p target/machine/
rsync -avr include/arch/$(ARCH_TARGET)/*.h target/machine/
.PHONY: kern .PHONY: kern
kern: kern:

View File

@@ -0,0 +1,38 @@
/*
* Copyright (c) 2026, Mirocom Laboratories
* Provided under the BSD-3 clause
*/
#ifndef _MACHINE_FRAME_H_
#define _MACHINE_FRAME_H_ 1
#include <sys/types.h>
#include <sys/cdefs.h>
struct __packed trapframe {
/* Pushed by us */
uint64_t r8;
uint64_t r9;
uint64_t r10;
uint64_t r11;
uint64_t r12;
uint64_t r13;
uint64_t r14;
uint64_t r15;
uint64_t rbx;
uint64_t rbp;
uint64_t rax;
uint64_t rdx;
uint64_t rcx;
uint64_t rdi;
uint64_t rsi;
/* 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_ */