kernel/x86: dump hwpstate, cpb, proc_feedback features

Change-Id: I06b6da05013c7271d0a97d5aa3af2b6f416496a9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8331
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
Jérôme Duval
2024-09-18 16:21:44 +00:00
committed by waddlesplash
parent 017c5e70d5
commit 0f807f4401
2 changed files with 11 additions and 0 deletions
@@ -382,7 +382,10 @@
#define IA32_FEATURE_XSAVES (1 << 3) // XSAVES and XRSTORS Instruction #define IA32_FEATURE_XSAVES (1 << 3) // XSAVES and XRSTORS Instruction
// x86 defined features from cpuid eax 0x80000007, edx register // x86 defined features from cpuid eax 0x80000007, edx register
#define IA32_FEATURE_AMD_HW_PSTATE (1 << 7)
#define IA32_FEATURE_INVARIANT_TSC (1 << 8) #define IA32_FEATURE_INVARIANT_TSC (1 << 8)
#define IA32_FEATURE_CPB (1 << 9)
#define IA32_FEATURE_PROC_FEEDBACK (1 << 11)
// x86 defined features from cpuid eax 0x80000008, ebx register // x86 defined features from cpuid eax 0x80000008, ebx register
#define IA32_FEATURE_CLZERO (1 << 0) // CLZERO instruction #define IA32_FEATURE_CLZERO (1 << 0) // CLZERO instruction
+8
View File
@@ -656,6 +656,14 @@ dump_feature_string(int currentCPU, cpu_ent* cpu)
strlcat(features, "msr_arch ", sizeof(features)); strlcat(features, "msr_arch ", sizeof(features));
if (cpu->arch.feature[FEATURE_7_EDX] & IA32_FEATURE_SSBD) if (cpu->arch.feature[FEATURE_7_EDX] & IA32_FEATURE_SSBD)
strlcat(features, "ssbd ", sizeof(features)); strlcat(features, "ssbd ", sizeof(features));
if (cpu->arch.feature[FEATURE_EXT_7_EDX] & IA32_FEATURE_AMD_HW_PSTATE)
strlcat(features, "hwpstate ", sizeof(features));
if (cpu->arch.feature[FEATURE_EXT_7_EDX] & IA32_FEATURE_INVARIANT_TSC)
strlcat(features, "constant_tsc ", sizeof(features));
if (cpu->arch.feature[FEATURE_EXT_7_EDX] & IA32_FEATURE_CPB)
strlcat(features, "cpb ", sizeof(features));
if (cpu->arch.feature[FEATURE_EXT_7_EDX] & IA32_FEATURE_PROC_FEEDBACK)
strlcat(features, "proc_feedback ", sizeof(features));
if (cpu->arch.feature[FEATURE_D_1_EAX] & IA32_FEATURE_XSAVEOPT) if (cpu->arch.feature[FEATURE_D_1_EAX] & IA32_FEATURE_XSAVEOPT)
strlcat(features, "xsaveopt ", sizeof(features)); strlcat(features, "xsaveopt ", sizeof(features));
if (cpu->arch.feature[FEATURE_D_1_EAX] & IA32_FEATURE_XSAVEC) if (cpu->arch.feature[FEATURE_D_1_EAX] & IA32_FEATURE_XSAVEC)