From nobody Wed Aug 02 18:16:40 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 4RGKxV3192zZfKq for ; Wed, 2 Aug 2023 18:18:53 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) (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-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RGKts4vH9z4Rcs for ; Wed, 2 Aug 2023 18:16:53 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20221208.gappssmtp.com header.s=20221208 header.b=XHuhOymg; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2a00:1450:4864:20::12e) smtp.mailfrom=wlosh@bsdimp.com; dmarc=none Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-4fe1344b707so188825e87.1 for ; Wed, 02 Aug 2023 11:16:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20221208.gappssmtp.com; s=20221208; t=1691000212; x=1691605012; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=MXV+zd2Do8aYpEYfdwf5KzmM24s5tVaNrRJnM24l+CE=; b=XHuhOymgZH7serzmoBjLi5bYc4594c7jWefvGlmZy4N6zuNdActTgcjL1kuPht8EXd c+WPpkIYxcdAwcpKEbfg71c0jTeMKh6FASxsOxMixuhtVBRhi2bUFbHN6Rs3/CIJfKWM DL7f1k0Kj5XpTrgH2ZC09Ist981+uhAEyQkSDelhU0A9LxcaYhMEwZ27X8kdK/XWOzDx tdf6s01XcrL+v8v4jdFa4cV2l0Y3SElApYBZBjg2SfueNcgpxMf8ZP/P+7fPzyY/6B6l vUZ3r71R3IJAwcwf63ZNFJKzjySC6kNhtQsJ1AhKzHxklNlHRH/PoBcP1UCKTTf+Tfkp Wa7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691000212; x=1691605012; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=MXV+zd2Do8aYpEYfdwf5KzmM24s5tVaNrRJnM24l+CE=; b=Lme90c8VO7Gl7hGmN2YZNwwUdJ+7zaTgfr2jE0Druj98PFeq1RqfiHUO9EAgok5q5z Dm7xOXuZUbp6x+Ab0Wsv3mCC9PoSCRii35ID+aE7JAZkm7fBNImtzkALNnPov7JtU6u5 TmTFMbC8NEK7f6ZtNESE12OnrL7mvKAHk5SjDUkMP5hJ7uisZjsm3370iYTTquRDY3wU gpNg2Bx0KHkesDA9OjiS58ozsiJJjPDe65DrE9oOaJT50ZgCbhCCZxrNHNSs0Vjx5PAB +3Hm97JruFmA7s8S/KhIJd4OOoNB++WTDmMek1CHibpUnwKuC8DpStri8Ihnit6vwV2o VaAQ== X-Gm-Message-State: ABy/qLYLNB1KsyHiw1zC0jGOyAv+EC5z4GYC5Pomqc64jSZ5KTT4gepg ngdwiBWFb0qdWV3QIB6pCtIA6Ul2I4ObrbYsJdoM3w== X-Google-Smtp-Source: APBJJlH3yj531rDeKu7lpm4GoefNwL7ohOChYSCAGsDVfVyHdoy8U/slqNlwcNUDLZ6jCWOx1JJ8Xwgm+GdJvvnER/c= X-Received: by 2002:a19:8c06:0:b0:4fd:f80d:f6a3 with SMTP id o6-20020a198c06000000b004fdf80df6a3mr4599732lfd.43.1691000211586; Wed, 02 Aug 2023 11:16:51 -0700 (PDT) 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 References: In-Reply-To: From: Warner Losh Date: Wed, 2 Aug 2023 12:16:40 -0600 Message-ID: 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 To: Mark Millard Cc: Current FreeBSD , FreeBSD ARM List Content-Type: multipart/alternative; boundary="000000000000ed657e0601f4aab3" X-Rspamd-Queue-Id: 4RGKts4vH9z4Rcs X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.99 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; NEURAL_HAM_SHORT(-0.99)[-0.993]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20221208.gappssmtp.com:s=20221208]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; FREEMAIL_TO(0.00)[yahoo.com]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org]; R_SPF_NA(0.00)[no SPF record]; ARC_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::12e:from]; DKIM_TRACE(0.00)[bsdimp-com.20221208.gappssmtp.com:+]; TO_DN_ALL(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; FROM_HAS_DN(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DMARC_NA(0.00)[bsdimp.com]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com] --000000000000ed657e0601f4aab3 Content-Type: text/plain; charset="UTF-8" Those all look wrong to me. Warner On Wed, Aug 2, 2023, 11:27 AM Mark Millard wrote: > man arch reports: > > MACHINE MACHINE_CPUARCH MACHINE_ARCH > arm64 aarch64 aarch64 > . . . > arm arm armv6, armv7 > > So I'd not expect arm64 in MACHINE_ARCH . But > sys/modules/Makefile has (from a grep for MACHINE_ARCH): > > .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "arm64" > .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "arm64" || > ${MACHINE_ARCH:Mpowerpc64*} > > > Another issue may be that COMPAT_FREEBSD32_ENABLED is only > put to use in the Makefile for MACHINE_CPUARCH being i386 > or amd64 : > > .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" > _agp= agp > .if ${MACHINE_CPUARCH} == "i386" || !empty(COMPAT_FREEBSD32_ENABLED) > . . . > > > > > === > Mark Millard > marklmi at yahoo.com > > --000000000000ed657e0601f4aab3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Those all look wrong=C2=A0to me.

Warner=C2=A0

On Wed, Aug 2, 2023, 11:27 AM Mark M= illard <marklmi@yahoo.com> w= rote:
man arch reports:

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0MACHINE=C2=A0 =C2=A0 =C2=A0 =C2=A0= MACHINE_CPUARCH=C2=A0 =C2=A0 =C2=A0 =C2=A0MACHINE_ARCH
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0arm64=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0aarch64=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0aarch64=
. . .
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0arm=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0arm=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0armv6, armv7

So I'd not expect arm64 in MACHINE_ARCH . But
sys/modules/Makefile has (from a grep for MACHINE_ARCH):

.if ${MACHINE_ARCH} =3D=3D "amd64" || ${MACHINE_ARCH} =3D=3D &quo= t;arm64"
.if ${MACHINE_ARCH} =3D=3D "amd64" || ${MACHINE_ARCH} =3D=3D &quo= t;arm64" || ${MACHINE_ARCH:Mpowerpc64*}


Another issue may be that COMPAT_FREEBSD32_ENABLED is only
put to use in the Makefile for MACHINE_CPUARCH being i386
or amd64 :

.if ${MACHINE_CPUARCH} =3D=3D "i386" || ${MACHINE_CPUARCH} =3D=3D= "amd64"
_agp=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0agp
.if ${MACHINE_CPUARCH} =3D=3D "i386" || !empty(COMPAT_FREEBSD32_E= NABLED)
. . .




=3D=3D=3D
Mark Millard
marklmi at yahoo.com

--000000000000ed657e0601f4aab3--