aboutsummaryrefslogtreecommitdiff
path: root/src/southbridge/intel/bd82x6x/smihandler.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/southbridge/intel/bd82x6x/smihandler.c')
-rw-r--r--src/southbridge/intel/bd82x6x/smihandler.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/southbridge/intel/bd82x6x/smihandler.c b/src/southbridge/intel/bd82x6x/smihandler.c
index 8fea33f5da..4cad88bfcf 100644
--- a/src/southbridge/intel/bd82x6x/smihandler.c
+++ b/src/southbridge/intel/bd82x6x/smihandler.c
@@ -424,7 +424,6 @@ static void southbridge_smi_sleep(unsigned int node, smm_state_save_area_t *stat
}
}
-#if CONFIG_ELOG_GSMI
/*
* Look for Synchronous IO SMI and use save state from that
* core in case we are not running on the same core that
@@ -462,7 +461,6 @@ static em64t101_smm_state_save_area_t *smi_apmc_find_state_save(u64 cmd)
return NULL;
}
-#endif
#if CONFIG_ELOG_GSMI
static void southbridge_smi_gsmi(void)
@@ -492,6 +490,7 @@ static void southbridge_smi_apmc(unsigned int node, smm_state_save_area_t *state
u32 pmctrl;
u8 reg8;
int (*mainboard_apmc)(u8 apmc) = mainboard_smi_apmc;
+ em64t101_smm_state_save_area_t *state;
/* Emulate B2 register as the FADT / Linux expects it */
@@ -528,8 +527,13 @@ static void southbridge_smi_apmc(unsigned int node, smm_state_save_area_t *state
printk(BIOS_DEBUG, "SMI#: SMM structures already initialized!\n");
return;
}
- gnvs = *(global_nvs_t **)0x500;
- smm_initialized = 1;
+ state = smi_apmc_find_state_save(reg8);
+ if (state) {
+ /* EBX in the state save contains the GNVS pointer */
+ gnvs = (global_nvs_t *)((u32)state->rbx);
+ smm_initialized = 1;
+ printk(BIOS_DEBUG, "SMI#: Setting GNVS to %p\n", gnvs);
+ }
break;
#if CONFIG_ELOG_GSMI
case ELOG_GSMI_APM_CNT: