Except for the really old ones, all AMD CPUs keep the APIC running in
low-power mode. They don't have the ARAT flag that Intel CPUs have
though. The diff below sets that flag on family 12h and later, such
that acpicpu(4) enables the deeper C states on these CPUs. This
matches what Linux does.
Seems to work fine on the APU2, but this needs to be tested on as many
systems with AMD CPUs as possible. Keep an eye out for machine
lockups when running with this diff.
Index: identcpu.c
===================================================================
RCS file: /cvs/src/sys/arch/amd64/amd64/identcpu.c,v
retrieving revision 1.66
diff -u -p -r1.66 identcpu.c
--- identcpu.c 13 Nov 2015 07:52:20 -0000 1.66
+++ identcpu.c 21 Nov 2015 16:27:03 -0000
@@ -545,12 +545,15 @@ identifycpu(struct cpu_info *ci)
printf(",%s", cpu_seff0_ecxfeatures[i].str);
}
- if (!strcmp(cpu_vendor, "GenuineIntel") && cpuid_level >= 0x06 ) {
+ if (!strcmp(cpu_vendor, "GenuineIntel") && cpuid_level >= 0x06) {
CPUID(0x06, ci->ci_feature_tpmflags, dummy, dummy, dummy);
for (i = 0; i < nitems(cpu_tpm_eaxfeatures); i++)
if (ci->ci_feature_tpmflags &
cpu_tpm_eaxfeatures[i].bit)
printf(",%s", cpu_tpm_eaxfeatures[i].str);
+ } else if (!strcmp(cpu_vendor, "AuthenticAMD")) {
+ if (ci->ci_family >= 0x12)
+ ci->ci_feature_tpmflags |= TPM_ARAT;
}
printf("\n");