Detect CPU name and AES instructions on Windows ARM64.
This commit is contained in:
parent
57a4998ae2
commit
9e7cf69ac3
1 changed files with 8 additions and 3 deletions
|
@ -18,10 +18,15 @@
|
||||||
|
|
||||||
#include "backend/cpu/platform/BasicCpuInfo.h"
|
#include "backend/cpu/platform/BasicCpuInfo.h"
|
||||||
|
|
||||||
|
#include <Windows.h>
|
||||||
|
|
||||||
|
|
||||||
void xmrig::BasicCpuInfo::init_arm()
|
void xmrig::BasicCpuInfo::init_arm()
|
||||||
{
|
{
|
||||||
# if __ARM_FEATURE_CRYPTO
|
DWORD size = sizeof(m_brand) - 1;
|
||||||
m_flags.set(FLAG_AES, true); // FIXME
|
const char *subkey = "HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0";
|
||||||
# endif
|
|
||||||
|
RegGetValueA(HKEY_LOCAL_MACHINE, subkey, "ProcessorNameString", RRF_RT_REG_SZ, nullptr, m_brand, &size);
|
||||||
|
|
||||||
|
m_flags.set(FLAG_AES, IsProcessorFeaturePresent(PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue