Index | Thread | Search

From:
Jeremie Courreges-Anglas <jca@wxcvbn.org>
Subject:
Re: powerpc minimal AT_HWCAP support
To:
Landry Breuil <landry@openbsd.org>
Cc:
tech@openbsd.org
Date:
Mon, 15 Jul 2024 19:09:09 +0200

Download raw body.

Thread
On Mon, Jul 15, 2024 at 05:37:44PM +0200, Landry Breuil wrote:
> Le Mon, Jul 15, 2024 at 02:16:53PM +0200, Jeremie Courreges-Anglas a écrit :
> > 
> > powerpc only is macppc these days, but not all macppc have altivec.
> > The following diff exports the bare minimum for altivec to be checked
> > by userland through elf_aux_info.  This could be enough for pixman and
> > mesa on OpenBSD to use the same code path as FreeBSD.  I propose this
> > as a first step so that someone with more knowledge of that
> > architecture can build upon.
> > 
> > Compile-tested only using clang-16 -target powerpc-unknown-openbsd.
> > 
> > Feedback welcome.  ok?
> 
> my macppc is taking dust somewhere in a drawer, but if i understand it
> right, a potential user of this might be nss (with ifdefs changed..)
> 
> https://searchfox.org/mozilla-central/source/security/nss/lib/freebl/blinit.c#535

That's rather something for powerpc64.  FreeBSD sets the
PPC_FEATURE2_HAS_VEC_CRYPTO (0x02000000) for Power8 and 9.

There's a mismatch in naming between Linux and FreeBSD here, Linux
names that flag PPC_FEATURE2_VEC_CRYPTO.  Pfff... at least the values
are consistent.

-- 
jca