Date: Wed, 18 Nov 2009 17:47:40 +0000 (UTC) From: Nathan Whitehorn <nwhitehorn@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r199488 - projects/ppc64/sys/compat/freebsd32 Message-ID: <200911181747.nAIHlecm079077@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: nwhitehorn Date: Wed Nov 18 17:47:40 2009 New Revision: 199488 URL: http://svn.freebsd.org/changeset/base/199488 Log: Add padding for arguments passed as 64-bit types. The 32-bit SVR4 ABI requires that 64-bit values be passed starting only in odd-numbered registers. This lets me bring a PPC64 kernel up multiuser! Note that this is a hack (see: changes to an autogenerated file). Better solutions will hopefully be forthcoming. Modified: projects/ppc64/sys/compat/freebsd32/freebsd32_proto.h Modified: projects/ppc64/sys/compat/freebsd32/freebsd32_proto.h ============================================================================== --- projects/ppc64/sys/compat/freebsd32/freebsd32_proto.h Wed Nov 18 17:45:48 2009 (r199487) +++ projects/ppc64/sys/compat/freebsd32/freebsd32_proto.h Wed Nov 18 17:47:40 2009 (r199488) @@ -352,6 +352,9 @@ 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)]; @@ -364,6 +367,9 @@ 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)]; @@ -378,6 +384,9 @@ 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)]; @@ -388,6 +397,9 @@ struct freebsd32_mmap_args { }; 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)]; @@ -399,6 +411,9 @@ struct freebsd32_lseek_args { }; 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)]; @@ -409,6 +424,9 @@ struct freebsd32_truncate_args { }; 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)]; @@ -419,6 +437,9 @@ struct freebsd32_ftruncate_args { }; 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)];
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911181747.nAIHlecm079077>