diff options
author | Sven Schnelle <svens@stackframe.org> | 2011-06-14 20:55:54 +0200 |
---|---|---|
committer | Sven Schnelle <svens@stackframe.org> | 2011-06-15 23:11:44 +0200 |
commit | bfe8e5186ea9916634d31182ec0437f6175e7724 (patch) | |
tree | c47d6e948425e4bbe0d9c38cc2a1eb1a954070a9 /src/southbridge/intel/i82801gx/smihandler.c | |
parent | b629d14becd78c634ad412df726d964ed5d51214 (diff) | |
download | coreboot-bfe8e5186ea9916634d31182ec0437f6175e7724.tar.xz |
SMM: don't overwrite SMM memory on resume
Overwriting the SMM Area on resume leaves us with
all variables cleared out, i.e., the GNVS pointer
is no longer available, which makes SMIF function
calls impossible.
Change-Id: I08ab4ffd41df0922d63c017822de1f89a3ff254d
Signed-off-by: Sven Schnelle <svens@stackframe.org>
Reviewed-on: http://review.coreboot.org/34
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/southbridge/intel/i82801gx/smihandler.c')
-rw-r--r-- | src/southbridge/intel/i82801gx/smihandler.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/southbridge/intel/i82801gx/smihandler.c b/src/southbridge/intel/i82801gx/smihandler.c index 9befbf9ac1..434bfebc18 100644 --- a/src/southbridge/intel/i82801gx/smihandler.c +++ b/src/southbridge/intel/i82801gx/smihandler.c @@ -328,6 +328,13 @@ static void southbridge_smi_sleep(unsigned int node, smm_state_save_area_t *stat default: printk(BIOS_DEBUG, "SMI#: ERROR: SLP_TYP reserved\n"); break; } + /* Unlock the SMI semaphore. We're currently in SMM, and the semaphore + * will never be unlocked because the next outl will switch off the CPU. + * This might open a small race between the smi_release_lock() and the outl() + * for other SMI handlers. Not sure if this could cause trouble. */ + if (slp_typ == 5) + smi_release_lock(); + /* Write back to the SLP register to cause the originally intended * event again. We need to set BIT13 (SLP_EN) though to make the * sleep happen. |