From owner-freebsd-ia64@FreeBSD.ORG Wed Mar 10 12:23:54 2010 Return-Path: Delivered-To: freebsd-ia64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0ABA1106564A for ; Wed, 10 Mar 2010 12:23:54 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 6DE788FC08 for ; Wed, 10 Mar 2010 12:23:53 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o2ABkCoZ004178 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 10 Mar 2010 13:46:12 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id o2ABkChu082877; Wed, 10 Mar 2010 13:46:12 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o2ABkC8i082876; Wed, 10 Mar 2010 13:46:12 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 10 Mar 2010 13:46:12 +0200 From: Kostik Belousov To: Nathan Whitehorn Message-ID: <20100310114612.GX2489@deviant.kiev.zoral.com.ua> References: <4B971CA3.9090301@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="QG1B2ADVu5UY+Mah" Content-Disposition: inline In-Reply-To: <4B971CA3.9090301@freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-emulation@freebsd.org, freebsd-amd64@freebsd.org, freebsd-ia64@freebsd.org Subject: Re: Request for review/comments: 32-bit compat for non-x86 architectures X-BeenThere: freebsd-ia64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the IA-64 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Mar 2010 12:23:54 -0000 --QG1B2ADVu5UY+Mah Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 09, 2010 at 10:14:27PM -0600, Nathan Whitehorn wrote: > The patch at http://people.freebsd.org/~nwhitehorn/compat_freebsd32.diff= =20 > (pre-generated freebsd32 syscalls stuff is included, which will be done= =20 > in two steps on commit) provides groundwork for supporting 32-bit=20 > compatibility for 64-bit MIPS and PowerPC systems. It has been tested on= =20 > amd64 and powerpc64, and compile-tested on ia64. There are two main=20 > parts to the patch: >=20 > 1) COMPAT_IA32 is renamed COMPAT_FREEBSD32, in analogy to=20 > COMPAT_LINUX32, etc. This requires updating kernel configurations, but=20 > is less painful than filling machine-independent bits of the kernel with= =20 > #if defined(COMPAT_IA32) || defined(COMPAT_PPC32) ||=20 > defined(COMPAT_MIPS32) || ..., and is no less descriptive than the old na= me. >=20 > 2) Modifications to the freebsd32 compat layer to support big-endian=20 > architectures. >=20 > I would appreciate any comments, bugs, or test results on ia64. > -Nathan This fragment --- sys/kern/imgact_elf.c (revision 204681) +++ sys/kern/imgact_elf.c (working copy) @@ -75,7 +75,7 @@ #include #include =20 -#if defined(COMPAT_IA32) && __ELF_WORD_SIZE =3D=3D 32 +#if (defined(__amd64__) || defined(__ia64__)) && __ELF_WORD_SIZE =3D=3D 32 #include #include #endif probably should be changed ? How are struct reg32 for !ia32 case is brought into the imgact_elf ? Can it be unified for ia32 case ? (Similar fragment is present in sys_process.c at least). I do not understand how +#if !defined(PAD64_REQUIRED) && defined(__powerpc_= _) etc lines are generated. You may want to change sysent->sv_flag SV_IA32 to SV_FREEBSD32, or add SV_FREEBSD32. You might want to review SV_IA32 usage, if any. --QG1B2ADVu5UY+Mah Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkuXhoQACgkQC3+MBN1Mb4g8yQCfYgOqrFsxa2YW+UfupKgdo1Bk bjAAoMPjQW1oYngAdGp3KG2DxD7eu5JO =7Uzw -----END PGP SIGNATURE----- --QG1B2ADVu5UY+Mah--