diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/include/arch/amd64/frame.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/include/arch/amd64/frame.h b/sys/include/arch/amd64/frame.h index aaee45c..78c32f4 100644 --- a/sys/include/arch/amd64/frame.h +++ b/sys/include/arch/amd64/frame.h @@ -56,5 +56,13 @@ struct trapframe { uint64_t rsp; uint64_t ss; }; + +#define init_frame(FRAME, IP, SP) \ + (FRAME)->rip = IP; \ + (FRAME)->cs = 0x08; \ + (FRAME)->rflags = 0x202; \ + (FRAME)->rsp = SP; \ + (FRAME)->ss = 0x10; \ + #endif /* !defined(__ASSEMBLER__) */ #endif /* !_AMD64_FRAME_H_ */ |