arm64: Expose information about more modern CPU extensions.
Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
c9ffab4602
commit
aa78b46e9c
3 changed files with 18 additions and 6 deletions
|
@ -576,6 +576,10 @@ static void get_cpuinfo( SYSTEM_CPU_INFORMATION *info )
|
||||||
{
|
{
|
||||||
if (strstr(value, "crc32")) features |= CPU_FEATURE_ARM_V8_CRC32;
|
if (strstr(value, "crc32")) features |= CPU_FEATURE_ARM_V8_CRC32;
|
||||||
if (strstr(value, "aes")) features |= CPU_FEATURE_ARM_V8_CRYPTO;
|
if (strstr(value, "aes")) features |= CPU_FEATURE_ARM_V8_CRYPTO;
|
||||||
|
if (strstr(value, "atomics")) features |= CPU_FEATURE_ARM_V81_ATOMIC;
|
||||||
|
if (strstr(value, "asimddp")) features |= CPU_FEATURE_ARM_V82_DP;
|
||||||
|
if (strstr(value, "jscvt")) features |= CPU_FEATURE_ARM_V83_JSCVT;
|
||||||
|
if (strstr(value, "lrcpc")) features |= CPU_FEATURE_ARM_V83_LRCPC;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2697,6 +2697,10 @@ typedef struct _SYSTEM_CPU_INFORMATION {
|
||||||
#define CPU_FEATURE_ARM_NEON 0x00000002
|
#define CPU_FEATURE_ARM_NEON 0x00000002
|
||||||
#define CPU_FEATURE_ARM_V8_CRC32 0x00000004
|
#define CPU_FEATURE_ARM_V8_CRC32 0x00000004
|
||||||
#define CPU_FEATURE_ARM_V8_CRYPTO 0x00000008
|
#define CPU_FEATURE_ARM_V8_CRYPTO 0x00000008
|
||||||
|
#define CPU_FEATURE_ARM_V81_ATOMIC 0x00000010
|
||||||
|
#define CPU_FEATURE_ARM_V82_DP 0x00000020
|
||||||
|
#define CPU_FEATURE_ARM_V83_JSCVT 0x00000040
|
||||||
|
#define CPU_FEATURE_ARM_V83_LRCPC 0x00000080
|
||||||
|
|
||||||
typedef struct _SYSTEM_PROCESSOR_FEATURES_INFORMATION
|
typedef struct _SYSTEM_PROCESSOR_FEATURES_INFORMATION
|
||||||
{
|
{
|
||||||
|
|
|
@ -440,6 +440,10 @@ static void create_user_shared_data(void)
|
||||||
features[PF_ARM_V8_INSTRUCTIONS_AVAILABLE] = TRUE;
|
features[PF_ARM_V8_INSTRUCTIONS_AVAILABLE] = TRUE;
|
||||||
features[PF_ARM_V8_CRC32_INSTRUCTIONS_AVAILABLE] = !!(sci.ProcessorFeatureBits & CPU_FEATURE_ARM_V8_CRC32);
|
features[PF_ARM_V8_CRC32_INSTRUCTIONS_AVAILABLE] = !!(sci.ProcessorFeatureBits & CPU_FEATURE_ARM_V8_CRC32);
|
||||||
features[PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE] = !!(sci.ProcessorFeatureBits & CPU_FEATURE_ARM_V8_CRYPTO);
|
features[PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE] = !!(sci.ProcessorFeatureBits & CPU_FEATURE_ARM_V8_CRYPTO);
|
||||||
|
features[PF_ARM_V81_ATOMIC_INSTRUCTIONS_AVAILABLE]= !!(sci.ProcessorFeatureBits & CPU_FEATURE_ARM_V81_ATOMIC);
|
||||||
|
features[PF_ARM_V82_DP_INSTRUCTIONS_AVAILABLE] = !!(sci.ProcessorFeatureBits & CPU_FEATURE_ARM_V82_DP);
|
||||||
|
features[PF_ARM_V83_JSCVT_INSTRUCTIONS_AVAILABLE] = !!(sci.ProcessorFeatureBits & CPU_FEATURE_ARM_V83_JSCVT);
|
||||||
|
features[PF_ARM_V83_LRCPC_INSTRUCTIONS_AVAILABLE] = !!(sci.ProcessorFeatureBits & CPU_FEATURE_ARM_V83_LRCPC);
|
||||||
features[PF_COMPARE_EXCHANGE_DOUBLE] = TRUE;
|
features[PF_COMPARE_EXCHANGE_DOUBLE] = TRUE;
|
||||||
features[PF_NX_ENABLED] = TRUE;
|
features[PF_NX_ENABLED] = TRUE;
|
||||||
features[PF_FASTFAIL_AVAILABLE] = TRUE;
|
features[PF_FASTFAIL_AVAILABLE] = TRUE;
|
||||||
|
|
Loading…
Add table
Reference in a new issue