root / bsd-user / x86_64 / syscall.h @ f4918804
History | View | Annotate | Download (2.8 kB)
1 | 31fc12df | blueswir1 | #define __USER_CS (0x33) |
---|---|---|---|
2 | 31fc12df | blueswir1 | #define __USER_DS (0x2B) |
3 | 31fc12df | blueswir1 | |
4 | 31fc12df | blueswir1 | struct target_pt_regs {
|
5 | 31fc12df | blueswir1 | abi_ulong r15; |
6 | 31fc12df | blueswir1 | abi_ulong r14; |
7 | 31fc12df | blueswir1 | abi_ulong r13; |
8 | 31fc12df | blueswir1 | abi_ulong r12; |
9 | 31fc12df | blueswir1 | abi_ulong rbp; |
10 | 31fc12df | blueswir1 | abi_ulong rbx; |
11 | 31fc12df | blueswir1 | /* arguments: non interrupts/non tracing syscalls only save upto here*/
|
12 | 31fc12df | blueswir1 | abi_ulong r11; |
13 | 31fc12df | blueswir1 | abi_ulong r10; |
14 | 31fc12df | blueswir1 | abi_ulong r9; |
15 | 31fc12df | blueswir1 | abi_ulong r8; |
16 | 31fc12df | blueswir1 | abi_ulong rax; |
17 | 31fc12df | blueswir1 | abi_ulong rcx; |
18 | 31fc12df | blueswir1 | abi_ulong rdx; |
19 | 31fc12df | blueswir1 | abi_ulong rsi; |
20 | 31fc12df | blueswir1 | abi_ulong rdi; |
21 | 31fc12df | blueswir1 | abi_ulong orig_rax; |
22 | 31fc12df | blueswir1 | /* end of arguments */
|
23 | 31fc12df | blueswir1 | /* cpu exception frame or undefined */
|
24 | 31fc12df | blueswir1 | abi_ulong rip; |
25 | 31fc12df | blueswir1 | abi_ulong cs; |
26 | 31fc12df | blueswir1 | abi_ulong eflags; |
27 | 31fc12df | blueswir1 | abi_ulong rsp; |
28 | 31fc12df | blueswir1 | abi_ulong ss; |
29 | 31fc12df | blueswir1 | /* top of stack page */
|
30 | 31fc12df | blueswir1 | }; |
31 | 31fc12df | blueswir1 | |
32 | 31fc12df | blueswir1 | /* Maximum number of LDT entries supported. */
|
33 | 31fc12df | blueswir1 | #define TARGET_LDT_ENTRIES 8192 |
34 | 31fc12df | blueswir1 | /* The size of each LDT entry. */
|
35 | 31fc12df | blueswir1 | #define TARGET_LDT_ENTRY_SIZE 8 |
36 | 31fc12df | blueswir1 | |
37 | 31fc12df | blueswir1 | #define TARGET_GDT_ENTRIES 16 |
38 | 31fc12df | blueswir1 | #define TARGET_GDT_ENTRY_TLS_ENTRIES 3 |
39 | 31fc12df | blueswir1 | #define TARGET_GDT_ENTRY_TLS_MIN 12 |
40 | 31fc12df | blueswir1 | #define TARGET_GDT_ENTRY_TLS_MAX 14 |
41 | 31fc12df | blueswir1 | |
42 | 31fc12df | blueswir1 | #if 0 // Redefine this
|
43 | 31fc12df | blueswir1 | struct target_modify_ldt_ldt_s {
|
44 | 31fc12df | blueswir1 | unsigned int entry_number;
|
45 | 31fc12df | blueswir1 | abi_ulong base_addr;
|
46 | 31fc12df | blueswir1 | unsigned int limit;
|
47 | 31fc12df | blueswir1 | unsigned int seg_32bit:1;
|
48 | 31fc12df | blueswir1 | unsigned int contents:2;
|
49 | 31fc12df | blueswir1 | unsigned int read_exec_only:1;
|
50 | 31fc12df | blueswir1 | unsigned int limit_in_pages:1;
|
51 | 31fc12df | blueswir1 | unsigned int seg_not_present:1;
|
52 | 31fc12df | blueswir1 | unsigned int useable:1;
|
53 | 31fc12df | blueswir1 | unsigned int lm:1;
|
54 | 31fc12df | blueswir1 | };
|
55 | 31fc12df | blueswir1 | #else
|
56 | 31fc12df | blueswir1 | struct target_modify_ldt_ldt_s {
|
57 | 31fc12df | blueswir1 | unsigned int entry_number; |
58 | 31fc12df | blueswir1 | abi_ulong base_addr; |
59 | 31fc12df | blueswir1 | unsigned int limit; |
60 | 31fc12df | blueswir1 | unsigned int flags; |
61 | 31fc12df | blueswir1 | }; |
62 | 31fc12df | blueswir1 | #endif
|
63 | 31fc12df | blueswir1 | |
64 | 31fc12df | blueswir1 | struct target_ipc64_perm
|
65 | 31fc12df | blueswir1 | { |
66 | 31fc12df | blueswir1 | int key;
|
67 | 31fc12df | blueswir1 | uint32_t uid; |
68 | 31fc12df | blueswir1 | uint32_t gid; |
69 | 31fc12df | blueswir1 | uint32_t cuid; |
70 | 31fc12df | blueswir1 | uint32_t cgid; |
71 | 31fc12df | blueswir1 | unsigned short mode; |
72 | 31fc12df | blueswir1 | unsigned short __pad1; |
73 | 31fc12df | blueswir1 | unsigned short seq; |
74 | 31fc12df | blueswir1 | unsigned short __pad2; |
75 | 31fc12df | blueswir1 | abi_ulong __unused1; |
76 | 31fc12df | blueswir1 | abi_ulong __unused2; |
77 | 31fc12df | blueswir1 | }; |
78 | 31fc12df | blueswir1 | |
79 | 31fc12df | blueswir1 | struct target_msqid64_ds {
|
80 | 31fc12df | blueswir1 | struct target_ipc64_perm msg_perm;
|
81 | 31fc12df | blueswir1 | unsigned int msg_stime; /* last msgsnd time */ |
82 | 31fc12df | blueswir1 | unsigned int msg_rtime; /* last msgrcv time */ |
83 | 31fc12df | blueswir1 | unsigned int msg_ctime; /* last change time */ |
84 | 31fc12df | blueswir1 | abi_ulong msg_cbytes; /* current number of bytes on queue */
|
85 | 31fc12df | blueswir1 | abi_ulong msg_qnum; /* number of messages in queue */
|
86 | 31fc12df | blueswir1 | abi_ulong msg_qbytes; /* max number of bytes on queue */
|
87 | 31fc12df | blueswir1 | unsigned int msg_lspid; /* pid of last msgsnd */ |
88 | 31fc12df | blueswir1 | unsigned int msg_lrpid; /* last receive pid */ |
89 | 31fc12df | blueswir1 | abi_ulong __unused4; |
90 | 31fc12df | blueswir1 | abi_ulong __unused5; |
91 | 31fc12df | blueswir1 | }; |
92 | 31fc12df | blueswir1 | |
93 | 78cfb07f | Juergen Lock | /* FreeBSD sysarch(2) */
|
94 | 78cfb07f | Juergen Lock | #define TARGET_FREEBSD_I386_GET_LDT 0 |
95 | 78cfb07f | Juergen Lock | #define TARGET_FREEBSD_I386_SET_LDT 1 |
96 | 78cfb07f | Juergen Lock | /* I386_IOPL */
|
97 | 78cfb07f | Juergen Lock | #define TARGET_FREEBSD_I386_GET_IOPERM 3 |
98 | 78cfb07f | Juergen Lock | #define TARGET_FREEBSD_I386_SET_IOPERM 4 |
99 | 78cfb07f | Juergen Lock | /* xxxxx */
|
100 | 78cfb07f | Juergen Lock | #define TARGET_FREEBSD_I386_GET_FSBASE 7 |
101 | 78cfb07f | Juergen Lock | #define TARGET_FREEBSD_I386_SET_FSBASE 8 |
102 | 78cfb07f | Juergen Lock | #define TARGET_FREEBSD_I386_GET_GSBASE 9 |
103 | 78cfb07f | Juergen Lock | #define TARGET_FREEBSD_I386_SET_GSBASE 10 |
104 | 78cfb07f | Juergen Lock | |
105 | 78cfb07f | Juergen Lock | #define TARGET_FREEBSD_AMD64_GET_FSBASE 128 |
106 | 78cfb07f | Juergen Lock | #define TARGET_FREEBSD_AMD64_SET_FSBASE 129 |
107 | 78cfb07f | Juergen Lock | #define TARGET_FREEBSD_AMD64_GET_GSBASE 130 |
108 | 78cfb07f | Juergen Lock | #define TARGET_FREEBSD_AMD64_SET_GSBASE 131 |
109 | 78cfb07f | Juergen Lock | |
110 | 78cfb07f | Juergen Lock | |
111 | 31fc12df | blueswir1 | #define UNAME_MACHINE "x86_64" |
112 | 31fc12df | blueswir1 | |
113 | 31fc12df | blueswir1 | #define TARGET_ARCH_SET_GS 0x1001 |
114 | 31fc12df | blueswir1 | #define TARGET_ARCH_SET_FS 0x1002 |
115 | 31fc12df | blueswir1 | #define TARGET_ARCH_GET_FS 0x1003 |
116 | 31fc12df | blueswir1 | #define TARGET_ARCH_GET_GS 0x1004 |