--- qemu/linux-user/i386/syscall.h 2018/04/24 16:37:52 1.1.1.1 +++ qemu/linux-user/i386/syscall.h 2018/04/24 16:48:17 1.1.1.2 @@ -25,13 +25,14 @@ struct target_pt_regs { #define TARGET_LDT_ENTRIES 8192 #define TARGET_LDT_ENTRY_SIZE 8 +#define TARGET_GDT_ENTRIES 9 #define TARGET_GDT_ENTRY_TLS_ENTRIES 3 #define TARGET_GDT_ENTRY_TLS_MIN 6 #define TARGET_GDT_ENTRY_TLS_MAX (TARGET_GDT_ENTRY_TLS_MIN + TARGET_GDT_ENTRY_TLS_ENTRIES - 1) struct target_modify_ldt_ldt_s { unsigned int entry_number; - target_ulong base_addr; + abi_ulong base_addr; unsigned int limit; unsigned int flags; }; @@ -79,22 +80,22 @@ struct target_vm86_regs { /* * normal regs, with special meaning for the segment descriptors.. */ - target_long ebx; - target_long ecx; - target_long edx; - target_long esi; - target_long edi; - target_long ebp; - target_long eax; - target_long __null_ds; - target_long __null_es; - target_long __null_fs; - target_long __null_gs; - target_long orig_eax; - target_long eip; + abi_long ebx; + abi_long ecx; + abi_long edx; + abi_long esi; + abi_long edi; + abi_long ebp; + abi_long eax; + abi_long __null_ds; + abi_long __null_es; + abi_long __null_fs; + abi_long __null_gs; + abi_long orig_eax; + abi_long eip; unsigned short cs, __csh; - target_long eflags; - target_long esp; + abi_long eflags; + abi_long esp; unsigned short ss, __ssh; /* * these are specific to v86 mode: @@ -106,14 +107,14 @@ struct target_vm86_regs { }; struct target_revectored_struct { - target_ulong __map[8]; /* 256 bits */ + abi_ulong __map[8]; /* 256 bits */ }; struct target_vm86_struct { struct target_vm86_regs regs; - target_ulong flags; - target_ulong screen_bitmap; - target_ulong cpu_type; + abi_ulong flags; + abi_ulong screen_bitmap; + abi_ulong cpu_type; struct target_revectored_struct int_revectored; struct target_revectored_struct int21_revectored; }; @@ -124,7 +125,7 @@ struct target_vm86_struct { #define TARGET_VM86_SCREEN_BITMAP 0x0001 struct target_vm86plus_info_struct { - target_ulong flags; + abi_ulong flags; #define TARGET_force_return_for_pic (1 << 0) #define TARGET_vm86dbg_active (1 << 1) /* for debugger */ #define TARGET_vm86dbg_TFpendig (1 << 2) /* for debugger */ @@ -134,88 +135,12 @@ struct target_vm86plus_info_struct { struct target_vm86plus_struct { struct target_vm86_regs regs; - target_ulong flags; - target_ulong screen_bitmap; - target_ulong cpu_type; + abi_ulong flags; + abi_ulong screen_bitmap; + abi_ulong cpu_type; struct target_revectored_struct int_revectored; struct target_revectored_struct int21_revectored; struct target_vm86plus_info_struct vm86plus; }; -/* ipcs */ - -#define TARGET_SEMOP 1 -#define TARGET_SEMGET 2 -#define TARGET_SEMCTL 3 -#define TARGET_MSGSND 11 -#define TARGET_MSGRCV 12 -#define TARGET_MSGGET 13 -#define TARGET_MSGCTL 14 -#define TARGET_SHMAT 21 -#define TARGET_SHMDT 22 -#define TARGET_SHMGET 23 -#define TARGET_SHMCTL 24 - -struct target_msgbuf { - int mtype; - char mtext[1]; -}; - -struct target_ipc_kludge { - unsigned int msgp; /* Really (struct msgbuf *) */ - int msgtyp; -}; - -struct target_ipc_perm { - int key; - unsigned short uid; - unsigned short gid; - unsigned short cuid; - unsigned short cgid; - unsigned short mode; - unsigned short seq; -}; - -struct target_msqid_ds { - struct target_ipc_perm msg_perm; - unsigned int msg_first; /* really struct target_msg* */ - unsigned int msg_last; /* really struct target_msg* */ - unsigned int msg_stime; /* really target_time_t */ - unsigned int msg_rtime; /* really target_time_t */ - unsigned int msg_ctime; /* really target_time_t */ - unsigned int wwait; /* really struct wait_queue* */ - unsigned int rwait; /* really struct wait_queue* */ - unsigned short msg_cbytes; - unsigned short msg_qnum; - unsigned short msg_qbytes; - unsigned short msg_lspid; - unsigned short msg_lrpid; -}; - -struct target_shmid_ds { - struct target_ipc_perm shm_perm; - int shm_segsz; - unsigned int shm_atime; /* really target_time_t */ - unsigned int shm_dtime; /* really target_time_t */ - unsigned int shm_ctime; /* really target_time_t */ - unsigned short shm_cpid; - unsigned short shm_lpid; - short shm_nattch; - unsigned short shm_npages; - unsigned long *shm_pages; - void *attaches; /* really struct shm_desc * */ -}; - -#define TARGET_IPC_RMID 0 -#define TARGET_IPC_SET 1 -#define TARGET_IPC_STAT 2 - -union target_semun { - int val; - unsigned int buf; /* really struct semid_ds * */ - unsigned int array; /* really unsigned short * */ - unsigned int __buf; /* really struct seminfo * */ - unsigned int __pad; /* really void* */ -}; - #define UNAME_MACHINE "i686"