diff options
-rw-r--r-- | cpui-drv.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -10,11 +10,14 @@ enum feature_information { FEATURES_7_ECX, FEATURES_7_EDX, FEATURES_7_1_EAX, + FEATURES_8000_0001_ECX, + FEATURES_8000_0001_EDX, FEATURES_LAST, }; struct cpui_info { uint32_t cpuid_max; + uint32_t ext_cpuid_max; char vendor_string[13]; uint8_t family; @@ -105,6 +108,17 @@ static void get_cpu_features(struct cpui_info *cpu) cpu->features[FEATURES_7_1_EAX] = eax; } } + + /* Get Maximum Input Value for Extended Function CPUID Information */ + cpuid(0x80000000, &eax, &ebx, &ecx, &edx); + cpu->ext_cpuid_max = eax; + + if (cpu->ext_cpuid_max >= 0x80000001) { + cpuid(0x80000001, &eax, &ebx, &ecx, &edx); + + cpu->features[FEATURES_8000_0001_ECX] = ecx; + cpu->features[FEATURES_8000_0001_EDX] = edx; + } } static int __init cpui_init(void) |