svn commit: r199501 - projects/ppc64/sys/compat/freebsd32
Nathan Whitehorn
nwhitehorn at FreeBSD.org
Thu Nov 19 01:20:16 UTC 2009
Author: nwhitehorn
Date: Thu Nov 19 01:20:16 2009
New Revision: 199501
URL: http://svn.freebsd.org/changeset/base/199501
Log:
Unhackify changes to support big-endian systems and systems that require
64-bit types aligned at 32-bit boundaries in their 32-bit ABIs. There are
no longer manual changes to auto-generated files.
Modified:
projects/ppc64/sys/compat/freebsd32/freebsd32_misc.c
projects/ppc64/sys/compat/freebsd32/freebsd32_proto.h
projects/ppc64/sys/compat/freebsd32/freebsd32_syscall.h
projects/ppc64/sys/compat/freebsd32/freebsd32_syscalls.c
projects/ppc64/sys/compat/freebsd32/freebsd32_sysent.c
projects/ppc64/sys/compat/freebsd32/freebsd32_util.h
projects/ppc64/sys/compat/freebsd32/syscalls.master
Modified: projects/ppc64/sys/compat/freebsd32/freebsd32_misc.c
==============================================================================
--- projects/ppc64/sys/compat/freebsd32/freebsd32_misc.c Thu Nov 19 01:04:31 2009 (r199500)
+++ projects/ppc64/sys/compat/freebsd32/freebsd32_misc.c Thu Nov 19 01:20:16 2009 (r199501)
@@ -119,6 +119,12 @@ CTASSERT(sizeof(struct sigaction32) == 2
static int freebsd32_kevent_copyout(void *arg, struct kevent *kevp, int count);
static int freebsd32_kevent_copyin(void *arg, struct kevent *kevp, int count);
+#if BYTE_ORDER == BIG_ENDIAN
+#define PAIR32TO64(type, name) ((name ## 2) | ((type)(name ## 1) << 32))
+#else
+#define PAIR32TO64(type, name) ((name ## 1) | ((type)(name ## 2) << 32))
+#endif
+
int
freebsd32_wait4(struct thread *td, struct freebsd32_wait4_args *uap)
{
@@ -430,8 +436,7 @@ freebsd32_mmap(struct thread *td, struct
int prot = uap->prot;
int flags = uap->flags;
int fd = uap->fd;
- off_t pos = (uap->poslo
- | ((off_t)uap->poshi << 32));
+ off_t pos = PAIR32TO64(off_t,uap->pos);
#ifdef __ia64__
vm_size_t pageoff;
int error;
@@ -527,8 +532,8 @@ freebsd6_freebsd32_mmap(struct thread *t
ap.prot = uap->prot;
ap.flags = uap->flags;
ap.fd = uap->fd;
- ap.poslo = uap->poslo;
- ap.poshi = uap->poshi;
+ ap.pos1 = uap->pos1;
+ ap.pos2 = uap->pos2;
return (freebsd32_mmap(td, &ap));
}
@@ -845,7 +850,7 @@ freebsd32_preadv(struct thread *td, stru
error = freebsd32_copyinuio(uap->iovp, uap->iovcnt, &auio);
if (error)
return (error);
- error = kern_preadv(td, uap->fd, auio, uap->offset);
+ error = kern_preadv(td, uap->fd, auio, PAIR32TO64(off_t,uap->offset));
free(auio, M_IOV);
return (error);
}
@@ -859,7 +864,7 @@ freebsd32_pwritev(struct thread *td, str
error = freebsd32_copyinuio(uap->iovp, uap->iovcnt, &auio);
if (error)
return (error);
- error = kern_pwritev(td, uap->fd, auio, uap->offset);
+ error = kern_pwritev(td, uap->fd, auio, PAIR32TO64(off_t,uap->offset));
free(auio, M_IOV);
return (error);
}
@@ -1984,7 +1989,7 @@ freebsd32_pread(struct thread *td, struc
ap.fd = uap->fd;
ap.buf = uap->buf;
ap.nbyte = uap->nbyte;
- ap.offset = (uap->offsetlo | ((off_t)uap->offsethi << 32));
+ ap.offset = PAIR32TO64(off_t,uap->offset);
return (pread(td, &ap));
}
@@ -1996,7 +2001,7 @@ freebsd32_pwrite(struct thread *td, stru
ap.fd = uap->fd;
ap.buf = uap->buf;
ap.nbyte = uap->nbyte;
- ap.offset = (uap->offsetlo | ((off_t)uap->offsethi << 32));
+ ap.offset = PAIR32TO64(off_t,uap->offset);
return (pwrite(td, &ap));
}
@@ -2008,7 +2013,7 @@ freebsd32_lseek(struct thread *td, struc
off_t pos;
ap.fd = uap->fd;
- ap.offset = (uap->offsetlo | ((off_t)uap->offsethi << 32));
+ ap.offset = PAIR32TO64(off_t,uap->offset);
ap.whence = uap->whence;
error = lseek(td, &ap);
/* Expand the quad return into two parts for eax and edx */
@@ -2029,7 +2034,7 @@ freebsd32_truncate(struct thread *td, st
struct truncate_args ap;
ap.path = uap->path;
- ap.length = (uap->lengthlo | ((off_t)uap->lengthhi << 32));
+ ap.length = PAIR32TO64(off_t,uap->length);
return (truncate(td, &ap));
}
@@ -2039,7 +2044,7 @@ freebsd32_ftruncate(struct thread *td, s
struct ftruncate_args ap;
ap.fd = uap->fd;
- ap.length = (uap->lengthlo | ((off_t)uap->lengthhi << 32));
+ ap.length = PAIR32TO64(off_t,uap->length);
return (ftruncate(td, &ap));
}
@@ -2071,7 +2076,7 @@ freebsd6_freebsd32_pread(struct thread *
ap.fd = uap->fd;
ap.buf = uap->buf;
ap.nbyte = uap->nbyte;
- ap.offset = (uap->offsetlo | ((off_t)uap->offsethi << 32));
+ ap.offset = PAIR32TO64(off_t,uap->offset);
return (pread(td, &ap));
}
@@ -2083,7 +2088,7 @@ freebsd6_freebsd32_pwrite(struct thread
ap.fd = uap->fd;
ap.buf = uap->buf;
ap.nbyte = uap->nbyte;
- ap.offset = (uap->offsetlo | ((off_t)uap->offsethi << 32));
+ ap.offset = PAIR32TO64(off_t,uap->offset);
return (pwrite(td, &ap));
}
@@ -2095,7 +2100,7 @@ freebsd6_freebsd32_lseek(struct thread *
off_t pos;
ap.fd = uap->fd;
- ap.offset = (uap->offsetlo | ((off_t)uap->offsethi << 32));
+ ap.offset = PAIR32TO64(off_t,uap->offset);
ap.whence = uap->whence;
error = lseek(td, &ap);
/* Expand the quad return into two parts for eax and edx */
@@ -2116,7 +2121,7 @@ freebsd6_freebsd32_truncate(struct threa
struct truncate_args ap;
ap.path = uap->path;
- ap.length = (uap->lengthlo | ((off_t)uap->lengthhi << 32));
+ ap.length = PAIR32TO64(off_t,uap->length);
return (truncate(td, &ap));
}
@@ -2126,7 +2131,7 @@ freebsd6_freebsd32_ftruncate(struct thre
struct ftruncate_args ap;
ap.fd = uap->fd;
- ap.length = (uap->lengthlo | ((off_t)uap->lengthhi << 32));
+ ap.length = PAIR32TO64(off_t,uap->length);
return (ftruncate(td, &ap));
}
#endif /* COMPAT_FREEBSD6 */
@@ -2153,7 +2158,7 @@ freebsd32_do_sendfile(struct thread *td,
ap.fd = uap->fd;
ap.s = uap->s;
- ap.offset = (uap->offsetlo | ((off_t)uap->offsethi << 32));
+ ap.offset = PAIR32TO64(off_t,uap->offset);
ap.nbytes = uap->nbytes;
ap.hdtr = (struct sf_hdtr *)uap->hdtr; /* XXX not used */
ap.sbytes = uap->sbytes;
@@ -2891,7 +2896,7 @@ freebsd32_cpuset_setid(struct thread *td
struct cpuset_setid_args ap;
ap.which = uap->which;
- ap.id = (uap->idlo | ((id_t)uap->idhi << 32));
+ ap.id = PAIR32TO64(id_t,uap->id);
ap.setid = uap->setid;
return (cpuset_setid(td, &ap));
@@ -2905,7 +2910,7 @@ freebsd32_cpuset_getid(struct thread *td
ap.level = uap->level;
ap.which = uap->which;
- ap.id = (uap->idlo | ((id_t)uap->idhi << 32));
+ ap.id = PAIR32TO64(id_t,uap->id);
ap.setid = uap->setid;
return (cpuset_getid(td, &ap));
@@ -2919,7 +2924,7 @@ freebsd32_cpuset_getaffinity(struct thre
ap.level = uap->level;
ap.which = uap->which;
- ap.id = (uap->idlo | ((id_t)uap->idhi << 32));
+ ap.id = PAIR32TO64(id_t,uap->id);
ap.cpusetsize = uap->cpusetsize;
ap.mask = uap->mask;
@@ -2934,7 +2939,7 @@ freebsd32_cpuset_setaffinity(struct thre
ap.level = uap->level;
ap.which = uap->which;
- ap.id = (uap->idlo | ((id_t)uap->idhi << 32));
+ ap.id = PAIR32TO64(id_t,uap->id);
ap.cpusetsize = uap->cpusetsize;
ap.mask = uap->mask;
Modified: projects/ppc64/sys/compat/freebsd32/freebsd32_proto.h
==============================================================================
--- projects/ppc64/sys/compat/freebsd32/freebsd32_proto.h Thu Nov 19 01:04:31 2009 (r199500)
+++ projects/ppc64/sys/compat/freebsd32/freebsd32_proto.h Thu Nov 19 01:20:16 2009 (r199501)
@@ -3,7 +3,7 @@
*
* DO NOT EDIT-- this file is automatically generated.
* $FreeBSD$
- * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 198508 2009-10-27 10:55:34Z kib
+ * created from FreeBSD: projects/ppc64/sys/compat/freebsd32/syscalls.master 199485 2009-11-18 15:48:51Z nwhitehorn
*/
#ifndef _FREEBSD32_SYSPROTO_H_
@@ -17,8 +17,8 @@
#include <bsm/audit_kevents.h>
-struct image_params;
struct proc;
+
struct thread;
#define PAD_(t) (sizeof(register_t) <= sizeof(t) ? \
@@ -32,6 +32,9 @@ struct thread;
#define PADR_(t) 0
#endif
+#if defined(__powerpc__)
+#define PAD64_REQUIRED
+#endif
struct freebsd32_wait4_args {
char pid_l_[PADL_(int)]; int pid; char pid_r_[PADR_(int)];
char status_l_[PADL_(int *)]; int * status; char status_r_[PADR_(int *)];
@@ -223,13 +226,15 @@ struct freebsd32_preadv_args {
char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
char iovp_l_[PADL_(struct iovec32 *)]; struct iovec32 * iovp; char iovp_r_[PADR_(struct iovec32 *)];
char iovcnt_l_[PADL_(u_int)]; u_int iovcnt; char iovcnt_r_[PADR_(u_int)];
- char offset_l_[PADL_(off_t)]; off_t offset; char offset_r_[PADR_(off_t)];
+ char offset1_l_[PADL_(u_int32_t)]; u_int32_t offset1; char offset1_r_[PADR_(u_int32_t)];
+ char offset2_l_[PADL_(u_int32_t)]; u_int32_t offset2; char offset2_r_[PADR_(u_int32_t)];
};
struct freebsd32_pwritev_args {
char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
char iovp_l_[PADL_(struct iovec32 *)]; struct iovec32 * iovp; char iovp_r_[PADR_(struct iovec32 *)];
char iovcnt_l_[PADL_(u_int)]; u_int iovcnt; char iovcnt_r_[PADR_(u_int)];
- char offset_l_[PADL_(off_t)]; off_t offset; char offset_r_[PADR_(off_t)];
+ char offset1_l_[PADL_(u_int32_t)]; u_int32_t offset1; char offset1_r_[PADR_(u_int32_t)];
+ char offset2_l_[PADL_(u_int32_t)]; u_int32_t offset2; char offset2_r_[PADR_(u_int32_t)];
};
struct freebsd32_modstat_args {
char modid_l_[PADL_(int)]; int modid; char modid_r_[PADR_(int)];
@@ -294,13 +299,8 @@ struct freebsd32_nmount_args {
struct freebsd32_sendfile_args {
char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)];
- #if BYTE_ORDER == BIG_ENDIAN
- char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)];
- char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)];
- #else
- char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)];
- char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)];
- #endif
+ char offset1_l_[PADL_(u_int32_t)]; u_int32_t offset1; char offset1_r_[PADR_(u_int32_t)];
+ char offset2_l_[PADL_(u_int32_t)]; u_int32_t offset2; char offset2_r_[PADR_(u_int32_t)];
char nbytes_l_[PADL_(size_t)]; size_t nbytes; char nbytes_r_[PADR_(size_t)];
char hdtr_l_[PADL_(struct sf_hdtr32 *)]; struct sf_hdtr32 * hdtr; char hdtr_r_[PADR_(struct sf_hdtr32 *)];
char sbytes_l_[PADL_(off_t *)]; off_t * sbytes; char sbytes_r_[PADR_(off_t *)];
@@ -348,35 +348,22 @@ struct freebsd32_aio_fsync_args {
char op_l_[PADL_(int)]; int op; char op_r_[PADR_(int)];
char aiocbp_l_[PADL_(struct aiocb32 *)]; struct aiocb32 * aiocbp; char aiocbp_r_[PADR_(struct aiocb32 *)];
};
+#ifdef PAD64_REQUIRED
struct freebsd32_pread_args {
char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
char buf_l_[PADL_(void *)]; void * buf; char buf_r_[PADR_(void *)];
char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)];
- #ifdef __powerpc__
char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)];
- #endif
- #if BYTE_ORDER == BIG_ENDIAN
- char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)];
- char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)];
- #else
- char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)];
- char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)];
- #endif
+ char offset1_l_[PADL_(u_int32_t)]; u_int32_t offset1; char offset1_r_[PADR_(u_int32_t)];
+ char offset2_l_[PADL_(u_int32_t)]; u_int32_t offset2; char offset2_r_[PADR_(u_int32_t)];
};
struct freebsd32_pwrite_args {
char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
char buf_l_[PADL_(const void *)]; const void * buf; char buf_r_[PADR_(const void *)];
char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)];
- #ifdef __powerpc__
char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)];
- #endif
- #if BYTE_ORDER == BIG_ENDIAN
- char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)];
- char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)];
- #else
- char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)];
- char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)];
- #endif
+ char offset1_l_[PADL_(u_int32_t)]; u_int32_t offset1; char offset1_r_[PADR_(u_int32_t)];
+ char offset2_l_[PADL_(u_int32_t)]; u_int32_t offset2; char offset2_r_[PADR_(u_int32_t)];
};
struct freebsd32_mmap_args {
char addr_l_[PADL_(caddr_t)]; caddr_t addr; char addr_r_[PADR_(caddr_t)];
@@ -384,106 +371,106 @@ struct freebsd32_mmap_args {
char prot_l_[PADL_(int)]; int prot; char prot_r_[PADR_(int)];
char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)];
char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
- #ifdef __powerpc__
char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)];
- #endif
- #if BYTE_ORDER == BIG_ENDIAN
- char poshi_l_[PADL_(u_int32_t)]; u_int32_t poshi; char poshi_r_[PADR_(u_int32_t)];
- char poslo_l_[PADL_(u_int32_t)]; u_int32_t poslo; char poslo_r_[PADR_(u_int32_t)];
- #else
- char poslo_l_[PADL_(u_int32_t)]; u_int32_t poslo; char poslo_r_[PADR_(u_int32_t)];
- char poshi_l_[PADL_(u_int32_t)]; u_int32_t poshi; char poshi_r_[PADR_(u_int32_t)];
- #endif
+ char pos1_l_[PADL_(u_int32_t)]; u_int32_t pos1; char pos1_r_[PADR_(u_int32_t)];
+ char pos2_l_[PADL_(u_int32_t)]; u_int32_t pos2; char pos2_r_[PADR_(u_int32_t)];
};
struct freebsd32_lseek_args {
char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
- #ifdef __powerpc__
char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)];
- #endif
- #if BYTE_ORDER == BIG_ENDIAN
- char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)];
- char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)];
- #else
- char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)];
- char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)];
- #endif
+ char offset1_l_[PADL_(u_int32_t)]; u_int32_t offset1; char offset1_r_[PADR_(u_int32_t)];
+ char offset2_l_[PADL_(u_int32_t)]; u_int32_t offset2; char offset2_r_[PADR_(u_int32_t)];
char whence_l_[PADL_(int)]; int whence; char whence_r_[PADR_(int)];
};
struct freebsd32_truncate_args {
char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)];
- #ifdef __powerpc__
char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)];
- #endif
- #if BYTE_ORDER == BIG_ENDIAN
- char lengthhi_l_[PADL_(u_int32_t)]; u_int32_t lengthhi; char lengthhi_r_[PADR_(u_int32_t)];
- char lengthlo_l_[PADL_(u_int32_t)]; u_int32_t lengthlo; char lengthlo_r_[PADR_(u_int32_t)];
- #else
- char lengthlo_l_[PADL_(u_int32_t)]; u_int32_t lengthlo; char lengthlo_r_[PADR_(u_int32_t)];
- char lengthhi_l_[PADL_(u_int32_t)]; u_int32_t lengthhi; char lengthhi_r_[PADR_(u_int32_t)];
- #endif
+ char length1_l_[PADL_(u_int32_t)]; u_int32_t length1; char length1_r_[PADR_(u_int32_t)];
+ char length2_l_[PADL_(u_int32_t)]; u_int32_t length2; char length2_r_[PADR_(u_int32_t)];
};
struct freebsd32_ftruncate_args {
char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
- #ifdef __powerpc__
char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)];
- #endif
- #if BYTE_ORDER == BIG_ENDIAN
- char lengthhi_l_[PADL_(u_int32_t)]; u_int32_t lengthhi; char lengthhi_r_[PADR_(u_int32_t)];
- char lengthlo_l_[PADL_(u_int32_t)]; u_int32_t lengthlo; char lengthlo_r_[PADR_(u_int32_t)];
- #else
- char lengthlo_l_[PADL_(u_int32_t)]; u_int32_t lengthlo; char lengthlo_r_[PADR_(u_int32_t)];
- char lengthhi_l_[PADL_(u_int32_t)]; u_int32_t lengthhi; char lengthhi_r_[PADR_(u_int32_t)];
- #endif
+ char length1_l_[PADL_(u_int32_t)]; u_int32_t length1; char length1_r_[PADR_(u_int32_t)];
+ char length2_l_[PADL_(u_int32_t)]; u_int32_t length2; char length2_r_[PADR_(u_int32_t)];
+};
+#else
+struct freebsd32_pread_args {
+ char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
+ char buf_l_[PADL_(void *)]; void * buf; char buf_r_[PADR_(void *)];
+ char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)];
+ char offset1_l_[PADL_(u_int32_t)]; u_int32_t offset1; char offset1_r_[PADR_(u_int32_t)];
+ char offset2_l_[PADL_(u_int32_t)]; u_int32_t offset2; char offset2_r_[PADR_(u_int32_t)];
+};
+struct freebsd32_pwrite_args {
+ char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
+ char buf_l_[PADL_(const void *)]; const void * buf; char buf_r_[PADR_(const void *)];
+ char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)];
+ char offset1_l_[PADL_(u_int32_t)]; u_int32_t offset1; char offset1_r_[PADR_(u_int32_t)];
+ char offset2_l_[PADL_(u_int32_t)]; u_int32_t offset2; char offset2_r_[PADR_(u_int32_t)];
+};
+struct freebsd32_mmap_args {
+ char addr_l_[PADL_(caddr_t)]; caddr_t addr; char addr_r_[PADR_(caddr_t)];
+ char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)];
+ char prot_l_[PADL_(int)]; int prot; char prot_r_[PADR_(int)];
+ char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)];
+ char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
+ char pos1_l_[PADL_(u_int32_t)]; u_int32_t pos1; char pos1_r_[PADR_(u_int32_t)];
+ char pos2_l_[PADL_(u_int32_t)]; u_int32_t pos2; char pos2_r_[PADR_(u_int32_t)];
+};
+struct freebsd32_lseek_args {
+ char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
+ char offset1_l_[PADL_(u_int32_t)]; u_int32_t offset1; char offset1_r_[PADR_(u_int32_t)];
+ char offset2_l_[PADL_(u_int32_t)]; u_int32_t offset2; char offset2_r_[PADR_(u_int32_t)];
+ char whence_l_[PADL_(int)]; int whence; char whence_r_[PADR_(int)];
};
+struct freebsd32_truncate_args {
+ char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)];
+ char length1_l_[PADL_(u_int32_t)]; u_int32_t length1; char length1_r_[PADR_(u_int32_t)];
+ char length2_l_[PADL_(u_int32_t)]; u_int32_t length2; char length2_r_[PADR_(u_int32_t)];
+};
+struct freebsd32_ftruncate_args {
+ char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
+ char length1_l_[PADL_(u_int32_t)]; u_int32_t length1; char length1_r_[PADR_(u_int32_t)];
+ char length2_l_[PADL_(u_int32_t)]; u_int32_t length2; char length2_r_[PADR_(u_int32_t)];
+};
+#endif
+#ifdef PAD64_REQUIRED
struct freebsd32_cpuset_setid_args {
char which_l_[PADL_(cpuwhich_t)]; cpuwhich_t which; char which_r_[PADR_(cpuwhich_t)];
- #ifdef __powerpc__
char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)];
- #endif
- #if BYTE_ORDER == BIG_ENDIAN
- char idhi_l_[PADL_(uint32_t)]; uint32_t idhi; char idhi_r_[PADR_(uint32_t)];
- char idlo_l_[PADL_(uint32_t)]; uint32_t idlo; char idlo_r_[PADR_(uint32_t)];
- #else
- char idlo_l_[PADL_(uint32_t)]; uint32_t idlo; char idlo_r_[PADR_(uint32_t)];
- char idhi_l_[PADL_(uint32_t)]; uint32_t idhi; char idhi_r_[PADR_(uint32_t)];
- #endif
+ char id1_l_[PADL_(u_int32_t)]; u_int32_t id1; char id1_r_[PADR_(u_int32_t)];
+ char id2_l_[PADL_(u_int32_t)]; u_int32_t id2; char id2_r_[PADR_(u_int32_t)];
char setid_l_[PADL_(cpusetid_t)]; cpusetid_t setid; char setid_r_[PADR_(cpusetid_t)];
};
+#else
+struct freebsd32_cpuset_setid_args {
+ char which_l_[PADL_(cpuwhich_t)]; cpuwhich_t which; char which_r_[PADR_(cpuwhich_t)];
+ char id1_l_[PADL_(u_int32_t)]; u_int32_t id1; char id1_r_[PADR_(u_int32_t)];
+ char id2_l_[PADL_(u_int32_t)]; u_int32_t id2; char id2_r_[PADR_(u_int32_t)];
+ char setid_l_[PADL_(cpusetid_t)]; cpusetid_t setid; char setid_r_[PADR_(cpusetid_t)];
+};
+#endif
struct freebsd32_cpuset_getid_args {
char level_l_[PADL_(cpulevel_t)]; cpulevel_t level; char level_r_[PADR_(cpulevel_t)];
char which_l_[PADL_(cpuwhich_t)]; cpuwhich_t which; char which_r_[PADR_(cpuwhich_t)];
- #if BYTE_ORDER == BIG_ENDIAN
- char idhi_l_[PADL_(uint32_t)]; uint32_t idhi; char idhi_r_[PADR_(uint32_t)];
- char idlo_l_[PADL_(uint32_t)]; uint32_t idlo; char idlo_r_[PADR_(uint32_t)];
- #else
- char idlo_l_[PADL_(uint32_t)]; uint32_t idlo; char idlo_r_[PADR_(uint32_t)];
- char idhi_l_[PADL_(uint32_t)]; uint32_t idhi; char idhi_r_[PADR_(uint32_t)];
- #endif
+ char id1_l_[PADL_(u_int32_t)]; u_int32_t id1; char id1_r_[PADR_(u_int32_t)];
+ char id2_l_[PADL_(u_int32_t)]; u_int32_t id2; char id2_r_[PADR_(u_int32_t)];
char setid_l_[PADL_(cpusetid_t *)]; cpusetid_t * setid; char setid_r_[PADR_(cpusetid_t *)];
};
struct freebsd32_cpuset_getaffinity_args {
char level_l_[PADL_(cpulevel_t)]; cpulevel_t level; char level_r_[PADR_(cpulevel_t)];
char which_l_[PADL_(cpuwhich_t)]; cpuwhich_t which; char which_r_[PADR_(cpuwhich_t)];
- #if BYTE_ORDER == BIG_ENDIAN
- char idhi_l_[PADL_(uint32_t)]; uint32_t idhi; char idhi_r_[PADR_(uint32_t)];
- char idlo_l_[PADL_(uint32_t)]; uint32_t idlo; char idlo_r_[PADR_(uint32_t)];
- #else
- char idlo_l_[PADL_(uint32_t)]; uint32_t idlo; char idlo_r_[PADR_(uint32_t)];
- char idhi_l_[PADL_(uint32_t)]; uint32_t idhi; char idhi_r_[PADR_(uint32_t)];
- #endif
+ char id1_l_[PADL_(u_int32_t)]; u_int32_t id1; char id1_r_[PADR_(u_int32_t)];
+ char id2_l_[PADL_(u_int32_t)]; u_int32_t id2; char id2_r_[PADR_(u_int32_t)];
char cpusetsize_l_[PADL_(size_t)]; size_t cpusetsize; char cpusetsize_r_[PADR_(size_t)];
char mask_l_[PADL_(cpuset_t *)]; cpuset_t * mask; char mask_r_[PADR_(cpuset_t *)];
};
struct freebsd32_cpuset_setaffinity_args {
char level_l_[PADL_(cpulevel_t)]; cpulevel_t level; char level_r_[PADR_(cpulevel_t)];
char which_l_[PADL_(cpuwhich_t)]; cpuwhich_t which; char which_r_[PADR_(cpuwhich_t)];
- #if BYTE_ORDER == BIG_ENDIAN
- char idhi_l_[PADL_(uint32_t)]; uint32_t idhi; char idhi_r_[PADR_(uint32_t)];
- char idlo_l_[PADL_(uint32_t)]; uint32_t idlo; char idlo_r_[PADR_(uint32_t)];
- #else
- char idlo_l_[PADL_(uint32_t)]; uint32_t idlo; char idlo_r_[PADR_(uint32_t)];
- char idhi_l_[PADL_(uint32_t)]; uint32_t idhi; char idhi_r_[PADR_(uint32_t)];
- #endif
+ char id1_l_[PADL_(u_int32_t)]; u_int32_t id1; char id1_r_[PADR_(u_int32_t)];
+ char id2_l_[PADL_(u_int32_t)]; u_int32_t id2; char id2_r_[PADR_(u_int32_t)];
char cpusetsize_l_[PADL_(size_t)]; size_t cpusetsize; char cpusetsize_r_[PADR_(size_t)];
char mask_l_[PADL_(const cpuset_t *)]; const cpuset_t * mask; char mask_r_[PADR_(const cpuset_t *)];
};
@@ -537,6 +524,9 @@ struct freebsd32_pselect_args {
char ts_l_[PADL_(const struct timespec32 *)]; const struct timespec32 * ts; char ts_r_[PADR_(const struct timespec32 *)];
char sm_l_[PADL_(const sigset_t *)]; const sigset_t * sm; char sm_r_[PADR_(const sigset_t *)];
};
+#if defined(__powerpc__)
+#define PAD64_REQUIRED
+#endif
int freebsd32_wait4(struct thread *, struct freebsd32_wait4_args *);
int freebsd32_recvmsg(struct thread *, struct freebsd32_recvmsg_args *);
int freebsd32_sendmsg(struct thread *, struct freebsd32_sendmsg_args *);
@@ -602,13 +592,26 @@ int freebsd32_thr_suspend(struct thread
int freebsd32_umtx_op(struct thread *, struct freebsd32_umtx_op_args *);
int freebsd32_thr_new(struct thread *, struct freebsd32_thr_new_args *);
int freebsd32_aio_fsync(struct thread *, struct freebsd32_aio_fsync_args *);
+#ifdef PAD64_REQUIRED
int freebsd32_pread(struct thread *, struct freebsd32_pread_args *);
int freebsd32_pwrite(struct thread *, struct freebsd32_pwrite_args *);
int freebsd32_mmap(struct thread *, struct freebsd32_mmap_args *);
int freebsd32_lseek(struct thread *, struct freebsd32_lseek_args *);
int freebsd32_truncate(struct thread *, struct freebsd32_truncate_args *);
int freebsd32_ftruncate(struct thread *, struct freebsd32_ftruncate_args *);
+#else
+int freebsd32_pread(struct thread *, struct freebsd32_pread_args *);
+int freebsd32_pwrite(struct thread *, struct freebsd32_pwrite_args *);
+int freebsd32_mmap(struct thread *, struct freebsd32_mmap_args *);
+int freebsd32_lseek(struct thread *, struct freebsd32_lseek_args *);
+int freebsd32_truncate(struct thread *, struct freebsd32_truncate_args *);
+int freebsd32_ftruncate(struct thread *, struct freebsd32_ftruncate_args *);
+#endif
+#ifdef PAD64_REQUIRED
+int freebsd32_cpuset_setid(struct thread *, struct freebsd32_cpuset_setid_args *);
+#else
int freebsd32_cpuset_setid(struct thread *, struct freebsd32_cpuset_setid_args *);
+#endif
int freebsd32_cpuset_getid(struct thread *, struct freebsd32_cpuset_getid_args *);
int freebsd32_cpuset_getaffinity(struct thread *, struct freebsd32_cpuset_getaffinity_args *);
int freebsd32_cpuset_setaffinity(struct thread *, struct freebsd32_cpuset_setaffinity_args *);
@@ -621,10 +624,12 @@ int freebsd32_semctl(struct thread *, st
int freebsd32_msgctl(struct thread *, struct freebsd32_msgctl_args *);
int freebsd32_shmctl(struct thread *, struct freebsd32_shmctl_args *);
int freebsd32_pselect(struct thread *, struct freebsd32_pselect_args *);
-register_t *freebsd32_copyout_strings(struct image_params *imgp);
#ifdef COMPAT_43
+#if defined(__powerpc__)
+#define PAD64_REQUIRED
+#endif
struct ofreebsd32_sigaction_args {
char signum_l_[PADL_(int)]; int signum; char signum_r_[PADR_(int)];
char nsa_l_[PADL_(struct osigaction32 *)]; struct osigaction32 * nsa; char nsa_r_[PADR_(struct osigaction32 *)];
@@ -652,6 +657,12 @@ struct ofreebsd32_sigstack_args {
char nss_l_[PADL_(struct sigstack32 *)]; struct sigstack32 * nss; char nss_r_[PADR_(struct sigstack32 *)];
char oss_l_[PADL_(struct sigstack32 *)]; struct sigstack32 * oss; char oss_r_[PADR_(struct sigstack32 *)];
};
+#ifdef PAD64_REQUIRED
+#else
+#endif
+#ifdef PAD64_REQUIRED
+#else
+#endif
int ofreebsd32_sigaction(struct thread *, struct ofreebsd32_sigaction_args *);
int ofreebsd32_sigprocmask(struct thread *, struct ofreebsd32_sigprocmask_args *);
int ofreebsd32_sigpending(struct thread *, struct ofreebsd32_sigpending_args *);
@@ -666,6 +677,9 @@ int ofreebsd32_sigstack(struct thread *,
#ifdef COMPAT_FREEBSD4
+#if defined(__powerpc__)
+#define PAD64_REQUIRED
+#endif
struct freebsd4_freebsd32_getfsstat_args {
char buf_l_[PADL_(struct statfs32 *)]; struct statfs32 * buf; char buf_r_[PADR_(struct statfs32 *)];
char bufsize_l_[PADL_(long)]; long bufsize; char bufsize_r_[PADR_(long)];
@@ -686,13 +700,8 @@ struct freebsd4_freebsd32_fhstatfs_args
struct freebsd4_freebsd32_sendfile_args {
char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)];
- #if BYTE_ORDER == BIG_ENDIAN
- char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)];
- char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)];
- #else
- char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)];
- char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)];
- #endif
+ char offset1_l_[PADL_(u_int32_t)]; u_int32_t offset1; char offset1_r_[PADR_(u_int32_t)];
+ char offset2_l_[PADL_(u_int32_t)]; u_int32_t offset2; char offset2_r_[PADR_(u_int32_t)];
char nbytes_l_[PADL_(size_t)]; size_t nbytes; char nbytes_r_[PADR_(size_t)];
char hdtr_l_[PADL_(struct sf_hdtr32 *)]; struct sf_hdtr32 * hdtr; char hdtr_r_[PADR_(struct sf_hdtr32 *)];
char sbytes_l_[PADL_(off_t *)]; off_t * sbytes; char sbytes_r_[PADR_(off_t *)];
@@ -706,6 +715,12 @@ struct freebsd4_freebsd32_sigaction_args
struct freebsd4_freebsd32_sigreturn_args {
char sigcntxp_l_[PADL_(const struct freebsd4_freebsd32_ucontext *)]; const struct freebsd4_freebsd32_ucontext * sigcntxp; char sigcntxp_r_[PADR_(const struct freebsd4_freebsd32_ucontext *)];
};
+#ifdef PAD64_REQUIRED
+#else
+#endif
+#ifdef PAD64_REQUIRED
+#else
+#endif
int freebsd4_freebsd32_getfsstat(struct thread *, struct freebsd4_freebsd32_getfsstat_args *);
int freebsd4_freebsd32_statfs(struct thread *, struct freebsd4_freebsd32_statfs_args *);
int freebsd4_freebsd32_fstatfs(struct thread *, struct freebsd4_freebsd32_fstatfs_args *);
@@ -719,31 +734,24 @@ int freebsd4_freebsd32_sigreturn(struct
#ifdef COMPAT_FREEBSD6
+#if defined(__powerpc__)
+#define PAD64_REQUIRED
+#endif
struct freebsd6_freebsd32_pread_args {
char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
char buf_l_[PADL_(void *)]; void * buf; char buf_r_[PADR_(void *)];
char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)];
char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)];
- #if BYTE_ORDER == BIG_ENDIAN
- char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)];
- char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)];
- #else
- char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)];
- char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)];
- #endif
+ char offset1_l_[PADL_(u_int32_t)]; u_int32_t offset1; char offset1_r_[PADR_(u_int32_t)];
+ char offset2_l_[PADL_(u_int32_t)]; u_int32_t offset2; char offset2_r_[PADR_(u_int32_t)];
};
struct freebsd6_freebsd32_pwrite_args {
char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
char buf_l_[PADL_(const void *)]; const void * buf; char buf_r_[PADR_(const void *)];
char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)];
char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)];
- #if BYTE_ORDER == BIG_ENDIAN
- char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)];
- char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)];
- #else
- char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)];
- char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)];
- #endif
+ char offset1_l_[PADL_(u_int32_t)]; u_int32_t offset1; char offset1_r_[PADR_(u_int32_t)];
+ char offset2_l_[PADL_(u_int32_t)]; u_int32_t offset2; char offset2_r_[PADR_(u_int32_t)];
};
struct freebsd6_freebsd32_mmap_args {
char addr_l_[PADL_(caddr_t)]; caddr_t addr; char addr_r_[PADR_(caddr_t)];
@@ -752,48 +760,34 @@ struct freebsd6_freebsd32_mmap_args {
char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)];
char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)];
- #if BYTE_ORDER == BIG_ENDIAN
- char poshi_l_[PADL_(u_int32_t)]; u_int32_t poshi; char poshi_r_[PADR_(u_int32_t)];
- char poslo_l_[PADL_(u_int32_t)]; u_int32_t poslo; char poslo_r_[PADR_(u_int32_t)];
- #else
- char poslo_l_[PADL_(u_int32_t)]; u_int32_t poslo; char poslo_r_[PADR_(u_int32_t)];
- char poshi_l_[PADL_(u_int32_t)]; u_int32_t poshi; char poshi_r_[PADR_(u_int32_t)];
- #endif
+ char pos1_l_[PADL_(u_int32_t)]; u_int32_t pos1; char pos1_r_[PADR_(u_int32_t)];
+ char pos2_l_[PADL_(u_int32_t)]; u_int32_t pos2; char pos2_r_[PADR_(u_int32_t)];
};
struct freebsd6_freebsd32_lseek_args {
char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)];
- #if BYTE_ORDER == BIG_ENDIAN
- char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)];
- char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)];
- #else
- char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)];
- char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)];
- #endif
+ char offset1_l_[PADL_(u_int32_t)]; u_int32_t offset1; char offset1_r_[PADR_(u_int32_t)];
+ char offset2_l_[PADL_(u_int32_t)]; u_int32_t offset2; char offset2_r_[PADR_(u_int32_t)];
char whence_l_[PADL_(int)]; int whence; char whence_r_[PADR_(int)];
};
struct freebsd6_freebsd32_truncate_args {
char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)];
char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)];
- #if BYTE_ORDER == BIG_ENDIAN
- char lengthhi_l_[PADL_(u_int32_t)]; u_int32_t lengthhi; char lengthhi_r_[PADR_(u_int32_t)];
- char lengthlo_l_[PADL_(u_int32_t)]; u_int32_t lengthlo; char lengthlo_r_[PADR_(u_int32_t)];
- #else
- char lengthlo_l_[PADL_(u_int32_t)]; u_int32_t lengthlo; char lengthlo_r_[PADR_(u_int32_t)];
- char lengthhi_l_[PADL_(u_int32_t)]; u_int32_t lengthhi; char lengthhi_r_[PADR_(u_int32_t)];
- #endif
+ char length1_l_[PADL_(u_int32_t)]; u_int32_t length1; char length1_r_[PADR_(u_int32_t)];
+ char length2_l_[PADL_(u_int32_t)]; u_int32_t length2; char length2_r_[PADR_(u_int32_t)];
};
struct freebsd6_freebsd32_ftruncate_args {
char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)];
- #if BYTE_ORDER == BIG_ENDIAN
- char lengthhi_l_[PADL_(u_int32_t)]; u_int32_t lengthhi; char lengthhi_r_[PADR_(u_int32_t)];
- char lengthlo_l_[PADL_(u_int32_t)]; u_int32_t lengthlo; char lengthlo_r_[PADR_(u_int32_t)];
- #else
- char lengthlo_l_[PADL_(u_int32_t)]; u_int32_t lengthlo; char lengthlo_r_[PADR_(u_int32_t)];
- char lengthhi_l_[PADL_(u_int32_t)]; u_int32_t lengthhi; char lengthhi_r_[PADR_(u_int32_t)];
- #endif
+ char length1_l_[PADL_(u_int32_t)]; u_int32_t length1; char length1_r_[PADR_(u_int32_t)];
+ char length2_l_[PADL_(u_int32_t)]; u_int32_t length2; char length2_r_[PADR_(u_int32_t)];
};
+#ifdef PAD64_REQUIRED
+#else
+#endif
+#ifdef PAD64_REQUIRED
+#else
+#endif
int freebsd6_freebsd32_pread(struct thread *, struct freebsd6_freebsd32_pread_args *);
int freebsd6_freebsd32_pwrite(struct thread *, struct freebsd6_freebsd32_pwrite_args *);
int freebsd6_freebsd32_mmap(struct thread *, struct freebsd6_freebsd32_mmap_args *);
@@ -806,6 +800,9 @@ int freebsd6_freebsd32_ftruncate(struct
#ifdef COMPAT_FREEBSD7
+#if defined(__powerpc__)
+#define PAD64_REQUIRED
+#endif
struct freebsd7_freebsd32_semctl_args {
char semid_l_[PADL_(int)]; int semid; char semid_r_[PADR_(int)];
char semnum_l_[PADL_(int)]; int semnum; char semnum_r_[PADR_(int)];
@@ -822,6 +819,12 @@ struct freebsd7_freebsd32_shmctl_args {
char cmd_l_[PADL_(int)]; int cmd; char cmd_r_[PADR_(int)];
char buf_l_[PADL_(struct shmid_ds32_old *)]; struct shmid_ds32_old * buf; char buf_r_[PADR_(struct shmid_ds32_old *)];
};
+#ifdef PAD64_REQUIRED
+#else
+#endif
+#ifdef PAD64_REQUIRED
+#else
+#endif
int freebsd7_freebsd32_semctl(struct thread *, struct freebsd7_freebsd32_semctl_args *);
int freebsd7_freebsd32_msgctl(struct thread *, struct freebsd7_freebsd32_msgctl_args *);
int freebsd7_freebsd32_shmctl(struct thread *, struct freebsd7_freebsd32_shmctl_args *);
@@ -923,6 +926,13 @@ int freebsd7_freebsd32_shmctl(struct thr
#define FREEBSD32_SYS_AUE_freebsd32_lseek AUE_LSEEK
#define FREEBSD32_SYS_AUE_freebsd32_truncate AUE_TRUNCATE
#define FREEBSD32_SYS_AUE_freebsd32_ftruncate AUE_FTRUNCATE
+#define FREEBSD32_SYS_AUE_freebsd32_pread AUE_PREAD
+#define FREEBSD32_SYS_AUE_freebsd32_pwrite AUE_PWRITE
+#define FREEBSD32_SYS_AUE_freebsd32_mmap AUE_MMAP
+#define FREEBSD32_SYS_AUE_freebsd32_lseek AUE_LSEEK
+#define FREEBSD32_SYS_AUE_freebsd32_truncate AUE_TRUNCATE
+#define FREEBSD32_SYS_AUE_freebsd32_ftruncate AUE_FTRUNCATE
+#define FREEBSD32_SYS_AUE_freebsd32_cpuset_setid AUE_NULL
#define FREEBSD32_SYS_AUE_freebsd32_cpuset_setid AUE_NULL
#define FREEBSD32_SYS_AUE_freebsd32_cpuset_getid AUE_NULL
#define FREEBSD32_SYS_AUE_freebsd32_cpuset_getaffinity AUE_NULL
Modified: projects/ppc64/sys/compat/freebsd32/freebsd32_syscall.h
==============================================================================
--- projects/ppc64/sys/compat/freebsd32/freebsd32_syscall.h Thu Nov 19 01:04:31 2009 (r199500)
+++ projects/ppc64/sys/compat/freebsd32/freebsd32_syscall.h Thu Nov 19 01:20:16 2009 (r199501)
@@ -3,7 +3,7 @@
*
* DO NOT EDIT-- this file is automatically generated.
* $FreeBSD$
- * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 198508 2009-10-27 10:55:34Z kib
+ * created from FreeBSD: projects/ppc64/sys/compat/freebsd32/syscalls.master 199485 2009-11-18 15:48:51Z nwhitehorn
*/
#define FREEBSD32_SYS_syscall 0
@@ -350,11 +350,18 @@
#define FREEBSD32_SYS_freebsd32_lseek 478
#define FREEBSD32_SYS_freebsd32_truncate 479
#define FREEBSD32_SYS_freebsd32_ftruncate 480
+#define FREEBSD32_SYS_freebsd32_pread 475
+#define FREEBSD32_SYS_freebsd32_pwrite 476
+#define FREEBSD32_SYS_freebsd32_mmap 477
+#define FREEBSD32_SYS_freebsd32_lseek 478
+#define FREEBSD32_SYS_freebsd32_truncate 479
+#define FREEBSD32_SYS_freebsd32_ftruncate 480
#define FREEBSD32_SYS_thr_kill2 481
#define FREEBSD32_SYS_shm_open 482
#define FREEBSD32_SYS_shm_unlink 483
#define FREEBSD32_SYS_cpuset 484
#define FREEBSD32_SYS_freebsd32_cpuset_setid 485
+#define FREEBSD32_SYS_freebsd32_cpuset_setid 485
#define FREEBSD32_SYS_freebsd32_cpuset_getid 486
#define FREEBSD32_SYS_freebsd32_cpuset_getaffinity 487
#define FREEBSD32_SYS_freebsd32_cpuset_setaffinity 488
Modified: projects/ppc64/sys/compat/freebsd32/freebsd32_syscalls.c
==============================================================================
--- projects/ppc64/sys/compat/freebsd32/freebsd32_syscalls.c Thu Nov 19 01:04:31 2009 (r199500)
+++ projects/ppc64/sys/compat/freebsd32/freebsd32_syscalls.c Thu Nov 19 01:20:16 2009 (r199501)
@@ -3,10 +3,13 @@
*
* DO NOT EDIT-- this file is automatically generated.
* $FreeBSD$
- * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 198508 2009-10-27 10:55:34Z kib
+ * created from FreeBSD: projects/ppc64/sys/compat/freebsd32/syscalls.master 199485 2009-11-18 15:48:51Z nwhitehorn
*/
const char *freebsd32_syscallnames[] = {
+#if defined(__powerpc__)
+#define PAD64_REQUIRED
+#endif
"syscall", /* 0 = syscall */
"exit", /* 1 = exit */
"fork", /* 2 = fork */
@@ -482,17 +485,30 @@ const char *freebsd32_syscallnames[] = {
"sctp_generic_sendmsg", /* 472 = sctp_generic_sendmsg */
"sctp_generic_sendmsg_iov", /* 473 = sctp_generic_sendmsg_iov */
"sctp_generic_recvmsg", /* 474 = sctp_generic_recvmsg */
+#ifdef PAD64_REQUIRED
"freebsd32_pread", /* 475 = freebsd32_pread */
"freebsd32_pwrite", /* 476 = freebsd32_pwrite */
"freebsd32_mmap", /* 477 = freebsd32_mmap */
"freebsd32_lseek", /* 478 = freebsd32_lseek */
"freebsd32_truncate", /* 479 = freebsd32_truncate */
"freebsd32_ftruncate", /* 480 = freebsd32_ftruncate */
+#else
+ "freebsd32_pread", /* 475 = freebsd32_pread */
+ "freebsd32_pwrite", /* 476 = freebsd32_pwrite */
+ "freebsd32_mmap", /* 477 = freebsd32_mmap */
+ "freebsd32_lseek", /* 478 = freebsd32_lseek */
+ "freebsd32_truncate", /* 479 = freebsd32_truncate */
+ "freebsd32_ftruncate", /* 480 = freebsd32_ftruncate */
+#endif
"thr_kill2", /* 481 = thr_kill2 */
"shm_open", /* 482 = shm_open */
"shm_unlink", /* 483 = shm_unlink */
"cpuset", /* 484 = cpuset */
+#ifdef PAD64_REQUIRED
+ "freebsd32_cpuset_setid", /* 485 = freebsd32_cpuset_setid */
+#else
"freebsd32_cpuset_setid", /* 485 = freebsd32_cpuset_setid */
+#endif
"freebsd32_cpuset_getid", /* 486 = freebsd32_cpuset_getid */
"freebsd32_cpuset_getaffinity", /* 487 = freebsd32_cpuset_getaffinity */
"freebsd32_cpuset_setaffinity", /* 488 = freebsd32_cpuset_setaffinity */
Modified: projects/ppc64/sys/compat/freebsd32/freebsd32_sysent.c
==============================================================================
--- projects/ppc64/sys/compat/freebsd32/freebsd32_sysent.c Thu Nov 19 01:04:31 2009 (r199500)
+++ projects/ppc64/sys/compat/freebsd32/freebsd32_sysent.c Thu Nov 19 01:20:16 2009 (r199501)
@@ -3,7 +3,7 @@
*
* DO NOT EDIT-- this file is automatically generated.
* $FreeBSD$
- * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 198508 2009-10-27 10:55:34Z kib
+ * created from FreeBSD: projects/ppc64/sys/compat/freebsd32/syscalls.master 199485 2009-11-18 15:48:51Z nwhitehorn
*/
#include "opt_compat.h"
@@ -44,6 +44,9 @@
/* The casts are bogus but will do for now. */
struct sysent freebsd32_sysent[] = {
+#if defined(__powerpc__)
+#define PAD64_REQUIRED
+#endif
{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 0 = syscall */
{ AS(sys_exit_args), (sy_call_t *)sys_exit, AUE_EXIT, NULL, 0, 0, 0 }, /* 1 = exit */
{ 0, (sy_call_t *)fork, AUE_FORK, NULL, 0, 0, 0 }, /* 2 = fork */
@@ -519,17 +522,30 @@ struct sysent freebsd32_sysent[] = {
{ AS(sctp_generic_sendmsg_args), (sy_call_t *)sctp_generic_sendmsg, AUE_NULL, NULL, 0, 0, 0 }, /* 472 = sctp_generic_sendmsg */
{ AS(sctp_generic_sendmsg_iov_args), (sy_call_t *)sctp_generic_sendmsg_iov, AUE_NULL, NULL, 0, 0, 0 }, /* 473 = sctp_generic_sendmsg_iov */
{ AS(sctp_generic_recvmsg_args), (sy_call_t *)sctp_generic_recvmsg, AUE_NULL, NULL, 0, 0, 0 }, /* 474 = sctp_generic_recvmsg */
+#ifdef PAD64_REQUIRED
+ { AS(freebsd32_pread_args), (sy_call_t *)freebsd32_pread, AUE_PREAD, NULL, 0, 0, 0 }, /* 475 = freebsd32_pread */
+ { AS(freebsd32_pwrite_args), (sy_call_t *)freebsd32_pwrite, AUE_PWRITE, NULL, 0, 0, 0 }, /* 476 = freebsd32_pwrite */
+ { AS(freebsd32_mmap_args), (sy_call_t *)freebsd32_mmap, AUE_MMAP, NULL, 0, 0, 0 }, /* 477 = freebsd32_mmap */
+ { AS(freebsd32_lseek_args), (sy_call_t *)freebsd32_lseek, AUE_LSEEK, NULL, 0, 0, 0 }, /* 478 = freebsd32_lseek */
+ { AS(freebsd32_truncate_args), (sy_call_t *)freebsd32_truncate, AUE_TRUNCATE, NULL, 0, 0, 0 }, /* 479 = freebsd32_truncate */
+ { AS(freebsd32_ftruncate_args), (sy_call_t *)freebsd32_ftruncate, AUE_FTRUNCATE, NULL, 0, 0, 0 }, /* 480 = freebsd32_ftruncate */
+#else
{ AS(freebsd32_pread_args), (sy_call_t *)freebsd32_pread, AUE_PREAD, NULL, 0, 0, 0 }, /* 475 = freebsd32_pread */
{ AS(freebsd32_pwrite_args), (sy_call_t *)freebsd32_pwrite, AUE_PWRITE, NULL, 0, 0, 0 }, /* 476 = freebsd32_pwrite */
{ AS(freebsd32_mmap_args), (sy_call_t *)freebsd32_mmap, AUE_MMAP, NULL, 0, 0, 0 }, /* 477 = freebsd32_mmap */
{ AS(freebsd32_lseek_args), (sy_call_t *)freebsd32_lseek, AUE_LSEEK, NULL, 0, 0, 0 }, /* 478 = freebsd32_lseek */
{ AS(freebsd32_truncate_args), (sy_call_t *)freebsd32_truncate, AUE_TRUNCATE, NULL, 0, 0, 0 }, /* 479 = freebsd32_truncate */
{ AS(freebsd32_ftruncate_args), (sy_call_t *)freebsd32_ftruncate, AUE_FTRUNCATE, NULL, 0, 0, 0 }, /* 480 = freebsd32_ftruncate */
+#endif
{ AS(thr_kill2_args), (sy_call_t *)thr_kill2, AUE_KILL, NULL, 0, 0, 0 }, /* 481 = thr_kill2 */
{ AS(shm_open_args), (sy_call_t *)shm_open, AUE_SHMOPEN, NULL, 0, 0, 0 }, /* 482 = shm_open */
{ AS(shm_unlink_args), (sy_call_t *)shm_unlink, AUE_SHMUNLINK, NULL, 0, 0, 0 }, /* 483 = shm_unlink */
{ AS(cpuset_args), (sy_call_t *)cpuset, AUE_NULL, NULL, 0, 0, 0 }, /* 484 = cpuset */
+#ifdef PAD64_REQUIRED
{ AS(freebsd32_cpuset_setid_args), (sy_call_t *)freebsd32_cpuset_setid, AUE_NULL, NULL, 0, 0, 0 }, /* 485 = freebsd32_cpuset_setid */
+#else
+ { AS(freebsd32_cpuset_setid_args), (sy_call_t *)freebsd32_cpuset_setid, AUE_NULL, NULL, 0, 0, 0 }, /* 485 = freebsd32_cpuset_setid */
+#endif
{ AS(freebsd32_cpuset_getid_args), (sy_call_t *)freebsd32_cpuset_getid, AUE_NULL, NULL, 0, 0, 0 }, /* 486 = freebsd32_cpuset_getid */
{ AS(freebsd32_cpuset_getaffinity_args), (sy_call_t *)freebsd32_cpuset_getaffinity, AUE_NULL, NULL, 0, 0, 0 }, /* 487 = freebsd32_cpuset_getaffinity */
{ AS(freebsd32_cpuset_setaffinity_args), (sy_call_t *)freebsd32_cpuset_setaffinity, AUE_NULL, NULL, 0, 0, 0 }, /* 488 = freebsd32_cpuset_setaffinity */
Modified: projects/ppc64/sys/compat/freebsd32/freebsd32_util.h
==============================================================================
--- projects/ppc64/sys/compat/freebsd32/freebsd32_util.h Thu Nov 19 01:04:31 2009 (r199500)
+++ projects/ppc64/sys/compat/freebsd32/freebsd32_util.h Thu Nov 19 01:20:16 2009 (r199501)
@@ -83,4 +83,6 @@ int syscall32_register(int *offset, s
int syscall32_deregister(int *offset, struct sysent *old_sysent);
int syscall32_module_handler(struct module *mod, int what, void *arg);
+register_t *freebsd32_copyout_strings(struct image_params *imgp);
+
#endif /* !_COMPAT_FREEBSD32_FREEBSD32_UTIL_H_ */
Modified: projects/ppc64/sys/compat/freebsd32/syscalls.master
==============================================================================
--- projects/ppc64/sys/compat/freebsd32/syscalls.master Thu Nov 19 01:04:31 2009 (r199500)
+++ projects/ppc64/sys/compat/freebsd32/syscalls.master Thu Nov 19 01:20:16 2009 (r199501)
@@ -53,6 +53,10 @@
#include <compat/freebsd32/freebsd32.h>
#include <compat/freebsd32/freebsd32_proto.h>
+#if defined(__powerpc__)
+#define PAD64_REQUIRED
+#endif
+
; Reserved/unimplemented system calls in the range 0-150 inclusive
; are reserved for use in future Berkeley releases.
; Additional system calls implemented in vendor and other
@@ -195,7 +199,6 @@
93 AUE_SELECT STD { int freebsd32_select(int nd, fd_set *in, \
fd_set *ou, fd_set *ex, \
struct timeval32 *tv); }
-; XXX need to override for big-endian - little-endian should work fine.
94 AUE_NULL UNIMPL setdopt
95 AUE_FSYNC NOPROTO { int fsync(int fd); }
96 AUE_SETPRIORITY NOPROTO { int setpriority(int which, int who, \
@@ -316,10 +319,10 @@
172 AUE_NULL UNIMPL nosys
173 AUE_PREAD COMPAT6 { ssize_t freebsd32_pread(int fd, void *buf, \
size_t nbyte, int pad, \
- u_int32_t offsetlo, u_int32_t offsethi); }
+ u_int32_t offset1, u_int32_t offset2); }
174 AUE_PWRITE COMPAT6 { ssize_t freebsd32_pwrite(int fd, \
const void *buf, size_t nbyte, int pad, \
- u_int32_t offsetlo, u_int32_t offsethi); }
+ u_int32_t offset1, u_int32_t offset2); }
175 AUE_NULL UNIMPL nosys
176 AUE_NTP_ADJTIME NOPROTO { int ntp_adjtime(struct timex *tp); }
177 AUE_NULL UNIMPL sfork (BSD/OS 2.x)
@@ -354,20 +357,17 @@
char *buf, u_int count, int32_t *basep); }
197 AUE_MMAP COMPAT6 { caddr_t freebsd32_mmap(caddr_t addr, \
size_t len, int prot, int flags, int fd, \
- int pad, u_int32_t poslo, \
- u_int32_t poshi); }
+ int pad, u_int32_t pos1, u_int32_t pos2); }
198 AUE_NULL NOPROTO { int nosys(void); } __syscall \
__syscall_args int
-; XXX note - bigendian is different
199 AUE_LSEEK COMPAT6 { off_t freebsd32_lseek(int fd, int pad, \
- u_int32_t offsetlo, u_int32_t offsethi, \
+ u_int32_t offset1, u_int32_t offset2, \
int whence); }
200 AUE_TRUNCATE COMPAT6 { int freebsd32_truncate(char *path, \
- int pad, u_int32_t lengthlo, \
- u_int32_t lengthhi); }
-; XXX note - bigendian is different
+ int pad, u_int32_t length1, \
+ u_int32_t length2); }
201 AUE_FTRUNCATE COMPAT6 { int freebsd32_ftruncate(int fd, int pad, \
- u_int32_t lengthlo, u_int32_t lengthhi); }
+ u_int32_t length1, u_int32_t length2); }
202 AUE_SYSCTL STD { int freebsd32_sysctl(int *name, \
u_int namelen, void *old, \
u_int32_t *oldlenp, void *new, \
@@ -400,7 +400,7 @@
;
; The following were introduced with NetBSD/4.4Lite-2
-; They are initialized by thier respective modules/sysinits
+; They are initialized by their respective modules/sysinits
; XXX PROBLEM!!
220 AUE_SEMCTL COMPAT7 { int freebsd32_semctl(int semid, int semnum, \
int cmd, union semun32 *arg); }
@@ -501,12 +501,12 @@
; 289 and 290 from NetBSD (OpenBSD: 267 and 268)
289 AUE_PREADV STD { ssize_t freebsd32_preadv(int fd, \
struct iovec32 *iovp, \
- u_int iovcnt, off_t offset); }
-; XXX note - bigendian is different
+ u_int iovcnt, \
+ u_int32_t offset1, u_int32_t offset2); }
290 AUE_PWRITEV STD { ssize_t freebsd32_pwritev(int fd, \
struct iovec32 *iovp, \
- u_int iovcnt, off_t offset); }
-; XXX note - bigendian is different
+ u_int iovcnt, \
+ u_int32_t offset1, u_int32_t offset2); }
291 AUE_NULL UNIMPL nosys
292 AUE_NULL UNIMPL nosys
293 AUE_NULL UNIMPL nosys
@@ -579,9 +579,8 @@
334 AUE_NULL NOPROTO { int sched_rr_get_interval (pid_t pid, \
struct timespec *interval); }
335 AUE_NULL NOPROTO { int utrace(const void *addr, size_t len); }
-; XXX note - bigendian is different
336 AUE_SENDFILE COMPAT4 { int freebsd32_sendfile(int fd, int s, \
- u_int32_t offsetlo, u_int32_t offsethi, \
+ u_int32_t offset1, u_int32_t offset2, \
size_t nbytes, struct sf_hdtr32 *hdtr, \
off_t *sbytes, int flags); }
337 AUE_NULL NOPROTO { int kldsym(int fileid, int cmd, \
@@ -684,7 +683,7 @@
392 AUE_NULL NOPROTO { int uuidgen(struct uuid *store, \
int count); }
393 AUE_SENDFILE STD { int freebsd32_sendfile(int fd, int s, \
- u_int32_t offsetlo, u_int32_t offsethi, \
+ u_int32_t offset1, u_int32_t offset2, \
size_t nbytes, struct sf_hdtr32 *hdtr, \
off_t *sbytes, int flags); }
394 AUE_NULL UNIMPL mac_syscall
@@ -814,42 +813,74 @@
474 AUE_NULL NOPROTO { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, \
struct sockaddr * from, __socklen_t *fromlenaddr, \
struct sctp_sndrcvinfo *sinfo, int *msg_flags); }
+#ifdef PAD64_REQUIRED
475 AUE_PREAD STD { ssize_t freebsd32_pread(int fd, \
void *buf,size_t nbyte, \
- u_int32_t offsetlo, u_int32_t offsethi); }
+ int pad, \
+ u_int32_t offset1, u_int32_t offset2); }
476 AUE_PWRITE STD { ssize_t freebsd32_pwrite(int fd, \
const void *buf, size_t nbyte, \
- u_int32_t offsetlo, u_int32_t offsethi); }
+ int pad, \
+ u_int32_t offset1, u_int32_t offset2); }
477 AUE_MMAP STD { caddr_t freebsd32_mmap(caddr_t addr, \
size_t len, int prot, int flags, int fd, \
- u_int32_t poslo, u_int32_t poshi); }
+ int pad, \
+ u_int32_t pos1, u_int32_t pos2); }
478 AUE_LSEEK STD { off_t freebsd32_lseek(int fd, \
- u_int32_t offsetlo, u_int32_t offsethi, \
+ int pad, \
+ u_int32_t offset1, u_int32_t offset2, \
int whence); }
479 AUE_TRUNCATE STD { int freebsd32_truncate(char *path, \
- u_int32_t lengthlo, u_int32_t lengthhi); }
+ int pad, \
+ u_int32_t length1, u_int32_t length2); }
480 AUE_FTRUNCATE STD { int freebsd32_ftruncate(int fd, \
- u_int32_t lengthlo, u_int32_t lengthhi); }
+ int pad, \
+ u_int32_t length1, u_int32_t length2); }
+#else
+475 AUE_PREAD STD { ssize_t freebsd32_pread(int fd, \
+ void *buf,size_t nbyte, \
+ u_int32_t offset1, u_int32_t offset2); }
+476 AUE_PWRITE STD { ssize_t freebsd32_pwrite(int fd, \
+ const void *buf, size_t nbyte, \
+ u_int32_t offset1, u_int32_t offset2); }
+477 AUE_MMAP STD { caddr_t freebsd32_mmap(caddr_t addr, \
+ size_t len, int prot, int flags, int fd, \
+ u_int32_t pos1, u_int32_t pos2); }
+478 AUE_LSEEK STD { off_t freebsd32_lseek(int fd, \
+ u_int32_t offset1, u_int32_t offset2, \
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-projects
mailing list