master
h 79 lines 1.97 KB
Raw
1 #ifndef X86_64_TARGET_SYSCALL_H
2 #define X86_64_TARGET_SYSCALL_H
3
4 #define __USER_CS (0x33)
5 #define __USER_DS (0x2B)
6
7 /* Maximum number of LDT entries supported. */
8 #define TARGET_LDT_ENTRIES 8192
9 /* The size of each LDT entry. */
10 #define TARGET_LDT_ENTRY_SIZE 8
11
12 #define TARGET_GDT_ENTRIES 16
13 #define TARGET_GDT_ENTRY_TLS_ENTRIES 3
14 #define TARGET_GDT_ENTRY_TLS_MIN 12
15 #define TARGET_GDT_ENTRY_TLS_MAX 14
16
17 #if 0 // Redefine this
18 struct target_modify_ldt_ldt_s {
19 unsigned int entry_number;
20 abi_ulong base_addr;
21 unsigned int limit;
22 unsigned int seg_32bit:1;
23 unsigned int contents:2;
24 unsigned int read_exec_only:1;
25 unsigned int limit_in_pages:1;
26 unsigned int seg_not_present:1;
27 unsigned int useable:1;
28 unsigned int lm:1;
29 };
30 #else
31 struct target_modify_ldt_ldt_s {
32 unsigned int entry_number;
33 abi_ulong base_addr;
34 unsigned int limit;
35 unsigned int flags;
36 };
37 #endif
38
39 struct target_ipc64_perm
40 {
41 int key;
42 uint32_t uid;
43 uint32_t gid;
44 uint32_t cuid;
45 uint32_t cgid;
46 unsigned short mode;
47 unsigned short __pad1;
48 unsigned short seq;
49 unsigned short __pad2;
50 abi_ulong __unused1;
51 abi_ulong __unused2;
52 };
53
54 struct target_msqid64_ds {
55 struct target_ipc64_perm msg_perm;
56 unsigned int msg_stime; /* last msgsnd time */
57 unsigned int msg_rtime; /* last msgrcv time */
58 unsigned int msg_ctime; /* last change time */
59 abi_ulong msg_cbytes; /* current number of bytes on queue */
60 abi_ulong msg_qnum; /* number of messages in queue */
61 abi_ulong msg_qbytes; /* max number of bytes on queue */
62 unsigned int msg_lspid; /* pid of last msgsnd */
63 unsigned int msg_lrpid; /* last receive pid */
64 abi_ulong __unused4;
65 abi_ulong __unused5;
66 };
67
68 #define UNAME_MACHINE "x86_64"
69 #define UNAME_MINIMUM_RELEASE "2.6.32"
70
71 #define TARGET_ARCH_SET_GS 0x1001
72 #define TARGET_ARCH_SET_FS 0x1002
73 #define TARGET_ARCH_GET_FS 0x1003
74 #define TARGET_ARCH_GET_GS 0x1004
75 #define TARGET_MCL_CURRENT 1
76 #define TARGET_MCL_FUTURE 2
77 #define TARGET_MCL_ONFAULT 4
78
79 #endif /* X86_64_TARGET_SYSCALL_H */