aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/utils/cpuid
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2020-03-14 13:44:37 -0400
committerJack Lloyd <[email protected]>2020-03-14 19:07:42 -0400
commit51ee57c3558391aca7f212eb80ab881b3fe34e17 (patch)
treeae4c0230353fb655d28135d661cd5d1bb8c9bb0e /src/lib/utils/cpuid
parent067be47bce177a4ff15a7d09d2c5c56f1708dd24 (diff)
Add baremetal (gcc-arm-none-eabi) build
Diffstat (limited to 'src/lib/utils/cpuid')
-rw-r--r--src/lib/utils/cpuid/cpuid_arm.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/lib/utils/cpuid/cpuid_arm.cpp b/src/lib/utils/cpuid/cpuid_arm.cpp
index ad9f63603..247464043 100644
--- a/src/lib/utils/cpuid/cpuid_arm.cpp
+++ b/src/lib/utils/cpuid/cpuid_arm.cpp
@@ -101,6 +101,8 @@ uint64_t flags_by_ios_machine_type(const std::string& machine)
uint64_t CPUID::CPUID_Data::detect_cpu_features(size_t* cache_line_size)
{
+ BOTAN_UNUSED(cache_line_size);
+
uint64_t detected_features = 0;
#if defined(BOTAN_TARGET_OS_HAS_GETAUXVAL) || defined(BOTAN_TARGET_OS_HAS_ELF_AUX_INFO)
@@ -145,8 +147,6 @@ uint64_t CPUID::CPUID_Data::detect_cpu_features(size_t* cache_line_size)
// plausibility check
if(dcache_line == 32 || dcache_line == 64 || dcache_line == 128)
*cache_line_size = static_cast<size_t>(dcache_line);
-#else
- BOTAN_UNUSED(cache_line_size);
#endif
const unsigned long hwcap_neon = OS::get_auxval(ARM_hwcap_bit::ARCH_hwcap_neon);
@@ -188,8 +188,7 @@ uint64_t CPUID::CPUID_Data::detect_cpu_features(size_t* cache_line_size)
::sysctlbyname("hw.machine", machine, &size, nullptr, 0);
detected_features = flags_by_ios_machine_type(machine);
- // No way to detect this on iOS?
- BOTAN_UNUSED(cache_line_size);
+ // No way to detect cache line size on iOS?
#elif defined(BOTAN_USE_GCC_INLINE_ASM) && defined(BOTAN_TARGET_ARCH_IS_ARM64)
@@ -224,8 +223,6 @@ uint64_t CPUID::CPUID_Data::detect_cpu_features(size_t* cache_line_size)
detected_features |= CPUID::CPUID_ARM_SHA2_BIT;
}
- BOTAN_UNUSED(cache_line_size);
-
#endif
return detected_features;