summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2015-12-05 10:27:48 +0000
committerkettenis <kettenis@openbsd.org>2015-12-05 10:27:48 +0000
commit83ef434f6dc7301f81007bb07004dc9a54a8b169 (patch)
tree27d1990279ff91714667160d7e877fdc522ff181
parentpull the config file opening up considerably earlier to fail fast. (diff)
downloadwireguard-openbsd-83ef434f6dc7301f81007bb07004dc9a54a8b169.tar.xz
wireguard-openbsd-83ef434f6dc7301f81007bb07004dc9a54a8b169.zip
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@
-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");