diff --git a/.gitignore b/.gitignore index 9bf13f4..8f18ab8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ /var /src/boot/stand/ +/src/m1x/target/ *.o *.d *.sys diff --git a/src/m1x/Makefile b/src/m1x/Makefile index 5aa7da2..93d32fe 100644 --- a/src/m1x/Makefile +++ b/src/m1x/Makefile @@ -6,7 +6,12 @@ include ../mk/default.mk .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 kern: diff --git a/src/m1x/include/arch/x86_64/frame.h b/src/m1x/include/arch/x86_64/frame.h new file mode 100644 index 0000000..4fb4e10 --- /dev/null +++ b/src/m1x/include/arch/x86_64/frame.h @@ -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 +#include + +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_ */