From owner-freebsd-arch@freebsd.org Tue Jan 12 04:27:18 2016 Return-Path: Delivered-To: freebsd-arch@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 A73ACA6CBC0 for ; Tue, 12 Jan 2016 04:27:18 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 830631C2E for ; Tue, 12 Jan 2016 04:27:18 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: by mailman.ysv.freebsd.org (Postfix) id 80279A6CBBE; Tue, 12 Jan 2016 04:27:18 +0000 (UTC) Delivered-To: arch@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 65086A6CBBD for ; Tue, 12 Jan 2016 04:27:18 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-pf0-x22a.google.com (mail-pf0-x22a.google.com [IPv6:2607:f8b0:400e:c00::22a]) (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 33A0F1C2C for ; Tue, 12 Jan 2016 04:27:18 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: by mail-pf0-x22a.google.com with SMTP id e65so56095119pfe.0 for ; Mon, 11 Jan 2016 20:27:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :message-id:references:to; bh=p4tqs84fP0zbs+RVV2wH+jIw8ybJdBOY6VgOY4fDdQQ=; b=xXQhf83/PblcPAZbVHaEk7QiSBf4wcueDcHH18wzsuZWIq0e/DN3BLoVQneDXET3Ko no6TMPeRK9Dvke+AjoGpsgpERPdhubsfawaLuch1ZuNeIgbgrum82a3Zp3JFjwwHKT07 Uai02qYhSYP2YMvQYU0nfTpEpkjuVtxsCWYOEldReXYFd4qCOoEhuUFR4Boe1err2MUG QyEPbnXimX5kg52nnZJ/JP93zWH5eqiRBArLcziwVIiQORAtNX3MpJOPWtGjxSyZcCdj 7VGBB5LzCiitE97r9AazyMGvIEDworja5wob0atrKQL1bjQH1/xdGIU9rHQDNnX6rkhT niwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:message-id:references:to; bh=p4tqs84fP0zbs+RVV2wH+jIw8ybJdBOY6VgOY4fDdQQ=; b=Y3LwhJjEP9vLFnSFApqb+L+qup+241MWFaDHzTcezSlsw1UNhqtAn5Zy0MFm4iPhng OdKozufxzl5arxq97B3LRsWQqrcbyTs3RFNTYBVQG8vxbu4n1OmEJYgsJlyBeGozX9kd 5W+q0/cgfh9/ip5iOwmmbynDfh3sKmbJ/r4DN2dik7gb2hDhCUrvd5v8wgRYIixVSDvE LTYfO6DYfPPHKBdlSYOnMUZoGqJbx+h1QheYvqq4mobJ8JjYyxgGL3sjU6WOdz3gAba7 ct/jUe9HzuQyQ9WeXyLAAeIWZ9GHxJlhlP1AqaFE2Z5XBP0SDgx9xyKk54C3mSDDBx7u bQ+w== X-Gm-Message-State: ALoCoQnOwKJtREa1i11y582putq+N5cFxP8fWCGA+VegQzThb1/k93lah7xXmKEU0Y6QBQuBsA2GvgyazaLGUH9/DxIYdcT+gA== X-Received: by 10.98.65.148 with SMTP id g20mr31723696pfd.21.1452572837737; Mon, 11 Jan 2016 20:27:17 -0800 (PST) Received: from [100.127.145.144] ([69.53.245.34]) by smtp.gmail.com with ESMTPSA id dg12sm148030058pac.47.2016.01.11.20.27.16 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 11 Jan 2016 20:27:17 -0800 (PST) Sender: Warner Losh Subject: Real multilib Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Content-Type: multipart/signed; boundary="Apple-Mail=_DFA0DD6B-8610-438A-8546-D1CE60B1F96B"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5.2 From: Warner Losh In-Reply-To: <56947DAD.80106@freebsd.org> Date: Mon, 11 Jan 2016 21:27:14 -0700 Cc: "freebsd-arch@freebsd.org" Message-Id: References: <201601030432.u034W6en043633@repo.freebsd.org> <20160111221614.GC79262@spindle.one-eyed-alien.net> <56947DAD.80106@freebsd.org> To: Nathan Whitehorn X-Mailer: Apple Mail (2.2104) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2016 04:27:18 -0000 --Apple-Mail=_DFA0DD6B-8610-438A-8546-D1CE60B1F96B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 [[ Moved to arch@ ]] > On Jan 11, 2016, at 9:14 PM, Nathan Whitehorn = wrote: >=20 >=20 >=20 > On 01/11/16 19:11, Warner Losh wrote: >>> On Jan 11, 2016, at 3:16 PM, Brooks Davis = wrote: >>>=20 >>> On Sun, Jan 03, 2016 at 06:41:33PM +0100, Dimitry Andric wrote: >>>> On 03 Jan 2016, at 05:32, Warner Losh wrote: >>>>> Author: imp >>>>> Date: Sun Jan 3 04:32:05 2016 >>>>> New Revision: 293068 >>>>> URL: https://svnweb.freebsd.org/changeset/base/293068 >>>>>=20 >>>>> Log: >>>>> Add libsoft to the tree, just like lib32. >>>> Hmm, are there going to be more of these "multilib" things? :) >>> We'll want to do something about supporting hard float on MIPS. = Over >>> there it may be more of a TARGET_ARCH thing, but libsoft might be = useful. >> It isn=E2=80=99t quite a TARGET_ARCH on mips either. I=E2=80=99d love = to work with you >> to use this stuff MIPS turns out to be a harder nut to crack with = this stuff >> because it marks the different types of binaries differently and it = looks harder >> to parse. >>=20 >> For amv6 it is more of a transition thing, but I wanted to do it = something >> approaching =E2=80=9Ccorrect=E2=80=9D so that we could leverage it = for MIPS. >>=20 >>> We've also got a libcheri in CheriBSD and will eventually need to do = a >>> lib64 as we explore the switch from CHERI-when-requested to >>> CHERI-by-default. >> We should definitely chat about this. There=E2=80=99s some easy ways = to mark the CHERI >> binaries that are easier than others which would be quite helpful. >>=20 >> So we should chat about how this would be helpful on MIPS, and not = just >> CHERI-mips... >>=20 >> Warner >>=20 >=20 > For things that are a MACHINE_ARCH, do we want a convention of = lib/${MACHINE_ARCH}? That seems like it would make it easily scalable = and easier to predict than a lot of lib*. For things that aren't quite a = MACHINE_ARCH, it's more complicated of course. I=E2=80=99m not sure. If we were designing things from scratch, this = might make some sense. Though honestly, I=E2=80=99d make it be multilib/${MACHINE_ARCH} so that lib = could be a symlink there so that most config scripts that simply know where things live can find = them more easily. Since we have a big legacy issue to cope with, I=E2=80=99m having trouble = seeing a clear path here. There might be one, but I haven=E2=80=99t connected all the dots in my head=E2=80= =A6 Plus, MACHINE_ARCH likely isn=E2=80=99t expressive enough. The armv6 = kernels, for example, can run either soft-float ABI or hard-float ABI programs equally well (which = is why my hack works). It is my belief that, when booted on a hardware capable processor, a = mips kernel could do the same thing. There=E2=80=99s no floats passed into the kernel for system = calls, so the floating point part of the ABI in use is simply irrelevant. I wonder if someone has a good write-up on how this stuff is normally = done on, say, Linux. My google searches have found lots of entries about how to enable it, but = not what the underlying scheme really is or good docs on the architecture. This is one of the = things that stalled what I did for so long. But after seeing Brooks' talk on libcheri, I thought = I=E2=80=99d move forward with what I have. Warner --Apple-Mail=_DFA0DD6B-8610-438A-8546-D1CE60B1F96B Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJWlICiAAoJEGwc0Sh9sBEAXnwP/0Cnzc6m1X0TchlMDNN9fCv9 mk6Rs0z9IZdME76MLb/snqVDSLgPAOBPfblAPC180wJlj4bBvhtPWHv/2NEt+L5d PrhdIJP+MbJGqdJvh6HN34gwfUO9VAppXA48OOykvPVUAqRz+nBhhPhpfqWrbQhR fhQvcIY9+/z10urK7cSFODKuRxzfrSxKau+RYruT3lALkI+xGCd7Pc8wFd0g5Gb+ SS6KdKOjA3f8e5WpywJGYyNLEzofBYqhu8l6hUaTw+s1heV3aroq5TpZ213cKV2F iBmVYBnT72zmhovnoZVJCn+dJlNAahJ4p35yDuCKoxg37Jzxvb4bAbJOA+2fEvrv grkqwNZPvvNmiWdaNjiUP5TDg9WZ4WETDzvNrHQLq0e+w5esrJBC0gHUp3/IlnMC phwVH+xcVbZHRlYkzmMy+kv3ue3oRBP1za7pyDYHvpJf7IkNU1o0XkPYXOhbS8Fl Xk7H02TgGKXKr3SYSq0sxtCvtJLkvexAeO2Ocj7cBBZCV2j211R2gnCr8+IraE5v mqJzp7ZopqLaUnVjXNJlv5NN3c4cla00vXtO4ZHZdP5Tj2zCNtJmt9pudj9WAlxn adfKJJ7p24rMBQ26njB6O/+wBL6G87rjj/lJcRNU19pn5EEp/ybsK0aPTcqidF3f hUhHMDUxIp45sdt11Sff =Nm+j -----END PGP SIGNATURE----- --Apple-Mail=_DFA0DD6B-8610-438A-8546-D1CE60B1F96B--