Stefan Reinauer (stefan.reinauer@coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/933
-gerrit
commit 29e565474ac898c7b846d45aa5d4e27e2eb6b4db Author: Stefan Reinauer stefan.reinauer@coreboot.org Date: Fri Apr 27 00:44:04 2012 +0200
SMM: unify mainboard APM command handlers
rename from mainboard_apm_cnt to mainboard_smi_apmc to match the function naming scheme of the other handlers. Add prototype for mainboard_smi_sleep (mainboard specific S3 sleep handlers in SMM) that is required by Sandybridge.
Change-Id: Ib479397e460e33772d90d9d41dba267e4e7e3008 Signed-off-by: Stefan Reinauer reinauer@google.com --- src/include/cpu/x86/smm.h | 4 +++- src/mainboard/lenovo/t60/mainboard_smi.c | 2 +- src/mainboard/lenovo/x60/mainboard_smi.c | 2 +- src/southbridge/intel/bd82x6x/smihandler.c | 2 +- src/southbridge/intel/i82801gx/smihandler.c | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/include/cpu/x86/smm.h b/src/include/cpu/x86/smm.h index 60959f5..89257e5 100644 --- a/src/include/cpu/x86/smm.h +++ b/src/include/cpu/x86/smm.h @@ -279,7 +279,9 @@ void __attribute__((weak)) northbridge_smi_handler(unsigned int node, smm_state_ void __attribute__((weak)) southbridge_smi_handler(unsigned int node, smm_state_save_area_t *state_save);
void __attribute__((weak)) mainboard_smi_gpi(u16 gpi_sts); -int __attribute__((weak)) mainboard_apm_cnt(u8 data); +int __attribute__((weak)) mainboard_smi_apmc(u8 data); +void __attribute__((weak)) mainboard_smi_sleep(u8 slp_typ); + #if !CONFIG_SMM_TSEG void smi_release_lock(void); #endif diff --git a/src/mainboard/lenovo/t60/mainboard_smi.c b/src/mainboard/lenovo/t60/mainboard_smi.c index eb28256..6ea5037 100644 --- a/src/mainboard/lenovo/t60/mainboard_smi.c +++ b/src/mainboard/lenovo/t60/mainboard_smi.c @@ -159,7 +159,7 @@ void mainboard_smi_gpi(u16 gpi) mainboard_smi_handle_ec_sci(); }
-int mainboard_apm_cnt(u8 data) +int mainboard_smi_apmc(u8 data) { u16 pmbase = pci_read_config16(PCI_DEV(0, 0x1f, 0), 0x40) & 0xfffc; u8 tmp; diff --git a/src/mainboard/lenovo/x60/mainboard_smi.c b/src/mainboard/lenovo/x60/mainboard_smi.c index bd1333a..c0d8440 100644 --- a/src/mainboard/lenovo/x60/mainboard_smi.c +++ b/src/mainboard/lenovo/x60/mainboard_smi.c @@ -165,7 +165,7 @@ void mainboard_smi_gpi(u16 gpi) mainboard_smi_handle_ec_sci(); }
-int mainboard_apm_cnt(u8 data) +int mainboard_smi_apmc(u8 data) { u16 pmbase = pci_read_config16(PCI_DEV(0, 0x1f, 0), 0x40) & 0xfffc; u8 tmp; diff --git a/src/southbridge/intel/bd82x6x/smihandler.c b/src/southbridge/intel/bd82x6x/smihandler.c index e311d95..d7690ba 100644 --- a/src/southbridge/intel/bd82x6x/smihandler.c +++ b/src/southbridge/intel/bd82x6x/smihandler.c @@ -405,7 +405,7 @@ static void southbridge_smi_apmc(unsigned int node, smm_state_save_area_t *state { u32 pmctrl; u8 reg8; - void (*mainboard_apmc)(u8 apmc) = mainboard_smi_apmc; + int (*mainboard_apmc)(u8 apmc) = mainboard_smi_apmc;
/* Emulate B2 register as the FADT / Linux expects it */
diff --git a/src/southbridge/intel/i82801gx/smihandler.c b/src/southbridge/intel/i82801gx/smihandler.c index 401c9ad..9d71fa3 100644 --- a/src/southbridge/intel/i82801gx/smihandler.c +++ b/src/southbridge/intel/i82801gx/smihandler.c @@ -366,7 +366,7 @@ static void southbridge_smi_apmc(unsigned int node, smm_state_save_area_t *state /* Emulate B2 register as the FADT / Linux expects it */
reg8 = inb(APM_CNT); - if (mainboard_apm_cnt && mainboard_apm_cnt(reg8)) + if (mainboard_smi_apmc && mainboard_smi_apmc(reg8)) return;
switch (reg8) {