summaryrefslogtreecommitdiff
path: root/x86.h
diff options
context:
space:
mode:
authorFrans Kaashoek <[email protected]>2018-10-09 14:28:54 -0400
committerFrans Kaashoek <[email protected]>2018-10-09 14:28:54 -0400
commit54e6f829e4019e10734588b9ba63c2c186c94f8e (patch)
treec4fae7ef568183e9566d69fb6f563c218c12819b /x86.h
parentf241e67d911d790376de26698f8bf8ba02550212 (diff)
downloadxv6-labs-54e6f829e4019e10734588b9ba63c2c186c94f8e.tar.gz
xv6-labs-54e6f829e4019e10734588b9ba63c2c186c94f8e.tar.bz2
xv6-labs-54e6f829e4019e10734588b9ba63c2c186c94f8e.zip
Separate system call path from trap path. Passes usertests on 1 and 2 cpus.
Diffstat (limited to 'x86.h')
-rw-r--r--x86.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/x86.h b/x86.h
index 17bec0d..1ae64ac 100644
--- a/x86.h
+++ b/x86.h
@@ -166,6 +166,33 @@ struct trapframe {
uint64 ss;
}__attribute__((packed));
+struct sysframe {
+ // arguments
+ uint64 rdi;
+ uint64 rsi;
+ uint64 rdx;
+ uint64 r10;
+ uint64 r8;
+ uint64 r9;
+
+ // callee-saved registers
+ uint64 r15;
+ uint64 r14;
+ uint64 r13;
+ uint64 r12;
+ uint64 rbx;
+ uint64 rbp;
+
+ // return value
+ uint64 rax;
+
+ // syscall registers
+ uint64 r11; // eflags
+ uint64 rcx; // rip
+ uint64 rsp;
+
+}__attribute__((packed));
+
#endif
#define TF_CS 144 // offset in trapframe for saved cs