From nobody Tue Aug 08 15:12:49 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RKxX60R1Rz4mTFj for ; Tue, 8 Aug 2023 15:13:10 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic316-54.consmr.mail.gq1.yahoo.com (sonic316-54.consmr.mail.gq1.yahoo.com [98.137.69.30]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4RKxX45t7Gz3YH1 for ; Tue, 8 Aug 2023 15:13:08 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=k782dqcI; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.69.30 as permitted sender) smtp.mailfrom=marklmi@yahoo.com; dmarc=pass (policy=reject) header.from=yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1691507584; bh=cPEe178//oREpq2mCcjYymB7uDAjwBEdg3lTMA3/8x0=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=k782dqcIRtC24htnfXxKggEs6eCUm3EmQ2pdSiulYgecVdMQ/N0FJWrxZw5N9DU6FngVvxlzxb4NlSaslaIqiJWTtdMDxmaCo1kua07/DAic53vyQ+7WFe9cxxueWcU6j6rQE4/8Ni1NlvDB/AU7NhYhxvzD4HpUPZIoQjHWrcChmvkQnMFb1rq9ZU8jSgUL7zDmA9mPzolgMy21o1axWdbdBs3kZZ/vEE23BuyZ7bqACb37X6qqtXy36RY+ToAdhI047TcNxbNan5+QU9xkrbF1GrK5nOfhWk+DXcnfP6Q4nHXAjb7+G285XDpE0Icsd+zW+B7SP6w+tZtMCtfvnA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1691507584; bh=AdWevLvm5rTIhiqQ455l+gaOLv4nDqKnajcfYMU7OuX=; h=X-Sonic-MF:Subject:From:Date:To:From:Subject; b=MhGz3qYtsDxJBvAlt4cs5dkd9KqQn31sCWyIFL4G3MIUkdR5R5D07Q26cy9vj8Vq2XaC4KcasA1nO0zMmGU1UHV+0GL/yNsDjzJx3eyhes+4ThY9UYJtvy70AIG3FHvrv1QljcMuLL9xuN9EnINhnHxxM3yl5sxLGDjaLya08WGlmSUNMs49iwLZbLoHuxFowDRz+5mHbV/Bq7Dou48gVVpkDVi7W8OyYEsRmheu8+YM3jonPRQwDhGkE3XOyBzIIIw2s+ZAh+njPjM3Aq0QlrI0+hQctAwuS3mhivePBUnrRvgpSFhxNlZXFKGh3tf3R72VN2IhVdnZy9hdP7PyEw== X-YMail-OSG: WxT0T1EVM1lSYNhwiSfnCsMohuAvYzm6Ju3qXQ4KIZw6vjZDeDgtt1LjP1KPZwE HKJPGzZ7E2QjTPgklZcL1fsDJ6p7Eteca4igVa5tx8QzVCbo6bYqjFV1GNyKcvsYez5MdWUcUdLc y2fRHAwrQPaEvVmRHs2wQgj9B2Y7hM2t3WEgfI6vA6rBimZKz7beWND7h7cmPU9qCayyBEQ9N6dU isvcPuV.HSE5etqjriRS6WIe_yyxJTaqPUz.M.b.1fw1R0zTfZSI47NwMMJ3MsQS4FM6tITcT07z Iqfuxo.q9Znv.oKPn1njGHXxmgNPyP445OOvCzE3BwPMYQ6K35icywHlAPpfs5sp13UDMep9y6nH 3bW_VURJAQfIs5RB1m3Tw1GIQvqWjp0Xq0aXCRnQgh6N9bYvyuNMNUJry8fiJ2J3zMmNbef4lrMI CeWdJoMGOV_dVej9rdceipSRbDBZMCdiqv.tsfHPKGeLrjHcIec4wyuwKbDvVgmxqsz996CQsisY H252lV94.jaRzhI07MJc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DIa9ckKAV77LzFqPKFsSLmOPtS5wYD8.SylXXUofSNYQ CliSy2o2yG2.wfQpGHZsXWSE02ei_82GREynA8mGveHbWRARqP1Pg5a31BOLChhA4BPhSOBumEdA UaTYCuvedB9g47ugEp9.uX280XkDBznT1yrFmszZ_d8FP0bVHf_E.I1Ha82vNYRm3pzryEpnGNUX TTKCEj5KZ3euyEmAsOhtAtw99EGti_kWm7yC_YAwWc86MY3W90jrGhLZucKmoY2kPM8ZqdrFW0cN N_yhqAw.CZzkj8v1zuiOZ9ApwHQZIYM8SfnPb2mwPJVRfSaWMOsFSmBvFqFsOBHfzRNkHWSbA.Ca SxunKiX6lmBq8nker4Hk_iRfUxgiRSPVC4QrjY1CkpFYl6oWCHLy_BBBh5ZvLEzXM.nLotVQIjpf n03SD3Lq5Y40JwlPO893LMGdqKz3Ae5TmeNqyh.lI2USdh0eTFG7zI9pt4iY80cYihYv09_8fljL 1b.cu5nytvn.HhrOeALJFPuYbh8FZ0EUZNMOgfyOB36rI3dLzaevHgCOJfRSMvL6YvG7Yp0k3YMN Uo.TI4BYOoV76OjTJQfBVVTYtV0J.mOO.Ami7r_NFXVuKZ1Kk2S_2.Jzurg5SG0Mxpwe2pGGIUWo 75tn_KerfQ885gfDZ1JTHYTh8m.Tpon6kbiErIKgrPEehVMX4x.7P8lA7biMin2qhuy70IeHz9Q- - X-Sonic-MF: X-Sonic-ID: 6a490aca-348b-408d-81a5-f5f5b0e19a8b Received: from sonic.gate.mail.ne1.yahoo.com by sonic316.consmr.mail.gq1.yahoo.com with HTTP; Tue, 8 Aug 2023 15:13:04 +0000 Received: by hermes--production-bf1-865889d799-g7m4g (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 3f090a9fcaa4b1fe50eff19500b12035; Tue, 08 Aug 2023 15:13:02 +0000 (UTC) Content-Type: text/plain; charset=us-ascii List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: sys/modules/Makefile and MACHINE_ARCH vs arm64 (in use) vs aarch64 (not in use) VS. man arch; also COMPAT_FREEBSD32_ENABLED use From: Mark Millard In-Reply-To: Date: Tue, 8 Aug 2023 08:12:49 -0700 Cc: Current FreeBSD , FreeBSD ARM List Content-Transfer-Encoding: quoted-printable Message-Id: References: <2B0FE8B1-5E53-4E70-9792-15A8E423CA33@yahoo.com> To: Warner Losh X-Mailer: Apple Mail (2.3731.700.6) X-Spamd-Result: default: False [-3.49 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.990]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; MV_CASE(0.50)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_THREE(0.00)[3]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.69.30:from]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.69.30:from]; DKIM_TRACE(0.00)[yahoo.com:+]; TO_DN_ALL(0.00)[]; FREEMAIL_FROM(0.00)[yahoo.com]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; RCVD_COUNT_TWO(0.00)[2] X-Spamd-Bar: --- X-Rspamd-Queue-Id: 4RKxX45t7Gz3YH1 On Aug 2, 2023, at 17:25, Mark Millard wrote: > On Aug 2, 2023, at 12:56, Mark Millard wrote: >=20 >> On Aug 2, 2023, at 11:16, Warner Losh wrote: >>=20 >>> Those all look wrong to me. >>>=20 >>> Warner=20 >>>=20 >>> On Wed, Aug 2, 2023, 11:27 AM Mark Millard = wrote: >>> man arch reports: >>>=20 >>> MACHINE MACHINE_CPUARCH MACHINE_ARCH >>> arm64 aarch64 aarch64 >>> . . . >>> arm arm armv6, armv7 >>>=20 >>> So I'd not expect arm64 in MACHINE_ARCH . But >>> sys/modules/Makefile has (from a grep for MACHINE_ARCH): >>>=20 >>> .if ${MACHINE_ARCH} =3D=3D "amd64" || ${MACHINE_ARCH} =3D=3D "arm64" >>> .if ${MACHINE_ARCH} =3D=3D "amd64" || ${MACHINE_ARCH} =3D=3D "arm64" = || ${MACHINE_ARCH:Mpowerpc64*} >>>=20 >>>=20 >>> Another issue may be that COMPAT_FREEBSD32_ENABLED is only >>> put to use in the Makefile for MACHINE_CPUARCH being i386 >>> or amd64 : >>>=20 >>> .if ${MACHINE_CPUARCH} =3D=3D "i386" || ${MACHINE_CPUARCH} =3D=3D = "amd64" >>> _agp=3D agp >>> .if ${MACHINE_CPUARCH} =3D=3D "i386" || = !empty(COMPAT_FREEBSD32_ENABLED) >>> . . . >>=20 >>=20 >> I'll note that, for example, i386 vs. armv7 do not match >> for some struct md_ioctl field offsets and the overall >> size. >=20 > Turns out no member offsets were different but the size > was: just differing tail padding in the structure. Still > it means some conditional differences across i386 and > armv7. (I've no clue if the 32-bit powerpc lib32/chroot > handling is working on powerpc64 vs. not. So I make no > claims relative to such.) See: = https://lists.freebsd.org/archives/dev-commits-src-main/2023-August/017561= .html (git: 58a46cfd751a - main - md driver compat32: fix structure padding = for arm, powerpc) for Mike Karels' fix for main for that "turns out". It avoids one kind of kyua run problem for armv7 on aarch64, since mdconfig is used for some of the tests. (The ${MACHINE_ARCH} =3D=3D "arm64" and COMPAT_FREEBSD32_ENABLED use are still as they were in sys/modules/Makefile . This note is not about that issue.) >> Mike Karels is looking at getting struct md_ioctl32 >> correctly matching each of of the contexts: i386, (32-bit) >> powerpc, and armv7. >>=20 >> I do not know if there are other COMPAT_FREEBSD32 adjustments >> needed for differences in memory layout across the 3 (i386, >> powerpc, armv7). md_ioctl I learned about via kyua test runs >> and looking at the background for some things it reported for >> armv7. >>=20 >> I've not found a clear indication of what is expected to work >> for chroot/lib32 vs. what is not expected to work. It seems >> one must look in the code and see if one finds conditional >> material based, in part, on COMPAT_FREEBSD32. It might also >> be that COMPAT_FREEBSD32 for i386 vs. armv7 vs. powerpc >> might not be intending identical coverage for all I know. >> So seeing COMPAT_FREEBSD32 might not be enough to know the >> intent. =3D=3D=3D Mark Millard marklmi at yahoo.com