Index: devel/cpu_features/Makefile =================================================================== --- devel/cpu_features/Makefile (revision 496127) +++ devel/cpu_features/Makefile (working copy) @@ -3,7 +3,7 @@ PORTNAME= cpu_features PORTVERSION= 0.2.0 DISTVERSIONPREFIX= v -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel MAINTAINER= skreuzer@FreeBSD.org @@ -11,7 +11,7 @@ LICENSE= APACHE20 -NOT_FOR_ARCHS= aarch64 armv6 armv7 mips mips64 +NOT_FOR_ARCHS= armv6 armv7 mips mips64 NOT_FOR_ARCHS_REASON= assumes android if on ARM or MIPS USES= cmake:insource Index: devel/cpu_features/files/patch-src-cpuinfo__aarch64.c =================================================================== --- devel/cpu_features/files/patch-src-cpuinfo__aarch64.c (nonexistent) +++ devel/cpu_features/files/patch-src-cpuinfo__aarch64.c (working copy) @@ -0,0 +1,67 @@ +--- src/cpuinfo_aarch64.c.orig 2019-03-18 12:13:19.292580000 +0100 ++++ src/cpuinfo_aarch64.c 2019-03-18 12:13:54.601426000 +0100 +@@ -22,6 +22,11 @@ + + #include + ++#if defined (__FreeBSD__) ++#include ++#include ++#endif ++ + DECLARE_SETTER(Aarch64Features, fp) + DECLARE_SETTER(Aarch64Features, asimd) + DECLARE_SETTER(Aarch64Features, aes) +@@ -79,6 +84,44 @@ static void FillProcCpuInfoData(Aarch64Info* const inf + static const Aarch64Info kEmptyAarch64Info; + + Aarch64Info GetAarch64Info(void) { ++#if defined (__FreeBSD__) ++ ++ Aarch64Info info = kEmptyAarch64Info; ++ uint64_t id_aa64isar0, id_aa64pfr0; ++ id_aa64isar0 = READ_SPECIALREG(ID_AA64ISAR0_EL1); ++ id_aa64pfr0 = READ_SPECIALREG(ID_AA64PFR0_EL1); ++ ++ if (ID_AA64ISAR0_AES(id_aa64isar0) == ID_AA64ISAR0_AES_BASE) { ++ info.features.aes = 1; ++ } ++ ++ if (ID_AA64ISAR0_AES(id_aa64isar0) == ID_AA64ISAR0_AES_PMULL) { ++ info.features.pmull = 1; ++ } ++ ++ if (ID_AA64ISAR0_SHA1(id_aa64isar0) == ID_AA64ISAR0_SHA1_BASE) { ++ info.features.sha1 = 1; ++ } ++ ++ if (ID_AA64ISAR0_SHA2(id_aa64isar0) == ID_AA64ISAR0_SHA2_BASE) { ++ info.features.sha2 = 1; ++ } ++ ++ if (ID_AA64ISAR0_CRC32(id_aa64isar0) == ID_AA64ISAR0_CRC32_BASE) { ++ info.features.crc32 = 1; ++ } ++ ++ if (ID_AA64PFR0_ADV_SIMD(id_aa64pfr0) == ID_AA64PFR0_ADV_SIMD_IMPL || \ ++ ID_AA64PFR0_ADV_SIMD(id_aa64pfr0) == ID_AA64PFR0_ADV_SIMD_HP ) { ++ info.features.asimd = 1; ++ } ++ ++ if (ID_AA64PFR0_FP(id_aa64pfr0) == ID_AA64PFR0_FP_IMPL || \ ++ ID_AA64PFR0_FP(id_aa64pfr0) == ID_AA64PFR0_FP_HP) { ++ info.features.fp = 1; ++ } ++ ++#else // linux + // capabilities are fetched from both getauxval and /proc/cpuinfo so we can + // have some information if the executable is sandboxed (aka no access to + // /proc/cpuinfo). +@@ -88,6 +131,7 @@ Aarch64Info GetAarch64Info(void) { + CpuFeatures_OverrideFromHwCaps(kConfigsSize, kConfigs, + CpuFeatures_GetHardwareCapabilities(), + &info.features); ++#endif + + return info; + } Property changes on: devel/cpu_features/files/patch-src-cpuinfo__aarch64.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property