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