diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2009-12-01 18:31:37 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2009-12-01 18:31:37 +0000 |
commit | 6edf83765acea0cf39651984ded48f7dddcf8a9a (patch) | |
tree | a9efcf917412a3c4094f34ef4566ce753c0783cb | |
parent | a6fb2bfba9df4de40d9d866981038cb09b2904b5 (diff) |
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; |