summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2015-12-05 10:27:49 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2015-12-05 10:27:49 +0000
commitab9d400e9233c6ffc2eb7029dfe9aecc1d3cf7e0 (patch)
tree219123081581df5462629862a295ae4b8a966962 /sys/arch
parent3e81254e500f4f19d60302c9dafafdcc3427d206 (diff)
AMD Family 12h and later processors keep their APIC clock running in deeper
C-states. Set the TMP_ARAT flag for these (which is Intel-specific) such that acpicpu(4) enables the deeper C-states on these CPUs. ok deraadt@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/amd64/amd64/identcpu.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/arch/amd64/amd64/identcpu.c b/sys/arch/amd64/amd64/identcpu.c
index aa2437ea504..185b64dcfd6 100644
--- a/sys/arch/amd64/amd64/identcpu.c
+++ b/sys/arch/amd64/amd64/identcpu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: identcpu.c,v 1.67 2015/11/23 22:57:12 deraadt Exp $ */
+/* $OpenBSD: identcpu.c,v 1.68 2015/12/05 10:27:48 kettenis Exp $ */
/* $NetBSD: identcpu.c,v 1.1 2003/04/26 18:39:28 fvdl Exp $ */
/*
@@ -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");