1 #ifndef TARGET_SYSCALL_H
2 #define TARGET_SYSCALL_H
4 #define __USER_CS (0x33)
5 #define __USER_DS (0x2B)
7 struct target_pt_regs
{
14 /* arguments: non interrupts/non tracing syscalls only save up to here */
25 /* end of arguments */
26 /* cpu exception frame or undefined */
32 /* top of stack page */
35 /* Maximum number of LDT entries supported. */
36 #define TARGET_LDT_ENTRIES 8192
37 /* The size of each LDT entry. */
38 #define TARGET_LDT_ENTRY_SIZE 8
40 #define TARGET_GDT_ENTRIES 16
41 #define TARGET_GDT_ENTRY_TLS_ENTRIES 3
42 #define TARGET_GDT_ENTRY_TLS_MIN 12
43 #define TARGET_GDT_ENTRY_TLS_MAX 14
45 #if 0 // Redefine this
46 struct target_modify_ldt_ldt_s
{
47 unsigned int entry_number
;
50 unsigned int seg_32bit
:1;
51 unsigned int contents
:2;
52 unsigned int read_exec_only
:1;
53 unsigned int limit_in_pages
:1;
54 unsigned int seg_not_present
:1;
55 unsigned int useable
:1;
59 struct target_modify_ldt_ldt_s
{
60 unsigned int entry_number
;
67 struct target_ipc64_perm
75 unsigned short __pad1
;
77 unsigned short __pad2
;
82 struct target_msqid64_ds
{
83 struct target_ipc64_perm msg_perm
;
84 unsigned int msg_stime
; /* last msgsnd time */
85 unsigned int msg_rtime
; /* last msgrcv time */
86 unsigned int msg_ctime
; /* last change time */
87 abi_ulong msg_cbytes
; /* current number of bytes on queue */
88 abi_ulong msg_qnum
; /* number of messages in queue */
89 abi_ulong msg_qbytes
; /* max number of bytes on queue */
90 unsigned int msg_lspid
; /* pid of last msgsnd */
91 unsigned int msg_lrpid
; /* last receive pid */
96 /* FreeBSD sysarch(2) */
97 #define TARGET_FREEBSD_I386_GET_LDT 0
98 #define TARGET_FREEBSD_I386_SET_LDT 1
100 #define TARGET_FREEBSD_I386_GET_IOPERM 3
101 #define TARGET_FREEBSD_I386_SET_IOPERM 4
103 #define TARGET_FREEBSD_I386_GET_FSBASE 7
104 #define TARGET_FREEBSD_I386_SET_FSBASE 8
105 #define TARGET_FREEBSD_I386_GET_GSBASE 9
106 #define TARGET_FREEBSD_I386_SET_GSBASE 10
108 #define TARGET_FREEBSD_AMD64_GET_FSBASE 128
109 #define TARGET_FREEBSD_AMD64_SET_FSBASE 129
110 #define TARGET_FREEBSD_AMD64_GET_GSBASE 130
111 #define TARGET_FREEBSD_AMD64_SET_GSBASE 131
114 #define UNAME_MACHINE "x86_64"
116 #define TARGET_ARCH_SET_GS 0x1001
117 #define TARGET_ARCH_SET_FS 0x1002
118 #define TARGET_ARCH_GET_FS 0x1003
119 #define TARGET_ARCH_GET_GS 0x1004
121 #endif /* TARGET_SYSCALL_H */