diff options
author | 2009-12-01 18:31:36 +0000 | |
---|---|---|
committer | 2009-12-01 18:31:36 +0000 | |
commit | 00d54cc5b141fae5849784be4fd38caaa7fa67bd (patch) | |
tree | dd4ccbb4e281f6e31609ef6c9a40492a28779cfd | |
parent | regen (diff) | |
download | wireguard-openbsd-00d54cc5b141fae5849784be4fd38caaa7fa67bd.tar.xz wireguard-openbsd-00d54cc5b141fae5849784be4fd38caaa7fa67bd.zip |
The MD ACPI PSS paths are using MSRs they shouldn't be
so don't try to do EST on machines we don't know the
bus_clock on for now.
ok deraadt@
-rw-r--r-- | sys/arch/amd64/amd64/est.c | 8 | ||||
-rw-r--r-- | sys/arch/i386/i386/est.c | 8 |
2 files changed, 14 insertions, 2 deletions
diff --git a/sys/arch/amd64/amd64/est.c b/sys/arch/amd64/amd64/est.c index f09ad335f48..c405bc2874f 100644 --- a/sys/arch/amd64/amd64/est.c +++ b/sys/arch/amd64/amd64/est.c @@ -1,4 +1,4 @@ -/* $OpenBSD: est.c,v 1.15 2009/11/22 20:13:12 jsg Exp $ */ +/* $OpenBSD: est.c,v 1.16 2009/12/01 18:31:36 jsg Exp $ */ /* * Copyright (c) 2003 Michael Eriksson. * All rights reserved. @@ -329,6 +329,12 @@ est_init(struct cpu_info *ci) p3_get_bus_clock(ci); } + if (bus_clock == 0) { + printf("%s: EST: PSS not yet available for this processor\n", + cpu_device); + return; + } + #if NACPICPU > 0 est_fqlist = est_acpi_init(); #endif diff --git a/sys/arch/i386/i386/est.c b/sys/arch/i386/i386/est.c index 335155404ce..2c52ac78d4c 100644 --- a/sys/arch/i386/i386/est.c +++ b/sys/arch/i386/i386/est.c @@ -1,4 +1,4 @@ -/* $OpenBSD: est.c,v 1.32 2009/06/08 23:18:05 gwk Exp $ */ +/* $OpenBSD: est.c,v 1.33 2009/12/01 18:31:36 jsg Exp $ */ /* * Copyright (c) 2003 Michael Eriksson. * All rights reserved. @@ -1061,6 +1061,12 @@ est_init(const char *cpu_device, int vendor) if ((cpu_ecxfeature & CPUIDECX_EST) == 0) return; + if (bus_clock == 0) { + printf("%s: EST: PSS not yet available for this processor\n", + cpu_device); + return; + } + msr = rdmsr(MSR_PERF_STATUS); idhi = (msr >> 32) & 0xffff; idlo = (msr >> 48) & 0xffff; |