From owner-freebsd-arm@freebsd.org Sat Sep 9 21:30:32 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 B44C1E0B414 for ; Sat, 9 Sep 2017 21:30:32 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x229.google.com (mail-it0-x229.google.com [IPv6:2607:f8b0:4001:c0b::229]) (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 76DA87E350 for ; Sat, 9 Sep 2017 21:30:32 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x229.google.com with SMTP id v19so7520652ite.0 for ; Sat, 09 Sep 2017 14:30:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=bYn8uCIw8A2pSEpIETK8KvSe+49m3Zmlu+EGfxWv2FM=; b=IxFjiS6p5F3vZ4EbdqyDGEotPR11/aZWx7ZQbLR7Rur/UzqxzmpaeMUQ55BUoDbVwZ 35CzbP9JRvOnQT98r+8eiWAgApVPeHA6cHcxz24u1eqSDrXNsqkfJuijM0tqKPCr26wG gn6bg4RclEFpC527l5xXi/DzxBYQ+ymQlkMktJPJBsN3XpdwgxHOWQVktuOvTATmznnz XIdt8jMkYEwIFqyP8DVRjJir6MRfU4ToM9HEsEUHJ4l8qZCzGtPek+Gy+cONpSLU2rgC OU7swR2lHm1btXroEYIuZT5nTxhjscc9hEgfgcINuFdn0VwurJdEXHKMWB9XBWYpcDqb q6ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=bYn8uCIw8A2pSEpIETK8KvSe+49m3Zmlu+EGfxWv2FM=; b=lxkGzvNa0AIvxqtyTSPnEMp7fqVt7AGg1yyN7arXFoj9PNdlhNSgU84l5iM58EJnLD Q8CcO1+Pmx/l5beL90pxEVC9WN530Db5avB/9mFqfAMG9oJuKvKlJhKt4oqVIKGs3MfK 3TL0Zcv+HUdvpBBWPDd4KvcMiQ/P50Rq+62+2o7gnRHlcvKjv+iH5w+ng2wKKdeO5RYP It9MA1P+0ptiBwJZ2cfsk7OKA7HA0sj9J9teyG8G/o4C38exzyl1xRNEdTknAExXtDUB j7jUJORQKbHKqIkpuDX6bSUFFjC/iDzBikpQzpgXpoKNf/NG6cJuTW/rsfONdPtC9xvj hK5Q== X-Gm-Message-State: AHPjjUi8c85u3CbIm3h/8sOkrt5daBbp6mKnd3TyDDM/k59FIGzmieJ9 afrPIX/sDK3+4N16CVraJyj5RVOXAbEW X-Google-Smtp-Source: AOwi7QBjyc8n06qjygRXant/iIXDSqkDtnQgQH8/h08nN23D+0XY0l709Rcv374YEBeiKG5LizIQztwmt3okYiA7GFs= X-Received: by 10.36.34.75 with SMTP id o72mr6383586ito.15.1504992630854; Sat, 09 Sep 2017 14:30:30 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.10.71 with HTTP; Sat, 9 Sep 2017 14:30:30 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:d5ae:f1f3:42c8:b0f7] In-Reply-To: <1504989250.32063.66.camel@freebsd.org> References: <1504989250.32063.66.camel@freebsd.org> From: Warner Losh Date: Sat, 9 Sep 2017 15:30:30 -0600 X-Google-Sender-Auth: Mj0y30Ff8y1Ck3Y7q6B2OR-FhWI Message-ID: Subject: Re: FCP-100: armv7 plan To: Ian Lepore Cc: Jan Beich , "freebsd-arm@freebsd.org" , "freebsd-toolchain@FreeBSD.org" , Jan Beich Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 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: Sat, 09 Sep 2017 21:30:32 -0000 On Sat, Sep 9, 2017 at 2:34 PM, Ian Lepore wrote: > On Sat, 2017-09-09 at 21:25 +0200, Jan Beich wrote: > > Warner Losh writes: > > > > > > > > On Sat, Sep 9, 2017 at 1:05 PM, Jan Beich > > > wrote: > > > > > > > > > > > Warner Losh writes: > > > > > > > > > > > > > > Greetings, > > > > > > > > > > This will serve as 'Last Call' for any objections to the plan > > > > > to create > > > > an > > > > > > > > > > armv7 MACHINE_ARCH in FreeBSD, as documented in FCP-0100. > > > > [...] > > > > > > > > Some ports want NEON support but FCP-0100 is vague about FreeBSD- > > > > specific > > > > differences between armv6 and armv7. Clang appears to enable NEON > > > > for all > > > > *-gnueabi* targets but I have no clue about GCC. Apparently, > > > > Android and > > > > Debian don't assume NEON on armv7. > > > > > > > > related: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221898 > > > > > > > Yes. We are vague about it on purpose. Just like we're vague about > > > MMX, > > > MMX2, etc on x86 because different processors can/want use > > > different > > > things. > > Do you mean similar to how FreeBSD i386 is vague about not supporting > > real i386, only i486 or later? > > > > > > > > The goal, if it doesn't work already, is for NEON to work if used, > > > but not be required, just like all the other optional features of a > > > CPU. > > FreeBSD doesn't support detecting NEON at runtime unlike Linux. > > We should fix that. In fact, we should probably fix it in exactly the > way linux does it (does it today, I think it's their 3rd scheme so > far), using getauxval() and elf AT_HWCAP. > Ah, yes. We should do that. We need that for other reasons as well. It shouldn't be too hard, though I don't know where we get the AT_HWCAP from to start with. > Adding the AT_HWCAP stuff would be relatively easy. I'm not as sure > what to do about getauxval(). To be maximally linux-compatible (which > would be good for ports) we'd put getauxval() in libc and make it work > just like the linux one. That's a bit at odds with the support we have > now, which is procstat_getauxv() in libprocstat. It's not very > compatible with how linux getauxval() works, so using just that might > lead to a lot of patches in ports. Totally agreed, even if it means breaking compatibility with the past. And as important as these issues are, they are orthogonal to armv7 :) Warner -- Ian > > > Do you > > mean at compile time? If so then the following probably needs to > > change > > > > $ cc -target armv7-unknown-freebsd12.0-gnueabihf -dM -E - > |& fgrep -i neon > > #define __ARM_NEON 1 > > #define __ARM_NEON_FP 0x4 > > #define __ARM_NEON__ 1 > > _______________________________________________ > >