Skip to content

Commit e32448e

Browse files
author
j_mayer
committed
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
1 parent e9b34b3 commit e32448e

File tree

4 files changed

+45
-33
lines changed

4 files changed

+45
-33
lines changed

linux-user/ppc/syscall.h

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,24 @@
2626
#define __USER_DS (1)
2727

2828
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
3842
/* 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 */
4347
};
4448

4549
/* ioctls */

linux-user/ppc/target_signal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
typedef struct target_sigaltstack {
99
abi_ulong ss_sp;
10-
abi_long ss_flags;
10+
int ss_flags;
1111
abi_ulong ss_size;
1212
} target_stack_t;
1313

linux-user/socket.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,21 @@
109109
#define TARGET_SO_LINGER 13
110110
#define TARGET_SO_BSDCOMPAT 14
111111
/* 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
112120
#define TARGET_SO_PASSCRED 16
113121
#define TARGET_SO_PEERCRED 17
114122
#define TARGET_SO_RCVLOWAT 18
115123
#define TARGET_SO_SNDLOWAT 19
116124
#define TARGET_SO_RCVTIMEO 20
117125
#define TARGET_SO_SNDTIMEO 21
126+
#endif
118127

119128
/* Security levels - as per NRL IPv6 - don't actually do anything */
120129
#define TARGET_SO_SECURITY_AUTHENTICATION 22

linux-user/syscall_defs.h

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,27 +1086,27 @@ struct target_stat64 {
10861086
#elif defined(TARGET_PPC)
10871087

10881088
struct target_stat {
1089-
unsigned short st_dev;
1089+
abi_ulong st_dev;
10901090
abi_ulong st_ino;
10911091
#if defined(TARGET_PPC64) && !defined(TARGET_ABI32)
1092-
unsigned short st_nlink;
1092+
abi_ulong st_nlink;
10931093
unsigned int st_mode;
10941094
#else
10951095
unsigned int st_mode;
10961096
unsigned short st_nlink;
10971097
#endif
10981098
unsigned int st_uid;
10991099
unsigned int st_gid;
1100-
unsigned short st_rdev;
1100+
abi_ulong st_rdev;
11011101
abi_ulong st_size;
11021102
abi_ulong st_blksize;
11031103
abi_ulong st_blocks;
11041104
abi_ulong target_st_atime;
1105-
abi_ulong __unused1;
1105+
abi_ulong target_st_atime_nsec;
11061106
abi_ulong target_st_mtime;
1107-
abi_ulong __unused2;
1107+
abi_ulong target_st_mtime_nsec;
11081108
abi_ulong target_st_ctime;
1109-
abi_ulong __unused3;
1109+
abi_ulong target_st_ctime_nsec;
11101110
abi_ulong __unused4;
11111111
abi_ulong __unused5;
11121112
#if defined(TARGET_PPC64) && !defined(TARGET_ABI32)
@@ -1122,19 +1122,18 @@ struct target_stat64 {
11221122
unsigned int st_uid;
11231123
unsigned int st_gid;
11241124
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;
11381137
};
11391138

11401139
#elif defined(TARGET_M68K)

0 commit comments

Comments
 (0)