From owner-freebsd-arm@freebsd.org Mon Jun 12 19:16:50 2017 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C582C0A8B5 for ; Mon, 12 Jun 2017 19:16:50 +0000 (UTC) (envelope-from russ.haley@gmail.com) Received: from mail-lf0-x22f.google.com (mail-lf0-x22f.google.com [IPv6:2a00:1450:4010:c07::22f]) (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 7D2EB7A6A2 for ; Mon, 12 Jun 2017 19:16:49 +0000 (UTC) (envelope-from russ.haley@gmail.com) Received: by mail-lf0-x22f.google.com with SMTP id m77so31837258lfe.0 for ; Mon, 12 Jun 2017 12:16:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Y/ie2/YgrADF52hSHf0nsdoNfnqQGM6PFeAVG130urM=; b=NgeBbLFk3zdQD81r6GIzs+z+nrc7s+kBlfYoNqQvLL/NxrKYczF07KpZFYE43pq78d UKHome1tzaYSjIFIsY+dmRCtR+XbbB/B8agW2Rx/hSQXRv0AmK+tx5jLJOs9bfU9IRPB mbjESyfqmio3CSohuFKcR+HjIpMyAMipM64iRA6HvT2vcY55p5ufYfuXHTRc3FqU2fNA Lyk12BsZQiT+hYDepQMWge2YHpoiUhTpQDaKbEvgGLAXshmqaUz7+a6bQ6D4HshxLIBt qQmjEo1iLy3wOlDNGaeqUtZ0sn+XzKp7r+LMQJq/RQalDHOMLFRBQLZOf/CUCQmtfSPK 0wyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Y/ie2/YgrADF52hSHf0nsdoNfnqQGM6PFeAVG130urM=; b=OHOkFEYkxztIGIbVCj3DKzNjGwo4ryZ/qlrSI4yqQQEY3O5V4Fq+tZEl+lVuCyjLsh xOHQ5W1RxbPfHgP9ekVNNQoq4njP6IiSJ5kI/ZDH0cWuQSq9FqK8aT3TUTiIf9W9uWYJ JiBg9oVuppNHOsLBGhiytPkxPlXMIoIftQbFTN9/GfdfU91a/wu4atQeQ971d7+6SIFJ u7izbCy+tlR5VZhNoL0GxV79oAt8hDNlGiJ3SY+jN7Noi4l9JfM7Q96mL1zpD2RozuyG lTPLxMQMKSs5mrolazH5GFzrUQribSgR1wXBl1zMEvL+IYSR3Hbv6HTE2xPsgSgnhTkE 0ztA== X-Gm-Message-State: AODbwcBbFC/LLvgdHRjRW6Vncx+FZU5I5xH1amFXC35QXYTymSzGUI4l jgGKeeq16egjQ/vX/kYqsZLeeNv3lc+d X-Received: by 10.46.83.23 with SMTP id h23mr8472952ljb.70.1497295007710; Mon, 12 Jun 2017 12:16:47 -0700 (PDT) MIME-Version: 1.0 Received: by 10.46.82.196 with HTTP; Mon, 12 Jun 2017 12:16:46 -0700 (PDT) In-Reply-To: References: <20170612152808.6094931.74364.27128@gmail.com> From: Russell Haley Date: Mon, 12 Jun 2017 12:16:46 -0700 Message-ID: Subject: Re: Creating armv7 MACHINE_ARCH To: Mark Millard Cc: Warner Losh , "freebsd-arm@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jun 2017 19:16:50 -0000 On Mon, Jun 12, 2017 at 10:36 AM, Mark Millard wrote: > > On 2017-Jun-12, at 8:39 AM, Warner Losh wrote: > >> . . . >> >> Plus, we aren't quite doing what Ian wanted. He wanted a full rename. The >> proposal on the able is to add an armv7 TARGET_ARCH in 12. Not to rename or >> remove armv6. Sadly, that will still be there since the RPI foundation >> keeps finding new ways to repackage the rpi into new boards that are just >> too cheap to ignore. > > On 2017-Jun-12, at 6:59 AM, Andrew Turner wrote: > >> I like this. My understanding is adding armv7 would also fix many of the currently broken ports that assume they are being built for armv7 as many Linux distros target ARMv7+. >> >> It should also be noted the GENERIC kernel is likely to only ever target ARMv7+ even without an armv7 TARGET_ARCH. > > > Hopefully the choices related to TARGET and TARGET_ARCH > for armv7 end up identifying the context to port builds > so that many would just automatically do the right thing. > > > As for GENERIC: > > powerpc has. . . > > TARGET=powerpc TARGET_ARCH=powerpc and GENERIC > TARGET=powerpc TARGET_ARCH=powerpc64 and GENERIC64 > > So there is precedent for more than one GENERIC* > for a family, with which one being appropriate > being based on TARGET_ARCH. > > For powerpc TARGET=powerpc implicitly uses > TARGET_ARCH=powerpc when TARGET_ARCH is not > specified (if I remember right). Which should > be the default for armv6 vs. armv7 might go > the other direction (TARGET_ARCH=armv7 by > default). > > > Side note: > > A caution about talking about "rpi2" as > an example. . . > > Raspberry Pi 2 Model B V1.2 is Cortex-A53 based > (so arm64/aarch64). (A BCM2837, not a BCM2836.) > This dates about to something like 2014 based > on the pictures showing the (c) notice on the > boards. > > V1.1 and before were armv7 (BCM2836) based. > > Unless a kernel and world are made that can > also configure/handle a Cortex-A53 in a > armv7-like manor there will be two different > GENERIC builds in order to span the "rpi2" > family, based on just V1.2+ vs. V1.1 and > before. > > (A single, modern distribution of the official > Raspbian software for the rpi2 does support > all the V1.x boards if I understand right.) I am confused. I don't see any documentation about Raspbian supporting 64 bit? >From Arm at https://www.arm.com/products/processors/cortex-a/cortex-a53-processor.php: "The Cortex-A53 supports the full ARMv8-A architecture. It not only runs 64-bit applications also seamlessly and efficiently runs legacy ARM 32-bit applications." I assume that means it handles armv7-A without issue? (In fact, many on this board know it does) >From the outside it looks like "we" are causing headaches by tracking architecture (32/64) instead of instruction set (armv7 vs armv8)? Just some spitballing: When it comes to ARM would it be advantageous to do: TARGET=arm TARGET_ARCH=armv8 #defaults to ARCH=32 or the real setting that I didn't pull from my derriere. or TARGET=arm TARGET_ARCH=armv8 ARCH=64 OR conversly add an "instruction" variable? In my very novice view, we're not really talking about architectures, we are talking about the different instruction sets and the concepts are still being blurred together. https://en.wikipedia.org/wiki/ARM_architecture#Architectural_licence Russ