From owner-freebsd-arm@freebsd.org Fri Mar 11 04:30:44 2016 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 7718DACA82D for ; Fri, 11 Mar 2016 04:30:44 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ig0-x22c.google.com (mail-ig0-x22c.google.com [IPv6:2607:f8b0:4001:c05::22c]) (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 4B577813 for ; Fri, 11 Mar 2016 04:30:44 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-ig0-x22c.google.com with SMTP id ig19so1789033igb.1 for ; Thu, 10 Mar 2016 20:30:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:date:message-id:subject:from:to; bh=OjIvpUQfNodcV7JZYGjjITVJT9uI0Q57WGghBXNDQNU=; b=Wf36hKHamqkOKI7dKtC/UpaqWv12a8JKWAQqETdDbC8e+mf5auUXeNFKaI+GzAkBRw lE1D12iyeK1WOlJ6aH5whBvWqxs5KxJ+vWK274VtpT7CPAyiwODXavAnmaPrezOxkCbj Gez0ab6Ms5dOGh/I2BuQC5YwoPvockirHgeOT/M7G3BpCgJmUjT/uYWLX9Y2GzVbftT9 uVmYPpltkXAK+/WlwbU5mi47c6E1XYK7Gm1GtlI4IGapp3GYiIFo2RGwo2QWohfJR50Q DwIwi1DD0hzuaqOCsg8Onivn4ne99Pg1xDwx6/bzziC2HJLUNJkBpSDAIRw7gXapaJQ3 9FnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:date:message-id:subject:from :to; bh=OjIvpUQfNodcV7JZYGjjITVJT9uI0Q57WGghBXNDQNU=; b=aqXA4va6XJq7CL5njM44JR3RretVdKPkcc+SjjnIDh2VpcNumwMZ41dKdIF5mRWZNj nHHA8XNEhj4fDfCz2pwNynkM+5Atj72dK74+gy7JxUF/a7bySYDNs2Xhgzy4hbr45SNX XUKY+ojz6CbeeslsB7KDSV7t0Rk8RNSFaQkU9+F5tdFRACBu5GTNMil5AwCxZqo9lKf0 F1ux/1/aJ2YI+J+lba+5mDUFyMd/k8XT2kfBzjCMJ4QHxUyP+FYSGzyGLmMVXj8mE3TL iUtOcLZzFICDdEYjvC1IbpecjHtSxbLc0xapsfT7js5nZwv/Jwf5sq9vcmUpza5vehZd dgxQ== X-Gm-Message-State: AD7BkJIf4WX6JmkG11X9OPCiLsOJXw1XVaazL1fITSaFP+XhDmMWWtbC/H/0IRo++Y+G+e4+/sp8tG6R1u1v1w== MIME-Version: 1.0 X-Received: by 10.50.30.134 with SMTP id s6mr504077igh.36.1457670643348; Thu, 10 Mar 2016 20:30:43 -0800 (PST) Sender: wlosh@bsdimp.com Received: by 10.36.65.230 with HTTP; Thu, 10 Mar 2016 20:30:43 -0800 (PST) X-Originating-IP: [50.253.99.174] Date: Thu, 10 Mar 2016 21:30:43 -0700 X-Google-Sender-Auth: 2BD-HJ0wwFZZyEfveSH47DIc3oE Message-ID: Subject: Hard float API to become default on ARMv6 April 2nd From: Warner Losh To: "freebsd-arm@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Mar 2016 04:30:44 -0000 If all goes well, I plan on pulling the trigger to switch armv6 to hard float API from its current hard float with soft-float API it's using. If you are running armv4 or armv5 hardware, then you are unaffected. If you are running arm64 / aarch64, you are unaffected. You're unaffected if you are on any other architecture. A couple of Anticipated FAQs: Q: Where can I find this so I can test it? It's currently in review. https://reviews.freebsd.org/D5550 is what I plan to commit if all goes well April 2nd. Q: What about the upgrade path? The plan is that people that need to upgrade their system in place can do so, but they will have to build compat libraries. This is part of buildworld / installworld when WITH_LIBSOFT is set to y. Changes made to ld.so a long time ago will know if you are executing a hardfloat ABI or softfloat ABI binary (which uses hard float instructions). When you run a hard float binary after the change, it will grab the libraries from the default locations in the tree. When you run a soft float binary, it will grab the libraries from /libsoft /usr/libsoft. The same kernel can run both flavors of binaries. Q: So how do I generate the compat libraries? You can do this with a buildworld / installworld with WITH_LIBSOFT=y. However, you'll need https://reviews.freebsd.org/D5605 applied to the tree. This will also be committed April 2nd. Q: What about packages? pkg(8) will notice that you've upgraded ABIs and will refresh all packages from the repo. Q: But there's no packages at the moment, what gives? Yes, part of the reason to give 3 weeks notice is to allow time for these packages to be built, as well as give a chance for wider testing before the trigger is pulled. Q: What will happen to the armv6hf TARGET_ARCH? It will go away. Since the default armv6 target now uses that ABI, there's no need for a new one. Since this was never released, we don't have to worry about it. If we wanted the best performance, we'd have to have moved to a new name. But the new name would cause more problems than moving to the new ABI with the old ABI supported through proper shims. It made little sense to obsolete / deprecate armv6 and move to armv6hf in FreeBSD 11. We'd likely have needed two sets of packages, there'd be longer make universe times, etc for the whole life of FreeBSD 11. So we're only going to have one, and it will be the higher performing hard float ABI. It turns out there's almost no performance gain for most things (though floating point intensive applications benefit marginally). There's a much bigger gain from generating code for your particular ARM core. Much work has been done to make this work (it didn't before, due to a number of bugs that have been fixed). This change has been discussed and socialized since last summer. Most of the main arm developers are on board (though there is one notable exception) with this transition plan. This has been reported in quarterly reports, as well as disclosed on arm@ a few times over the past year. I had hoped to be sending this message with a July 1st, 2015 cut-over date, but time got away from me a bit. Q: But what if I need to build a system with soft float ABI under 11? You can still do that. CPUTYPE=soft has been created for this scenario, as well as to generate libraries for WITH_LIBSOFT. It's anticipated that this will live for the entire FreeBSD 11 branch, but go away in FreeBSD 12. Q: What about compat10 binaries for ARM? Those won't be provided in any flavor. While arm has reached Tier 1 status in FreeBSD 11, it was not Tier 1 status in FreeBSD 10, so there's no need to generate them as part of project. It's anticipated the demand for these will be quite light. Q: What if I want to run a hard float ABI system, but still use soft-float packages for a while? This isn't supported, and little testing has been done here. You may be able to move the shared libraries in the libsoft LD_LIBRARY_PATH and/or just keep the default paths in the libsoft loads. However, this is an untenable situation once you upgrade one of the binaries. In fact, they will all be upgraded by pkg(8) the first time it runs and notices /bin/sh has a different ABI. Q: Is there a wiki for this change? https://wiki.freebsd.org/FreeBSD/arm/hardabi contains a start (this message), but will be updated over time to reflect the current status. Warner