1 /* default linux values for the selectors */
2 #define __USER_CS (0x23)
3 #define __USER_DS (0x2B)
5 struct target_pt_regs
{
25 #define TARGET_LDT_ENTRIES 8192
26 #define TARGET_LDT_ENTRY_SIZE 8
28 #define TARGET_GDT_ENTRY_TLS_ENTRIES 3
29 #define TARGET_GDT_ENTRY_TLS_MIN 6
30 #define TARGET_GDT_ENTRY_TLS_MAX (TARGET_GDT_ENTRY_TLS_MIN + TARGET_GDT_ENTRY_TLS_ENTRIES - 1)
32 struct target_modify_ldt_ldt_s
{
33 unsigned int entry_number
;
34 target_ulong base_addr
;
41 #define TARGET_BIOSSEG 0x0f000
43 #define TARGET_CPU_086 0
44 #define TARGET_CPU_186 1
45 #define TARGET_CPU_286 2
46 #define TARGET_CPU_386 3
47 #define TARGET_CPU_486 4
48 #define TARGET_CPU_586 5
50 #define TARGET_VM86_SIGNAL 0 /* return due to signal */
51 #define TARGET_VM86_UNKNOWN 1 /* unhandled GP fault - IO-instruction or similar */
52 #define TARGET_VM86_INTx 2 /* int3/int x instruction (ARG = x) */
53 #define TARGET_VM86_STI 3 /* sti/popf/iret instruction enabled virtual interrupts */
56 * Additional return values when invoking new vm86()
58 #define TARGET_VM86_PICRETURN 4 /* return due to pending PIC request */
59 #define TARGET_VM86_TRAP 6 /* return due to DOS-debugger request */
62 * function codes when invoking new vm86()
64 #define TARGET_VM86_PLUS_INSTALL_CHECK 0
65 #define TARGET_VM86_ENTER 1
66 #define TARGET_VM86_ENTER_NO_BYPASS 2
67 #define TARGET_VM86_REQUEST_IRQ 3
68 #define TARGET_VM86_FREE_IRQ 4
69 #define TARGET_VM86_GET_IRQ_BITS 5
70 #define TARGET_VM86_GET_AND_RESET_IRQ 6
73 * This is the stack-layout seen by the user space program when we have
74 * done a translation of "SAVE_ALL" from vm86 mode. The real kernel layout
75 * is 'kernel_vm86_regs' (see below).
78 struct target_vm86_regs
{
80 * normal regs, with special meaning for the segment descriptors..
89 target_long __null_ds
;
90 target_long __null_es
;
91 target_long __null_fs
;
92 target_long __null_gs
;
95 unsigned short cs
, __csh
;
98 unsigned short ss
, __ssh
;
100 * these are specific to v86 mode:
102 unsigned short es
, __esh
;
103 unsigned short ds
, __dsh
;
104 unsigned short fs
, __fsh
;
105 unsigned short gs
, __gsh
;
108 struct target_revectored_struct
{
109 target_ulong __map
[8]; /* 256 bits */
112 struct target_vm86_struct
{
113 struct target_vm86_regs regs
;
115 target_ulong screen_bitmap
;
116 target_ulong cpu_type
;
117 struct target_revectored_struct int_revectored
;
118 struct target_revectored_struct int21_revectored
;
124 #define TARGET_VM86_SCREEN_BITMAP 0x0001
126 struct target_vm86plus_info_struct
{
128 #define TARGET_force_return_for_pic (1 << 0)
129 #define TARGET_vm86dbg_active (1 << 1) /* for debugger */
130 #define TARGET_vm86dbg_TFpendig (1 << 2) /* for debugger */
131 #define TARGET_is_vm86pus (1 << 31) /* for vm86 internal use */
132 unsigned char vm86dbg_intxxtab
[32]; /* for debugger */
135 struct target_vm86plus_struct
{
136 struct target_vm86_regs regs
;
138 target_ulong screen_bitmap
;
139 target_ulong cpu_type
;
140 struct target_revectored_struct int_revectored
;
141 struct target_revectored_struct int21_revectored
;
142 struct target_vm86plus_info_struct vm86plus
;
147 #define TARGET_SEMOP 1
148 #define TARGET_SEMGET 2
149 #define TARGET_SEMCTL 3
150 #define TARGET_MSGSND 11
151 #define TARGET_MSGRCV 12
152 #define TARGET_MSGGET 13
153 #define TARGET_MSGCTL 14
154 #define TARGET_SHMAT 21
155 #define TARGET_SHMDT 22
156 #define TARGET_SHMGET 23
157 #define TARGET_SHMCTL 24
159 struct target_msgbuf
{
164 struct target_ipc_kludge
{
165 unsigned int msgp
; /* Really (struct msgbuf *) */
169 struct target_ipc_perm
{
179 struct target_msqid_ds
{
180 struct target_ipc_perm msg_perm
;
181 unsigned int msg_first
; /* really struct target_msg* */
182 unsigned int msg_last
; /* really struct target_msg* */
183 unsigned int msg_stime
; /* really target_time_t */
184 unsigned int msg_rtime
; /* really target_time_t */
185 unsigned int msg_ctime
; /* really target_time_t */
186 unsigned int wwait
; /* really struct wait_queue* */
187 unsigned int rwait
; /* really struct wait_queue* */
188 unsigned short msg_cbytes
;
189 unsigned short msg_qnum
;
190 unsigned short msg_qbytes
;
191 unsigned short msg_lspid
;
192 unsigned short msg_lrpid
;
195 struct target_shmid_ds
{
196 struct target_ipc_perm shm_perm
;
198 unsigned int shm_atime
; /* really target_time_t */
199 unsigned int shm_dtime
; /* really target_time_t */
200 unsigned int shm_ctime
; /* really target_time_t */
201 unsigned short shm_cpid
;
202 unsigned short shm_lpid
;
204 unsigned short shm_npages
;
205 unsigned long *shm_pages
;
206 void *attaches
; /* really struct shm_desc * */
209 #define TARGET_IPC_RMID 0
210 #define TARGET_IPC_SET 1
211 #define TARGET_IPC_STAT 2
215 unsigned int buf
; /* really struct semid_ds * */
216 unsigned int array
; /* really unsigned short * */
217 unsigned int __buf
; /* really struct seminfo * */
218 unsigned int __pad
; /* really void* */