From 2a27b20226a2fd593bfd5f6a0eee45418233fe04 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Sat, 11 Dec 2010 22:14:44 +0000 Subject: factor out cpu power management base into a separate file. And fix a bug in model_1067x Signed-off-by: Stefan Reinauer Acked-by: Stefan Reinauer git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6164 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/cpu/intel/model_1067x/model_1067x_init.c | 3 +-- src/cpu/intel/model_106cx/model_106cx_init.c | 5 ++--- src/cpu/intel/model_6ex/model_6ex_init.c | 10 +--------- src/cpu/intel/model_6fx/model_6fx_init.c | 10 +--------- src/cpu/intel/speedstep/acpi.c | 3 ++- 5 files changed, 7 insertions(+), 24 deletions(-) (limited to 'src/cpu') diff --git a/src/cpu/intel/model_1067x/model_1067x_init.c b/src/cpu/intel/model_1067x/model_1067x_init.c index 46a54e597d..ca2b960b8b 100644 --- a/src/cpu/intel/model_1067x/model_1067x_init.c +++ b/src/cpu/intel/model_1067x/model_1067x_init.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -98,8 +99,6 @@ static void enable_vmx(void) #define PMG_IO_BASE_ADDR 0xe3 #define PMG_IO_CAPTURE_ADDR 0xe4 -#define PMB0_BASE 0x580 -#define PMB1_BASE 0x800 #define CST_RANGE 2 static void configure_c_states(void) { diff --git a/src/cpu/intel/model_106cx/model_106cx_init.c b/src/cpu/intel/model_106cx/model_106cx_init.c index f83a0bbbf0..2e38e775a6 100644 --- a/src/cpu/intel/model_106cx/model_106cx_init.c +++ b/src/cpu/intel/model_106cx/model_106cx_init.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -82,9 +83,7 @@ static void enable_vmx(void) #define PMG_CST_CONFIG_CONTROL 0xe2 #define PMG_IO_BASE_ADDR 0xe3 #define PMG_IO_CAPTURE_ADDR 0xe4 -#define PMB0 0x510 /* analogous to P_BLK in cpu.asl */ -#define PMB1 0x0 /* IO port that triggers SMI once cores are in the same state. - See CSM Trigger, at PMG_CST_CONFIG_CONTROL[6:4] */ + #define HIGHEST_CLEVEL 3 static void configure_c_states(void) { diff --git a/src/cpu/intel/model_6ex/model_6ex_init.c b/src/cpu/intel/model_6ex/model_6ex_init.c index 384b2bf68b..eee651a207 100644 --- a/src/cpu/intel/model_6ex/model_6ex_init.c +++ b/src/cpu/intel/model_6ex/model_6ex_init.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -80,15 +81,6 @@ static void enable_vmx(void) #define PMG_IO_BASE_ADDR 0xe3 #define PMG_IO_CAPTURE_ADDR 0xe4 -/* MWAIT coordination I/O base address. This must match - * the \_PR_.CPU0 PM base address. - */ -#define PMB0_BASE 0x510 - -/* PMB1: I/O port that triggers SMI once cores are in the same state. - * See CSM Trigger, at PMG_CST_CONFIG_CONTROL[6:4] - */ -#define PMB1_BASE 0x800 #define HIGHEST_CLEVEL 3 static void configure_c_states(void) { diff --git a/src/cpu/intel/model_6fx/model_6fx_init.c b/src/cpu/intel/model_6fx/model_6fx_init.c index 0944aab955..a3939c91f7 100644 --- a/src/cpu/intel/model_6fx/model_6fx_init.c +++ b/src/cpu/intel/model_6fx/model_6fx_init.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -94,15 +95,6 @@ static void enable_vmx(void) #define PMG_IO_BASE_ADDR 0xe3 #define PMG_IO_CAPTURE_ADDR 0xe4 -/* MWAIT coordination I/O base address. This must match - * the \_PR_.CPU0 PM base address. - */ -#define PMB0_BASE 0x510 - -/* PMB1: I/O port that triggers SMI once cores are in the same state. - * See CSM Trigger, at PMG_CST_CONFIG_CONTROL[6:4] - */ -#define PMB1_BASE 0x800 #define HIGHEST_CLEVEL 3 static void configure_c_states(void) { diff --git a/src/cpu/intel/speedstep/acpi.c b/src/cpu/intel/speedstep/acpi.c index 954b669515..48e1a3cedc 100644 --- a/src/cpu/intel/speedstep/acpi.c +++ b/src/cpu/intel/speedstep/acpi.c @@ -26,6 +26,7 @@ #include #include #include +#include #include // XXX: PSS table values for power consumption are for Merom only @@ -64,7 +65,7 @@ static int get_fsb(void) void generate_cpu_entries(void) { int len_pr, len_ps; - int coreID, cpuID, pcontrol_blk=0x510, plen=6; + int coreID, cpuID, pcontrol_blk = PMB0_BASE, plen = 6; msr_t msr; int totalcores = determine_total_number_of_cores(); int cores_per_package = (cpuid_ebx(1)>>16) & 0xff; -- cgit v1.2.3