diff options
author | Ian Moffett <ian@osmora.org> | 2024-03-17 20:59:31 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-03-17 20:59:31 -0400 |
commit | 0776264c266e7c1619b8b8b84d2da5384979bb3c (patch) | |
tree | 80b6ded012336e24c72cc2c16e4c3ce952b7b739 /sys/include/arch/amd64/frame.h | |
parent | 7895aaff402a021a1b04645ca8d251f760e5662e (diff) | |
parent | 2896f4126de2ee0fd1bab4b960bfb2213c359f18 (diff) |
Merge branch 'user' into dev
Diffstat (limited to 'sys/include/arch/amd64/frame.h')
-rw-r--r-- | sys/include/arch/amd64/frame.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/include/arch/amd64/frame.h b/sys/include/arch/amd64/frame.h index a2e1a05..298a836 100644 --- a/sys/include/arch/amd64/frame.h +++ b/sys/include/arch/amd64/frame.h @@ -67,5 +67,12 @@ struct trapframe { (FRAME)->rsp = SP; \ (FRAME)->ss = 0x10; \ +#define init_frame_user(FRAME, IP, SP) \ + (FRAME)->rip = IP; \ + (FRAME)->cs = 0x18 | 3; \ + (FRAME)->rflags = 0x202; \ + (FRAME)->rsp = SP; \ + (FRAME)->ss = 0x20 | 3; \ + #endif /* !defined(__ASSEMBLER__) */ #endif /* !_AMD64_FRAME_H_ */ |