From owner-freebsd-arm@FreeBSD.ORG Thu Feb 12 00:20:11 2015 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F12D3CE for ; Thu, 12 Feb 2015 00:20:10 +0000 (UTC) Received: from mail-ig0-f169.google.com (mail-ig0-f169.google.com [209.85.213.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B904F2FC for ; Thu, 12 Feb 2015 00:20:10 +0000 (UTC) Received: by mail-ig0-f169.google.com with SMTP id hl2so1421303igb.0 for ; Wed, 11 Feb 2015 16:20:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=88mAY65G+OVrYZINwKwB9t048iRoUxIb6a9FlXgJfhM=; b=g40V/vod78Fj2ENdivXAotDGvebx5F30cw7JJk3CQ1me/YhyL7SDj3Pv7dVpVsPWw2 5ZMNDbXZkqbxXRTolVlWXsSV5LNpG/jyJm4e1bEJixDnAMZz8PQmtLCTzUuk3EeQEzFA 4tqN5+dvoS0/cXViuIjc54VTIs2fjyiEerJNnPROGatS4JjS8IgBNz1wEkZgLeZK1N4q OwwH5HxECk5mttI2qqrtZx48MUsBTtid1AdsI94r5W/MQnNYaVZFgO5UDKdVYjCT+rjC TGdh5l5VpciVqwyIAiogsuhn1vWfu67rgmsmWQqOowG4tf9s1EsKrxdKfKvje7guqs/z Fgjw== X-Gm-Message-State: ALoCoQnD25hkMSpPtiePtWDC4CLp6IjOBnjJ+X4INpUsFL2R/316tzArMD/ZysOWKwQ9D/a2Qr3a X-Received: by 10.42.113.2 with SMTP id a2mr5968865icq.30.1423700404747; Wed, 11 Feb 2015 16:20:04 -0800 (PST) Received: from netflix-mac-wired.bsdimp.com ([50.253.99.174]) by mx.google.com with ESMTPSA id i2sm1365613ioi.41.2015.02.11.16.20.03 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 11 Feb 2015 16:20:04 -0800 (PST) Sender: Warner Losh Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: FreeBSD/arm64 MACHINE/MACHINE_ARCH identification From: Warner Losh In-Reply-To: Date: Wed, 11 Feb 2015 17:20:03 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <607BF592-A09B-4DB4-9872-C9E63066AB57@bsdimp.com> References: To: Ed Maste X-Mailer: Apple Mail (2.2070.6) Cc: "freebsd-arm@freebsd.org" X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 00:20:11 -0000 > On Feb 11, 2015, at 10:41 AM, Ed Maste wrote: >=20 > The FreeBSD/arm64 work in progress currently reports "arm64" for the > machine and processor type - i.e., uname -m and uname -p. Linux used the original aarch64, but later changed to arm64. I suggest that we follow this carefully. We botched the naming of amd64 and have dozens of warts in our build system because of it. > It seems that the official, awkward name aarch64 is broadly used > elsewhere - for example, in toolchain triples and autoconf tests. To > save us grief in the future I think it is worth following suit: >=20 > diff --git a/sys/arm64/include/param.h b/sys/arm64/include/param.h > index 5cd0445..525a0e7 100644 > --- a/sys/arm64/include/param.h > +++ b/sys/arm64/include/param.h > @@ -43,10 +43,10 @@ > #define STACKALIGN(p) ((uint64_t)(p) & ~STACKALIGNBYTES) >=20 > #ifndef MACHINE > -#define MACHINE "arm64" > +#define MACHINE "aarch64" > #endif This defines the kernel architecture. History with amd64 suggests that = we should have had machine amd64 an machine_arch x86_64. We have modo = places in the tree, and in external files, that do a s/amd64/x86_64/ = that=E2=80=99s only done for amd64. > #ifndef MACHINE_ARCH > -#define MACHINE_ARCH "arm64" > +#define MACHINE_ARCH "aarch64" > #endif >=20 > I'm not proposing that we rename any of the source files. I believe > this approach is consistent with the Debian project - they call it the > "arm64" port, but report aarch64 from uname. You can=E2=80=99t propose this change and *NOT* be proposing we rename = the system files. $MACHINE *IS* the directories that we keep the kernel files in, by = definition. > I believe it will be much easier for us to carry around any > special-case s/aarch64/arm64/ in the base system (if necessary) than > trying to teach third-party software that the FreeBSD 64-bit ARM > architecture is called arm64 instead of aarch64. >=20 > Any objections or concerns? I strongly object to the MACHINE change for reasons stated above, but = the MACHINE_ARCH is likely a very good change since it aligns with the expected values = for configuring things like clang, gcc, bintuils, etc. We should also change Makefile.inc to set MACHINE_ARCH to aarch64 when = MACHINE is arm64. Warner