Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Move ENHANCED_SPEEDSTEP, or henceforth est(4), to t...
details: https://anonhg.NetBSD.org/src/rev/06ccbb1eb98c
branches: trunk
changeset: 762574:06ccbb1eb98c
user: jruoho <jruoho%NetBSD.org@localhost>
date: Wed Feb 23 11:43:21 2011 +0000
description:
Move ENHANCED_SPEEDSTEP, or henceforth est(4), to the cpufeaturebus.
diffstat:
sys/arch/amd64/conf/GENERIC | 13 +-
sys/arch/amd64/conf/XEN3_DOM0 | 6 +-
sys/arch/i386/conf/ALL | 17 +-
sys/arch/i386/conf/GENERIC | 17 +-
sys/arch/x86/conf/files.x86 | 17 +-
sys/arch/x86/include/cpu.h | 3 +-
sys/arch/x86/include/cpuvar.h | 11 +-
sys/arch/x86/include/est.h | 64 ++++
sys/arch/x86/x86/cpu.c | 19 +-
sys/arch/x86/x86/est.c | 583 +++++++++++++++++++++++--------------
sys/arch/x86/x86/identcpu.c | 12 +-
sys/arch/x86/x86/intel_busclock.c | 6 +-
sys/arch/xen/conf/files.xen | 8 +-
13 files changed, 473 insertions(+), 303 deletions(-)
diffs (truncated from 1216 to 300 lines):
diff -r f27fb0909a0b -r 06ccbb1eb98c sys/arch/amd64/conf/GENERIC
--- a/sys/arch/amd64/conf/GENERIC Wed Feb 23 10:26:09 2011 +0000
+++ b/sys/arch/amd64/conf/GENERIC Wed Feb 23 11:43:21 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.312 2011/02/23 00:46:29 jmcneill Exp $
+# $NetBSD: GENERIC,v 1.313 2011/02/23 11:43:21 jruoho Exp $
#
# GENERIC machine description file
#
@@ -22,7 +22,7 @@
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "GENERIC-$Revision: 1.312 $"
+#ident "GENERIC-$Revision: 1.313 $"
maxusers 64 # estimated number of users
@@ -78,15 +78,12 @@
#options PIPE_SOCKETPAIR # smaller, but slower pipe(2)
options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel
-# Intel Enhanced Speedstep for EM64T CPUs
-options ENHANCED_SPEEDSTEP
-#options EST_FREQ_USERWRITE # any user can set frequency
-
# AMD PowerNow! and Cool`n'Quiet technology
options POWERNOW_K8
-# Intel Core's on-die Thermal sensor
-coretemp* at cpu?
+# CPU features
+coretemp* at cpu? # Intel on-die thermal sensor
+est0 at cpu0 # Intel Enhanced SpeedStep (non-ACPI)
# Intel(R) On Demand Clock Modulation (aka ODCM)
# options INTEL_ONDEMAND_CLOCKMOD
diff -r f27fb0909a0b -r 06ccbb1eb98c sys/arch/amd64/conf/XEN3_DOM0
--- a/sys/arch/amd64/conf/XEN3_DOM0 Wed Feb 23 10:26:09 2011 +0000
+++ b/sys/arch/amd64/conf/XEN3_DOM0 Wed Feb 23 11:43:21 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: XEN3_DOM0,v 1.61 2010/11/27 20:19:41 christos Exp $
+# $NetBSD: XEN3_DOM0,v 1.62 2011/02/23 11:43:21 jruoho Exp $
include "arch/amd64/conf/std.xen"
@@ -20,10 +20,6 @@
#options VM86 # virtual 8086 emulation
#options USER_LDT # user-settable LDT; used by WINE
-# Enhanced SpeedStep Technology in the Pentium M
-options ENHANCED_SPEEDSTEP
-#options EST_FREQ_USERWRITE # any user can set frequency
-
# AMD PowerNow! and Cool`n'Quiet technology
options POWERNOW_K8
diff -r f27fb0909a0b -r 06ccbb1eb98c sys/arch/i386/conf/ALL
--- a/sys/arch/i386/conf/ALL Wed Feb 23 10:26:09 2011 +0000
+++ b/sys/arch/i386/conf/ALL Wed Feb 23 11:43:21 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.293 2011/02/23 00:45:56 jmcneill Exp $
+# $NetBSD: ALL,v 1.294 2011/02/23 11:43:22 jruoho Exp $
# From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
#
# ALL machine description file
@@ -17,7 +17,7 @@
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "ALL-$Revision: 1.293 $"
+#ident "ALL-$Revision: 1.294 $"
maxusers 64 # estimated number of users
@@ -29,21 +29,16 @@
options X86EMU # 386 Real Mode emulator
options PAE # PAE mode (36 bits physical addressing)
-# Enhanced SpeedStep Technology in the Pentium M
-options ENHANCED_SPEEDSTEP
-options EST_FREQ_USERWRITE # any user can set frequency
-
# AMD PowerNow! K7
options POWERNOW_K7
# AMD PowerNow! and Cool`n'Quiet technology
options POWERNOW_K8
-# VIA PadLock
-padlock0 at cpu0
-
-# Intel Core's on-die Thermal sensor
-coretemp* at cpu?
+# CPU features
+coretemp* at cpu? # Intel on-die thermal sensor
+est0 at cpu0 # Intel Enhanced SpeedStep (non-ACPI)
+padlock0 at cpu0 # VIA PadLock
# Intel(R) On Demand Clock Modulation (aka ODCM)
options INTEL_ONDEMAND_CLOCKMOD
diff -r f27fb0909a0b -r 06ccbb1eb98c sys/arch/i386/conf/GENERIC
--- a/sys/arch/i386/conf/GENERIC Wed Feb 23 10:26:09 2011 +0000
+++ b/sys/arch/i386/conf/GENERIC Wed Feb 23 11:43:21 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.1020 2011/02/23 00:45:56 jmcneill Exp $
+# $NetBSD: GENERIC,v 1.1021 2011/02/23 11:43:22 jruoho Exp $
#
# GENERIC machine description file
#
@@ -22,7 +22,7 @@
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "GENERIC-$Revision: 1.1020 $"
+#ident "GENERIC-$Revision: 1.1021 $"
maxusers 64 # estimated number of users
@@ -37,21 +37,16 @@
options USER_LDT # user-settable LDT; used by WINE
#options PAE # PAE mode (36 bits physical addressing)
-# Enhanced SpeedStep Technology in the Pentium M
-options ENHANCED_SPEEDSTEP
-#options EST_FREQ_USERWRITE # any user can set frequency
-
# AMD PowerNow! K7
options POWERNOW_K7
# AMD PowerNow! and Cool`n'Quiet technology
options POWERNOW_K8
-# Intel Core's on-die Thermal sensor
-coretemp* at cpu?
-
-# VIA PadLock
-#padlock0 at cpu0
+# CPU features
+coretemp* at cpu? # Intel on-die thermal sensor
+est0 at cpu0 # Intel Enhanced SpeedStep (non-ACPI)
+#padlock0 at cpu0 # VIA PadLock
# Intel(R) On Demand Clock Modulation (aka ODCM)
#options INTEL_ONDEMAND_CLOCKMOD
diff -r f27fb0909a0b -r 06ccbb1eb98c sys/arch/x86/conf/files.x86
--- a/sys/arch/x86/conf/files.x86 Wed Feb 23 10:26:09 2011 +0000
+++ b/sys/arch/x86/conf/files.x86 Wed Feb 23 11:43:21 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.x86,v 1.59 2011/02/20 13:42:45 jruoho Exp $
+# $NetBSD: files.x86,v 1.60 2011/02/23 11:43:22 jruoho Exp $
# options for MP configuration through the MP spec
defflag opt_mpbios.h MPBIOS MPVERBOSE MPDEBUG MPBIOS_SCANPCI
@@ -13,10 +13,6 @@
defflag opt_pcifixup.h PCI_ADDR_FIXUP PCI_BUS_FIXUP
PCI_INTR_FIXUP PCI_INTR_FIXUP_FORCE
-# Intel Enhanced Speedstep
-defflag ENHANCED_SPEEDSTEP
-defflag opt_est.h EST_FREQ_USERWRITE
-
# Pentium 4+ Thermal Monitor ODCM (aka On Demand Clock Modulation)
defflag opt_intel_odcm.h INTEL_ONDEMAND_CLOCKMOD
@@ -35,12 +31,17 @@
define ipmibus {}
#
-# CPUs
+# CPU features
#
device cpu: cpufeaturebus
attach cpu at cpubus
file arch/x86/x86/cpu.c cpu
+device est
+attach est at cpufeaturebus
+file arch/x86/x86/est.c est
+file arch/x86/x86/intel_busclock.c est
+
device coretemp: sysmon_envsys
attach coretemp at cpufeaturebus
file arch/x86/x86/coretemp.c coretemp
@@ -104,10 +105,6 @@
# Intel On Demand Clock Modulation
file arch/x86/x86/iclockmod.c intel_ondemand_clockmod
-# Intel Enhanced Speedstep
-file arch/x86/x86/est.c enhanced_speedstep
-file arch/x86/x86/intel_busclock.c enhanced_speedstep
-
# VIA C7 Temperature sensor
file arch/x86/x86/viac7temp.c via_c7temp
diff -r f27fb0909a0b -r 06ccbb1eb98c sys/arch/x86/include/cpu.h
--- a/sys/arch/x86/include/cpu.h Wed Feb 23 10:26:09 2011 +0000
+++ b/sys/arch/x86/include/cpu.h Wed Feb 23 11:43:21 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.29 2011/02/20 13:42:45 jruoho Exp $ */
+/* $NetBSD: cpu.h,v 1.30 2011/02/23 11:43:22 jruoho Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -179,6 +179,7 @@
struct evcnt ci_ipi_events[X86_NIPI];
+ device_t ci_frequency; /* Frequency scaling technology */
device_t ci_padlock; /* VIA PadLock private storage */
device_t ci_tempsensor; /* Intel coretemp(4) or equivalent */
diff -r f27fb0909a0b -r 06ccbb1eb98c sys/arch/x86/include/cpuvar.h
--- a/sys/arch/x86/include/cpuvar.h Wed Feb 23 10:26:09 2011 +0000
+++ b/sys/arch/x86/include/cpuvar.h Wed Feb 23 11:43:21 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpuvar.h,v 1.40 2011/02/20 13:42:45 jruoho Exp $ */
+/* $NetBSD: cpuvar.h,v 1.41 2011/02/23 11:43:22 jruoho Exp $ */
/*-
* Copyright (c) 2000, 2007 The NetBSD Foundation, Inc.
@@ -94,7 +94,6 @@
#if defined(_KERNEL_OPT)
#include "opt_multiprocessor.h"
-#include "opt_enhanced_speedstep.h"
#ifndef XEN
#include "opt_intel_odcm.h"
#include "opt_via_c7temp.h"
@@ -132,14 +131,6 @@
void clockmod_init(void);
#endif
-#ifdef ENHANCED_SPEEDSTEP
-void est_init(int);
-int via_get_bus_clock(struct cpu_info *);
-int viac7_get_bus_clock(struct cpu_info *);
-int p3_get_bus_clock(struct cpu_info *);
-int p4_get_bus_clock(struct cpu_info *);
-#endif
-
void cpu_get_tsc_freq(struct cpu_info *);
void pat_init(struct cpu_info *);
diff -r f27fb0909a0b -r 06ccbb1eb98c sys/arch/x86/include/est.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/x86/include/est.h Wed Feb 23 11:43:21 2011 +0000
@@ -0,0 +1,64 @@
+/* $NetBSD: est.h,v 1.1 2011/02/23 11:43:22 jruoho Exp $ */
+
+/*
+ * Copyright (c) 2003 Michael Eriksson.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*-
+ * Copyright (c) 2004 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
Home |
Main Index |
Thread Index |
Old Index