Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch Move PowerNow! to the cpufeaturebus.



details:   https://anonhg.NetBSD.org/src/rev/419e6a731a5c
branches:  trunk
changeset: 762615:419e6a731a5c
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Thu Feb 24 10:56:00 2011 +0000

description:
Move PowerNow! to the cpufeaturebus.

diffstat:

 sys/arch/amd64/conf/GENERIC        |     8 +-
 sys/arch/amd64/conf/XEN3_DOM0      |     6 +-
 sys/arch/i386/conf/ALL             |    11 +-
 sys/arch/i386/conf/GENERIC         |    11 +-
 sys/arch/i386/conf/XEN3_DOM0       |     9 +-
 sys/arch/i386/conf/files.i386      |     8 +-
 sys/arch/i386/i386/powernow_k7.c   |   492 -----------------
 sys/arch/x86/conf/files.x86        |    21 +-
 sys/arch/x86/include/powernow.h    |    20 +-
 sys/arch/x86/x86/cpu.c             |    10 +-
 sys/arch/x86/x86/identcpu.c        |    28 +-
 sys/arch/x86/x86/powernow.c        |  1000 ++++++++++++++++++++++++++++++++++++
 sys/arch/x86/x86/powernow_common.c |    57 --
 sys/arch/x86/x86/powernow_k8.c     |   502 ------------------
 sys/arch/xen/conf/files.xen        |    16 +-
 sys/arch/xen/x86/cpu.c             |    10 +-
 16 files changed, 1051 insertions(+), 1158 deletions(-)

diffs (truncated from 2516 to 300 lines):

diff -r 185a0eda7c33 -r 419e6a731a5c sys/arch/amd64/conf/GENERIC
--- a/sys/arch/amd64/conf/GENERIC       Thu Feb 24 10:30:03 2011 +0000
+++ b/sys/arch/amd64/conf/GENERIC       Thu Feb 24 10:56:00 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.313 2011/02/23 11:43:21 jruoho Exp $
+# $NetBSD: GENERIC,v 1.314 2011/02/24 10:56:00 jruoho Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options        INCLUDE_CONFIG_FILE     # embed config file in kernel binary
 
-#ident                 "GENERIC-$Revision: 1.313 $"
+#ident                 "GENERIC-$Revision: 1.314 $"
 
 maxusers       64              # estimated number of users
 
@@ -78,12 +78,10 @@
 #options       PIPE_SOCKETPAIR # smaller, but slower pipe(2)
 options        SYSCTL_INCLUDE_DESCR    # Include sysctl descriptions in kernel
 
-# AMD PowerNow! and Cool`n'Quiet technology
-options        POWERNOW_K8
-
 # CPU features
 coretemp*      at cpu?         # Intel on-die thermal sensor
 est0           at cpu0         # Intel Enhanced SpeedStep (non-ACPI)
+powernow0      at cpu0         # AMD PowerNow! and Cool'n'Quiet (non-ACPI)
 
 # Intel(R) On Demand Clock Modulation (aka ODCM)
 # options       INTEL_ONDEMAND_CLOCKMOD
diff -r 185a0eda7c33 -r 419e6a731a5c sys/arch/amd64/conf/XEN3_DOM0
--- a/sys/arch/amd64/conf/XEN3_DOM0     Thu Feb 24 10:30:03 2011 +0000
+++ b/sys/arch/amd64/conf/XEN3_DOM0     Thu Feb 24 10:56:00 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: XEN3_DOM0,v 1.63 2011/02/24 04:42:54 jruoho Exp $
+# $NetBSD: XEN3_DOM0,v 1.64 2011/02/24 10:56:00 jruoho Exp $
 
 include        "arch/amd64/conf/std.xen"
 
@@ -20,11 +20,9 @@
 #options       VM86            # virtual 8086 emulation
 #options       USER_LDT        # user-settable LDT; used by WINE
 
-# AMD PowerNow! and Cool`n'Quiet technology
-options                POWERNOW_K8
-
 # CPU features
 est0           at cpu0         # Intel Enhanced SpeedStep (non-ACPI)
+powernow0      at cpu0         # AMD PowerNow! and Cool'n'Quiet (non-ACPI)
 
 #options       MTRR            # memory-type range register syscall support
 
diff -r 185a0eda7c33 -r 419e6a731a5c sys/arch/i386/conf/ALL
--- a/sys/arch/i386/conf/ALL    Thu Feb 24 10:30:03 2011 +0000
+++ b/sys/arch/i386/conf/ALL    Thu Feb 24 10:56:00 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.294 2011/02/23 11:43:22 jruoho Exp $
+# $NetBSD: ALL,v 1.295 2011/02/24 10:56:01 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.294 $"
+#ident                 "ALL-$Revision: 1.295 $"
 
 maxusers       64              # estimated number of users
 
@@ -29,16 +29,11 @@
 options        X86EMU          # 386 Real Mode emulator
 options        PAE             # PAE mode (36 bits physical addressing)
 
-# AMD PowerNow! K7
-options        POWERNOW_K7
-
-# AMD PowerNow! and Cool`n'Quiet technology
-options        POWERNOW_K8
-
 # CPU features
 coretemp*      at cpu?         # Intel on-die thermal sensor
 est0           at cpu0         # Intel Enhanced SpeedStep (non-ACPI)
 padlock0       at cpu0         # VIA PadLock
+powernow0      at cpu0         # AMD PowerNow! and Cool'n'Quiet (non-ACPI)
 
 # Intel(R) On Demand Clock Modulation (aka ODCM)
 options        INTEL_ONDEMAND_CLOCKMOD
diff -r 185a0eda7c33 -r 419e6a731a5c sys/arch/i386/conf/GENERIC
--- a/sys/arch/i386/conf/GENERIC        Thu Feb 24 10:30:03 2011 +0000
+++ b/sys/arch/i386/conf/GENERIC        Thu Feb 24 10:56:00 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.1021 2011/02/23 11:43:22 jruoho Exp $
+# $NetBSD: GENERIC,v 1.1022 2011/02/24 10:56:01 jruoho Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options        INCLUDE_CONFIG_FILE     # embed config file in kernel binary
 
-#ident                 "GENERIC-$Revision: 1.1021 $"
+#ident                 "GENERIC-$Revision: 1.1022 $"
 
 maxusers       64              # estimated number of users
 
@@ -37,16 +37,11 @@
 options        USER_LDT        # user-settable LDT; used by WINE
 #options       PAE             # PAE mode (36 bits physical addressing)
 
-# AMD PowerNow! K7
-options        POWERNOW_K7
-
-# AMD PowerNow! and Cool`n'Quiet technology
-options        POWERNOW_K8
-
 # CPU features
 coretemp*      at cpu?         # Intel on-die thermal sensor
 est0           at cpu0         # Intel Enhanced SpeedStep (non-ACPI)
 #padlock0      at cpu0         # VIA PadLock
+powernow0      at cpu0         # AMD PowerNow! and Cool'n'Quiet (non-ACPI)
 
 # Intel(R) On Demand Clock Modulation (aka ODCM)
 #options       INTEL_ONDEMAND_CLOCKMOD
diff -r 185a0eda7c33 -r 419e6a731a5c sys/arch/i386/conf/XEN3_DOM0
--- a/sys/arch/i386/conf/XEN3_DOM0      Thu Feb 24 10:30:03 2011 +0000
+++ b/sys/arch/i386/conf/XEN3_DOM0      Thu Feb 24 10:56:00 2011 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: XEN3_DOM0,v 1.45 2011/02/24 07:51:16 jruoho Exp $
+#      $NetBSD: XEN3_DOM0,v 1.46 2011/02/24 10:56:01 jruoho Exp $
 #
 #      XEN3_0: Xen 3.0 domain0 kernel
 
@@ -30,14 +30,9 @@
 #options       VM86            # virtual 8086 emulation
 #options       USER_LDT        # user-settable LDT; used by WINE
 
-# AMD PowerNow! K7
-options        POWERNOW_K7
-
-# AMD PowerNow! and Cool`n'Quiet technology
-options        POWERNOW_K8
-
 # CPU features
 est0           at cpu0         # Intel Enhanced SpeedStep (non-ACPI)
+powernow0      at cpu0         # AMD PowerNow! and Cool'n'Quiet (non-ACPI)
 
 #options       MTRR            # memory-type range register syscall support
 
diff -r 185a0eda7c33 -r 419e6a731a5c sys/arch/i386/conf/files.i386
--- a/sys/arch/i386/conf/files.i386     Thu Feb 24 10:30:03 2011 +0000
+++ b/sys/arch/i386/conf/files.i386     Thu Feb 24 10:56:00 2011 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.i386,v 1.355 2010/07/08 11:24:59 rmind Exp $
+#      $NetBSD: files.i386,v 1.356 2011/02/24 10:56:01 jruoho Exp $
 #
 # new style config file for i386 architecture
 #
@@ -59,9 +59,6 @@
 obsolete       defparam                MULTIBOOT_SYMTAB_SPACE
 file   arch/i386/i386/multiboot.c      multiboot
 
-# PowerNow K7
-defflag        POWERNOW_K7
-
 file   arch/i386/i386/autoconf.c
 file   arch/i386/i386/aout_machdep.c   exec_aout
 file   arch/i386/i386/busfunc.S
@@ -489,9 +486,6 @@
 obsolete       defparam opt_vesafb.h   VESAFB_WIDTH VESAFB_HEIGHT VESAFB_DEPTH
 obsolete       defflag opt_vesafb.h    VESAFB_PM
 
-# AMD PowerNow K7
-file   arch/i386/i386/powernow_k7.c    powernow_k7
-
 # AMD Geode LX Security Block
 device glxsb: opencrypto
 attach glxsb at pci    
diff -r 185a0eda7c33 -r 419e6a731a5c sys/arch/i386/i386/powernow_k7.c
--- a/sys/arch/i386/i386/powernow_k7.c  Thu Feb 24 10:30:03 2011 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,492 +0,0 @@
-/*     $NetBSD: powernow_k7.c,v 1.33 2009/08/23 15:58:39 ahoka Exp $ */
-/*     $OpenBSD: powernow-k7.c,v 1.24 2006/06/16 05:58:50 gwk Exp $ */
-
-/*-
- * Copyright (c) 2004, 2008 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Martin Vegiard.
- *
- * 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
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*-
- * Copyright (c) 2004-2005 Bruno Ducrot
- * Copyright (c) 2004 FUKUDA Nobuhiko <nfukuda%spa.is.uec.ac.jp@localhost>
- * Copyright (c) 2004 Martin Vegiard
- *
- * 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 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.
- */
-
-/* AMD POWERNOW K7 driver */
-
-#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: powernow_k7.c,v 1.33 2009/08/23 15:58:39 ahoka Exp $");
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/malloc.h>
-#include <sys/sysctl.h>
-
-#include <machine/cpu.h>
-#include <machine/cpufunc.h>
-#include <machine/bus.h>
-
-#include <dev/isa/isareg.h>
-
-#include <x86/include/isa_machdep.h>
-#include <x86/include/powernow.h>
-
-#ifdef _MODULE
-static struct sysctllog        *sysctllog;
-#define SYSCTLLOG      &sysctllog
-#else
-#define SYSCTLLOG      NULL
-#endif
-
-/*
- * Divide each value by 10 to get the processor multiplier.
- * Taken from powernow-k7.c/Linux by Dave Jones
- */
-static int k7pnow_fid_to_mult[32] = {
-       110, 115, 120, 125, 50, 55, 60, 65,
-       70, 75, 80, 85, 90, 95, 100, 105,
-       30, 190, 40, 200, 130, 135, 140, 210,
-       150, 225, 160, 165, 170, 180, -1, -1
-};
-
-/*
- * The following CPUs do not have same CPUID signature
- * in the PST tables, but they have correct FID/VID values.
- */
-static struct pnow_cpu_quirk {
-       uint32_t rcpusig;       /* Correct cpu signature */
-       uint32_t pcpusig;       /* PST cpu signature */
-} pnow_cpu_quirk[] = {
-       { 0x680, 0x780 },       /* Reported by Olaf 'Rhialto' Seibert */
-       { 0x6a0, 0x781 },       /* Reported by Eric Schnoebelen */
-       { 0x6a0, 0x7a0 },       /* Reported by Nino Dehne */
-       { 0, 0 }
-};
-
-static struct powernow_cpu_state *k7pnow_current_state;
-static unsigned int cur_freq, cpu_mhz;
-static int powernow_node_target, powernow_node_current;
-static char *freq_names;
-static size_t freq_names_len;
-static uint8_t k7pnow_flag;



Home | Main Index | Thread Index | Old Index