Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x86/acpi VIA CPUs can have EST as well, so treat th...
details: https://anonhg.NetBSD.org/src/rev/687935151b9b
branches: trunk
changeset: 757208:687935151b9b
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Thu Aug 19 11:08:33 2010 +0000
description:
VIA CPUs can have EST as well, so treat them the same as Intel
diffstat:
sys/arch/x86/acpi/acpi_cpu_md.c | 27 +++++++++++++++++++--------
1 files changed, 19 insertions(+), 8 deletions(-)
diffs (93 lines):
diff -r fd43965ad9f9 -r 687935151b9b sys/arch/x86/acpi/acpi_cpu_md.c
--- a/sys/arch/x86/acpi/acpi_cpu_md.c Thu Aug 19 05:09:53 2010 +0000
+++ b/sys/arch/x86/acpi/acpi_cpu_md.c Thu Aug 19 11:08:33 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_cpu_md.c,v 1.15 2010/08/18 18:32:20 jruoho Exp $ */
+/* $NetBSD: acpi_cpu_md.c,v 1.16 2010/08/19 11:08:33 jmcneill Exp $ */
/*-
* Copyright (c) 2010 Jukka Ruohonen <jruohonen%iki.fi@localhost>
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_md.c,v 1.15 2010/08/18 18:32:20 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_md.c,v 1.16 2010/08/19 11:08:33 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -68,8 +68,13 @@
struct cpu_info *ci = curcpu();
uint32_t val = 0;
- if (cpu_vendor != CPUVENDOR_INTEL)
+ switch (cpu_vendor) {
+ case CPUVENDOR_INTEL:
+ case CPUVENDOR_IDT:
+ break;
+ default:
return val;
+ }
/*
* Basic SMP C-states (required for _CST).
@@ -111,7 +116,7 @@
switch (cpu_vendor) {
case CPUVENDOR_INTEL:
-
+ case CPUVENDOR_IDT:
if ((ci->ci_feat_val[1] & CPUID2_EST) != 0)
val |= ACPICPU_FLAG_P_FFH;
@@ -124,10 +129,12 @@
* Bus master arbitration is not
* needed on some recent Intel CPUs.
*/
- if (CPUID2FAMILY(ci->ci_signature) > 15)
+ if (cpu_vendor == CPUVENDOR_INTEL &&
+ CPUID2FAMILY(ci->ci_signature) > 15)
val &= ~ACPICPU_FLAG_C_ARB;
- if (CPUID2FAMILY(ci->ci_signature) == 6 &&
+ if (cpu_vendor == CPUVENDOR_INTEL &&
+ CPUID2FAMILY(ci->ci_signature) == 6 &&
CPUID2MODEL(ci->ci_signature) >= 15)
val &= ~ACPICPU_FLAG_C_ARB;
@@ -251,6 +258,7 @@
switch (cpu_vendor) {
case CPUVENDOR_INTEL:
+ case CPUVENDOR_IDT:
str = "est";
break;
@@ -462,6 +470,7 @@
switch (cpu_vendor) {
case CPUVENDOR_INTEL:
+ case CPUVENDOR_IDT:
msr.ps_control_addr = MSR_PERF_CTL;
msr.ps_control_mask = __BITS(0, 15);
@@ -602,7 +611,8 @@
uint64_t val;
uint32_t i;
- if (cpu_vendor != CPUVENDOR_INTEL)
+ if (cpu_vendor != CPUVENDOR_INTEL &&
+ cpu_vendor != CPUVENDOR_IDT)
return ENODEV;
val = rdmsr(MSR_THERM_CONTROL);
@@ -630,7 +640,8 @@
uint64_t xc;
int rv = 0;
- if (cpu_vendor != CPUVENDOR_INTEL)
+ if (cpu_vendor != CPUVENDOR_INTEL &&
+ cpu_vendor != CPUVENDOR_IDT)
return ENODEV;
msr.msr_read = true;
Home |
Main Index |
Thread Index |
Old Index