Properly implement non-execute bit on PowerPC segments and PTEs.
[qemu] / linux-user / x86_64 / syscall.h
1 #define __USER_CS       (0x33)
2 #define __USER_DS       (0x2B)
3
4 struct target_pt_regs {
5         target_ulong r15;
6         target_ulong r14;
7         target_ulong r13;
8         target_ulong r12;
9         target_ulong rbp;
10         target_ulong rbx;
11 /* arguments: non interrupts/non tracing syscalls only save upto here*/
12         target_ulong r11;
13         target_ulong r10;
14         target_ulong r9;
15         target_ulong r8;
16         target_ulong rax;
17         target_ulong rcx;
18         target_ulong rdx;
19         target_ulong rsi;
20         target_ulong rdi;
21         target_ulong orig_rax;
22 /* end of arguments */
23 /* cpu exception frame or undefined */
24         target_ulong rip;
25         target_ulong cs;
26         target_ulong eflags;
27         target_ulong rsp;
28         target_ulong ss;
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
37 #define TARGET_GDT_ENTRY_TLS_ENTRIES 3
38 #define TARGET_GDT_ENTRY_TLS_MIN 12
39 #define TARGET_GDT_ENTRY_TLS_MAX 14
40
41 #if 0 // Redefine this
42 struct target_modify_ldt_ldt_s {
43         unsigned int  entry_number;
44         target_ulong  base_addr;
45         unsigned int  limit;
46         unsigned int  seg_32bit:1;
47         unsigned int  contents:2;
48         unsigned int  read_exec_only:1;
49         unsigned int  limit_in_pages:1;
50         unsigned int  seg_not_present:1;
51         unsigned int  useable:1;
52         unsigned int  lm:1;
53 };
54 #else
55 struct target_modify_ldt_ldt_s {
56         unsigned int  entry_number;
57         target_ulong  base_addr;
58         unsigned int  limit;
59         unsigned int flags;
60 };
61 #endif
62
63 struct target_ipc64_perm
64 {
65         int             key;
66         uint32_t        uid;
67         uint32_t        gid;
68         uint32_t        cuid;
69         uint32_t        cgid;
70         unsigned short          mode;
71         unsigned short          __pad1;
72         unsigned short          seq;
73         unsigned short          __pad2;
74         target_ulong            __unused1;
75         target_ulong            __unused2;
76 };
77
78 struct target_msqid64_ds {
79         struct target_ipc64_perm msg_perm;
80         unsigned int msg_stime; /* last msgsnd time */
81         unsigned int msg_rtime; /* last msgrcv time */
82         unsigned int msg_ctime; /* last change time */
83         target_ulong  msg_cbytes;       /* current number of bytes on queue */
84         target_ulong  msg_qnum; /* number of messages in queue */
85         target_ulong  msg_qbytes;       /* max number of bytes on queue */
86         unsigned int msg_lspid; /* pid of last msgsnd */
87         unsigned int msg_lrpid; /* last receive pid */
88         target_ulong  __unused4;
89         target_ulong  __unused5;
90 };
91
92 #define UNAME_MACHINE "x86_64"