Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/27279
Change subject: intel: Get rid of smm_get_pmbase ......................................................................
intel: Get rid of smm_get_pmbase
Change-Id: I2b3168c600a81502f9cd1ff3203c492cf026e532 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/include/cpu/x86/smm.h M src/mainboard/google/stout/ec.c M src/southbridge/intel/common/smihandler.c M src/southbridge/intel/fsp_bd82x6x/smihandler.c M src/southbridge/intel/fsp_i89xx/smihandler.c M src/southbridge/intel/ibexpeak/smihandler.c 6 files changed, 2 insertions(+), 40 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/79/27279/1
diff --git a/src/include/cpu/x86/smm.h b/src/include/cpu/x86/smm.h index 7dcf4d7..35977a7 100644 --- a/src/include/cpu/x86/smm.h +++ b/src/include/cpu/x86/smm.h @@ -508,9 +508,6 @@ extern unsigned char _binary_smm_start[]; extern unsigned char _binary_smm_end[];
-/* Get PMBASE address */ -u16 smm_get_pmbase(void); - struct smm_runtime { u32 smbase; u32 save_state_size; diff --git a/src/mainboard/google/stout/ec.c b/src/mainboard/google/stout/ec.c index a459d0c..229f919 100644 --- a/src/mainboard/google/stout/ec.c +++ b/src/mainboard/google/stout/ec.c @@ -22,6 +22,7 @@ #include <device/device.h> #include <device/pci.h> #include <southbridge/intel/bd82x6x/pch.h> +#include <southbridge/intel/common/pmbase.h> #include <elog.h> #include "ec.h"
@@ -64,7 +65,6 @@ void stout_ec_finalize_smm(void) { u8 ec_reg, critical_shutdown = 0; - u32 pm1_cnt;
/* * Check EC for error conditions. @@ -115,9 +115,7 @@ printk(BIOS_ERR, "EC critical_shutdown");
/* Go to S5 */ - pm1_cnt = inl(smm_get_pmbase() + PM1_CNT); - pm1_cnt |= (0xf << 10); - outl(pm1_cnt, smm_get_pmbase() + PM1_CNT); + write_pmbase32(PM1_CNT, read_pmbase32(PM1_CNT) | (0xf << 10)); } } #endif //__SMM__ diff --git a/src/southbridge/intel/common/smihandler.c b/src/southbridge/intel/common/smihandler.c index 234a1c5..a5ebf25 100644 --- a/src/southbridge/intel/common/smihandler.c +++ b/src/southbridge/intel/common/smihandler.c @@ -32,12 +32,6 @@
static u16 pmbase;
-/* Defined in <cpu/x86/smm.h> which is used outside of common code*/ -u16 smm_get_pmbase(void) -{ - return get_pmbase(); -} - void gpi_route_interrupt(u8 gpi, u8 mode) { u32 gpi_rout; diff --git a/src/southbridge/intel/fsp_bd82x6x/smihandler.c b/src/southbridge/intel/fsp_bd82x6x/smihandler.c index c868ec6..7eb108a 100644 --- a/src/southbridge/intel/fsp_bd82x6x/smihandler.c +++ b/src/southbridge/intel/fsp_bd82x6x/smihandler.c @@ -33,15 +33,6 @@ */ #include <northbridge/intel/fsp_sandybridge/northbridge.h>
-/* While we read PMBASE dynamically in case it changed, let's - * initialize it with a sane value - */ -static u16 pmbase = DEFAULT_PMBASE; -u16 smm_get_pmbase(void) -{ - return pmbase; -} - static u8 smm_initialized = 0;
/* GNVS needs to be updated by an 0xEA PM Trap (B2) after it has been located diff --git a/src/southbridge/intel/fsp_i89xx/smihandler.c b/src/southbridge/intel/fsp_i89xx/smihandler.c index 0ef7ba8..870e442 100644 --- a/src/southbridge/intel/fsp_i89xx/smihandler.c +++ b/src/southbridge/intel/fsp_i89xx/smihandler.c @@ -33,15 +33,6 @@ */ #include <northbridge/intel/fsp_sandybridge/northbridge.h>
-/* While we read PMBASE dynamically in case it changed, let's - * initialize it with a sane value - */ -static u16 pmbase = DEFAULT_PMBASE; -u16 smm_get_pmbase(void) -{ - return pmbase; -} - static u8 smm_initialized = 0;
/* GNVS needs to be updated by an 0xEA PM Trap (B2) after it has been located diff --git a/src/southbridge/intel/ibexpeak/smihandler.c b/src/southbridge/intel/ibexpeak/smihandler.c index 12a7ac0..eb72e6b 100644 --- a/src/southbridge/intel/ibexpeak/smihandler.c +++ b/src/southbridge/intel/ibexpeak/smihandler.c @@ -36,15 +36,6 @@ #include <southbridge/intel/common/gpio.h> #include <arch/io.h>
-/* While we read PMBASE dynamically in case it changed, let's - * initialize it with a sane value - */ -static u16 pmbase = DEFAULT_PMBASE; -u16 smm_get_pmbase(void) -{ - return pmbase; -} - static u8 smm_initialized = 0;
/* GNVS needs to be updated by an 0xEA PM Trap (B2) after it has been located