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