From owner-freebsd-arm@FreeBSD.ORG Thu Feb 12 16:29:29 2015 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31EC555F for ; Thu, 12 Feb 2015 16:29:29 +0000 (UTC) Received: from mail-ie0-f181.google.com (mail-ie0-f181.google.com [209.85.223.181]) (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 E9A7E982 for ; Thu, 12 Feb 2015 16:29:28 +0000 (UTC) Received: by iecrl12 with SMTP id rl12so10665851iec.4 for ; Thu, 12 Feb 2015 08:29:27 -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=s89UB4ohmw/J8GUeYpvcacC9O2+RU6shKuQ84yvvWpU=; b=iSi/fzrrtRqq9GrLsvg1H6hMC+SCgRU3Iybuu7jdaiRDpHeqt44ECZ057ysYDeLCQq 1BjfBFG0CxaamQ56+8x+tIjHLYhKwN/kB/Nwp9x84te341WFB1slmzgOcbhHxKbYBWK8 UmFVZmSJ8QRyar6CWsdkVYekEf6AsYR0bt/X3URwf8PgPHjwFh6kIQkmhr9VBUYFJNXE aYpDPowefCgVIL60V2tjG7UhuHSb720mzuQJ7CU21cd6IB8Sh60DW88HzmQSk3A/S20f zAiG1Qko9yI7bopojp9v24mjGZ8bbO38oxmA49NXnoPrMb4+Ng0/UpBAxFSiAa/8taFp Xgxw== X-Gm-Message-State: ALoCoQl7Q701Z1koJSLFwTnrqW0BqmtkjFrMaAMVxIRzwFGLsib35tuTG1K/dPz13SOSu0OBgJYi X-Received: by 10.107.19.89 with SMTP id b86mr5561633ioj.35.1423758567540; Thu, 12 Feb 2015 08:29:27 -0800 (PST) Received: from netflix-mac-wired.bsdimp.com ([50.253.99.174]) by mx.google.com with ESMTPSA id o8sm1460782igp.11.2015.02.12.08.29.26 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 12 Feb 2015 08:29:27 -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: Thu, 12 Feb 2015 09:29:25 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <228428CC-4042-4902-90A4-E7040F4BFFF5@bsdimp.com> References: <607BF592-A09B-4DB4-9872-C9E63066AB57@bsdimp.com> <71E9C1B9-F819-420B-90A5-A36D58E71817@bsdimp.com> 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 16:29:29 -0000 > On Feb 12, 2015, at 9:05 AM, Ed Maste wrote: >=20 > On 12 February 2015 at 01:54, Warner Losh wrote: >>=20 >> They moved the sources in the kernel from aarch64 to arm64. I=E2=80=99m= sure. >=20 > Oh - I don't care what directory Linux puts the kernel source in, only > what's reported by uname. As far as I can tell that has always been > aarch64 for uname -m. Traditionally in Linux, they have been a matched set. >> config.guess uses uname -p: >>=20 >> *:FreeBSD:*:*) >> UNAME_PROCESSOR=3D`/usr/bin/uname -p` >> echo ${UNAME_PROCESSOR}-unknown-freebsd`echo = ${UNAME_RELEASE}|sed -e 's/[-(].*//'` >> exit ;; >=20 > Ah, yes - it looks like this has changed repeatedly over time, and I > must have looked at a rather outdated config.guess. It's clear from > this snippet though that this is a special case for FreeBSD, and most > other cases rely on uname -m. I also found a few other configure-like > scripts that only use uname -m. >=20 >> so uname -p must be =E2=80=98aarch64=E2=80=99 since that=E2=80=99s = what is expected. >=20 > Yes, I agree this is necessary. One done, one to go :) >> uname -m must >> be arm64 unless we move our kernel implementation to sys/aarch64 from = the >> sys/arm64 it is now. >=20 > We might decide that "uname -m" has to be aarch64 to match > expectations of third-party software set by other operating systems. > If that in turn means we have to move the kernel source, so be it. This one I=E2=80=99m not on board with. You=E2=80=99ve not made a = compelling case for it yet. Some scripts is a little vague for my liking, especially given = the justification for amd64 we had at the time we made that decision (they were also about compatibility, official names, and vague notions of correctness). One other area that these choices impact the system is in the = MACHINE_CPUARCH macro, which is derived from MACHINE_ARCH (-p), so it might need another special case. There=E2=80=99s also a number of places we test different = of these variables against arm* that will need to be audited if we make this change = as well. Thankfully, there=E2=80=99s only about a dozen. While not externally = visible, any change here will need to make sure we=E2=80=99re consistent when building. Warner=