Commit e32448e059adc8e6b31df483a679b399bc990e5a

Authored by j_mayer
1 parent e9b34b37

Various linux-user structures and definitions fixes for PowerPC targets.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3800 c046a42c-6fe2-441c-8c8c-71466251a162
linux-user/ppc/syscall.h
@@ -26,20 +26,24 @@ @@ -26,20 +26,24 @@
26 #define __USER_DS (1) 26 #define __USER_DS (1)
27 27
28 struct target_pt_regs { 28 struct target_pt_regs {
29 - unsigned long gpr[32];  
30 - unsigned long nip;  
31 - unsigned long msr;  
32 - unsigned long orig_gpr3; /* Used for restarting system calls */  
33 - unsigned long ctr;  
34 - unsigned long link;  
35 - unsigned long xer;  
36 - unsigned long ccr;  
37 - unsigned long mq; /* 601 only (not used at present) */ 29 + abi_ulong gpr[32];
  30 + abi_ulong nip;
  31 + abi_ulong msr;
  32 + abi_ulong orig_gpr3; /* Used for restarting system calls */
  33 + abi_ulong ctr;
  34 + abi_ulong link;
  35 + abi_ulong xer;
  36 + abi_ulong ccr;
  37 +#if defined(TARGET_PPC64) && !defined(TARGET_ABI32)
  38 + abi_ulong softe;
  39 +#else
  40 + abi_ulong mq; /* 601 only (not used at present) */
  41 +#endif
38 /* Used on APUS to hold IPL value. */ 42 /* Used on APUS to hold IPL value. */
39 - unsigned long trap; /* Reason for being here */  
40 - unsigned long dar; /* Fault registers */  
41 - unsigned long dsisr;  
42 - unsigned long result; /* Result of a system call */ 43 + abi_ulong trap; /* Reason for being here */
  44 + abi_ulong dar; /* Fault registers */
  45 + abi_ulong dsisr;
  46 + abi_ulong result; /* Result of a system call */
43 }; 47 };
44 48
45 /* ioctls */ 49 /* ioctls */
linux-user/ppc/target_signal.h
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 7
8 typedef struct target_sigaltstack { 8 typedef struct target_sigaltstack {
9 abi_ulong ss_sp; 9 abi_ulong ss_sp;
10 - abi_long ss_flags; 10 + int ss_flags;
11 abi_ulong ss_size; 11 abi_ulong ss_size;
12 } target_stack_t; 12 } target_stack_t;
13 13
linux-user/socket.h
@@ -109,12 +109,21 @@ @@ -109,12 +109,21 @@
109 #define TARGET_SO_LINGER 13 109 #define TARGET_SO_LINGER 13
110 #define TARGET_SO_BSDCOMPAT 14 110 #define TARGET_SO_BSDCOMPAT 14
111 /* To add :#define TARGET_SO_REUSEPORT 15 */ 111 /* To add :#define TARGET_SO_REUSEPORT 15 */
  112 +#if defined(TARGET_PPC)
  113 + #define TARGET_SO_RCVLOWAT 16
  114 + #define TARGET_SO_SNDLOWAT 17
  115 + #define TARGET_SO_RCVTIMEO 18
  116 + #define TARGET_SO_SNDTIMEO 19
  117 + #define TARGET_SO_PASSCRED 20
  118 + #define TARGET_SO_PEERCRED 21
  119 +#else
112 #define TARGET_SO_PASSCRED 16 120 #define TARGET_SO_PASSCRED 16
113 #define TARGET_SO_PEERCRED 17 121 #define TARGET_SO_PEERCRED 17
114 #define TARGET_SO_RCVLOWAT 18 122 #define TARGET_SO_RCVLOWAT 18
115 #define TARGET_SO_SNDLOWAT 19 123 #define TARGET_SO_SNDLOWAT 19
116 #define TARGET_SO_RCVTIMEO 20 124 #define TARGET_SO_RCVTIMEO 20
117 #define TARGET_SO_SNDTIMEO 21 125 #define TARGET_SO_SNDTIMEO 21
  126 +#endif
118 127
119 /* Security levels - as per NRL IPv6 - don't actually do anything */ 128 /* Security levels - as per NRL IPv6 - don't actually do anything */
120 #define TARGET_SO_SECURITY_AUTHENTICATION 22 129 #define TARGET_SO_SECURITY_AUTHENTICATION 22
linux-user/syscall_defs.h
@@ -1086,10 +1086,10 @@ struct target_stat64 { @@ -1086,10 +1086,10 @@ struct target_stat64 {
1086 #elif defined(TARGET_PPC) 1086 #elif defined(TARGET_PPC)
1087 1087
1088 struct target_stat { 1088 struct target_stat {
1089 - unsigned short st_dev; 1089 + abi_ulong st_dev;
1090 abi_ulong st_ino; 1090 abi_ulong st_ino;
1091 #if defined(TARGET_PPC64) && !defined(TARGET_ABI32) 1091 #if defined(TARGET_PPC64) && !defined(TARGET_ABI32)
1092 - unsigned short st_nlink; 1092 + abi_ulong st_nlink;
1093 unsigned int st_mode; 1093 unsigned int st_mode;
1094 #else 1094 #else
1095 unsigned int st_mode; 1095 unsigned int st_mode;
@@ -1097,16 +1097,16 @@ struct target_stat { @@ -1097,16 +1097,16 @@ struct target_stat {
1097 #endif 1097 #endif
1098 unsigned int st_uid; 1098 unsigned int st_uid;
1099 unsigned int st_gid; 1099 unsigned int st_gid;
1100 - unsigned short st_rdev; 1100 + abi_ulong st_rdev;
1101 abi_ulong st_size; 1101 abi_ulong st_size;
1102 abi_ulong st_blksize; 1102 abi_ulong st_blksize;
1103 abi_ulong st_blocks; 1103 abi_ulong st_blocks;
1104 abi_ulong target_st_atime; 1104 abi_ulong target_st_atime;
1105 - abi_ulong __unused1; 1105 + abi_ulong target_st_atime_nsec;
1106 abi_ulong target_st_mtime; 1106 abi_ulong target_st_mtime;
1107 - abi_ulong __unused2; 1107 + abi_ulong target_st_mtime_nsec;
1108 abi_ulong target_st_ctime; 1108 abi_ulong target_st_ctime;
1109 - abi_ulong __unused3; 1109 + abi_ulong target_st_ctime_nsec;
1110 abi_ulong __unused4; 1110 abi_ulong __unused4;
1111 abi_ulong __unused5; 1111 abi_ulong __unused5;
1112 #if defined(TARGET_PPC64) && !defined(TARGET_ABI32) 1112 #if defined(TARGET_PPC64) && !defined(TARGET_ABI32)
@@ -1122,19 +1122,18 @@ struct target_stat64 { @@ -1122,19 +1122,18 @@ struct target_stat64 {
1122 unsigned int st_uid; 1122 unsigned int st_uid;
1123 unsigned int st_gid; 1123 unsigned int st_gid;
1124 unsigned long long st_rdev; 1124 unsigned long long st_rdev;
1125 - long long pad0;  
1126 - long long st_size;  
1127 - abi_ulong st_blksize;  
1128 - abi_ulong pad1;  
1129 - long long st_blocks; /* Number 512-byte blocks allocated. */  
1130 - abi_ulong target_st_atime;  
1131 - abi_ulong target_st_atime_nsec;  
1132 - abi_ulong target_st_mtime;  
1133 - abi_ulong target_st_mtime_nsec;  
1134 - abi_ulong target_st_ctime;  
1135 - abi_ulong target_st_ctime_nsec;  
1136 - abi_ulong __unused4;  
1137 - abi_ulong __unused5; 1125 + unsigned short pad0;
  1126 + long long st_size;
  1127 + int st_blksize;
  1128 + long long st_blocks; /* Number 512-byte blocks allocated. */
  1129 + int target_st_atime;
  1130 + unsigned int target_st_atime_nsec;
  1131 + int target_st_mtime;
  1132 + unsigned int target_st_mtime_nsec;
  1133 + int target_st_ctime;
  1134 + unsigned int target_st_ctime_nsec;
  1135 + unsigned int __unused4;
  1136 + unsigned int __unused5;
1138 }; 1137 };
1139 1138
1140 #elif defined(TARGET_M68K) 1139 #elif defined(TARGET_M68K)