diff --git a/CMakeLists.txt b/CMakeLists.txt index cd5530188..95cb12a3b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,7 @@ option(WITH_DEBUG_LOG "Enable debug log output" OFF) option(WITH_TLS "Enable OpenSSL support" ON) option(WITH_ASM "Enable ASM PoW implementations" ON) option(BUILD_STATIC "Build static binary" OFF) -option(ARM_TARGET "Force use specific ARM target 8 or 7" 0) +option(ARM_TARGET "Force use specific ARM target 8 or 7" 0) include (CheckIncludeFile) include (cmake/cpu.cmake) diff --git a/src/common/cpu/BasicCpuInfo_arm.cpp b/src/common/cpu/BasicCpuInfo_arm.cpp index e1df86df4..339613466 100644 --- a/src/common/cpu/BasicCpuInfo_arm.cpp +++ b/src/common/cpu/BasicCpuInfo_arm.cpp @@ -25,6 +25,11 @@ #include #include +#if __ARM_FEATURE_CRYPTO +# include +# include +#endif + #include "common/cpu/BasicCpuInfo.h" @@ -35,10 +40,14 @@ xmrig::BasicCpuInfo::BasicCpuInfo() : m_brand(), m_threads(std::thread::hardware_concurrency()) { - memcpy(m_brand, "Unknown", 7); +# ifdef XMRIG_ARMv8 + memcpy(m_brand, "ARMv8", 5); +# else + memcpy(m_brand, "ARMv7", 5); +# endif # if __ARM_FEATURE_CRYPTO - m_aes = true; + m_aes = getauxval(AT_HWCAP) & HWCAP_AES; # endif }