Download raw body.
powerpc64: filling in a few more HWCAP flags
Sort the top flags by order in the header.
Fill in some other feature flags I have come across.
PPC_FEATURE2_ARCH_2_07
Noticed in FFmpeg for Power8 VSX code within libswscale and devel/orc
and probably others.
PPC_FEATURE2_HAS_VEC_CRYPTO
OpenSSL, NSS, Nettle, and Botan
All of the crypto libraries check and utilize HW support on POWER.
I do not have any powerpc64 hardware. Could someone please
test this out?
Index: powerpc64/cpu.c
===================================================================
RCS file: /cvs/src/sys/arch/powerpc64/powerpc64/cpu.c,v
retrieving revision 1.30
diff -u -p -u -p -r1.30 cpu.c
--- powerpc64/cpu.c 28 Nov 2024 18:54:36 -0000 1.30
+++ powerpc64/cpu.c 3 May 2026 06:22:53 -0000
@@ -224,15 +224,15 @@ cpu_init_features(void)
{
uint32_t pvr = mfpvr();
- hwcap = PPC_FEATURE_32 | PPC_FEATURE_64 | PPC_FEATURE_HAS_FPU |
- PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_ALTIVEC |
+ hwcap = PPC_FEATURE_32 | PPC_FEATURE_64 | PPC_FEATURE_HAS_ALTIVEC |
+ PPC_FEATURE_HAS_FPU | PPC_FEATURE_HAS_MMU |
PPC_FEATURE_HAS_VSX;
switch (CPU_VERSION(pvr)) {
case CPU_IBMPOWER9:
case CPU_IBMPOWER9P:
- hwcap2 |= PPC_FEATURE2_ARCH_3_00;
- hwcap2 |= PPC_FEATURE2_DARN;
+ hwcap2 |= PPC_FEATURE2_ARCH_2_07 | PPC_FEATURE2_HAS_VEC_CRYPTO |
+ PPC_FEATURE2_ARCH_3_00 | PPC_FEATURE2_DARN;
break;
}
}
powerpc64: filling in a few more HWCAP flags