diff options
author | Duncan Laurie <dlaurie@chromium.org> | 2012-10-03 19:01:57 -0700 |
---|---|---|
committer | Ronald G. Minnich <rminnich@gmail.com> | 2012-11-14 05:43:26 +0100 |
commit | 7f3d442abb2a8ff6f6728527ab7665fd79fd60cd (patch) | |
tree | 5c87a60a4d8e3394c8fe47cac8a9b69943759b66 /src/mainboard/samsung/stumpy | |
parent | d396a77b4d144a89a98240541945111280106de6 (diff) |
SMM: Avoid use of global variables in SMI handler
Using global variables with the TSEG is a bad idea because
they are not relocated properly right now. Instead make
the variables static and add accessor functions for the
rest of SMM to use.
At the same time drop the tcg/smi1 pointers as they are
not setup or ever used. (the debug output is added back
in a subsequent commit)
Change-Id: If0b2d47df4e482ead71bf713c1ef748da840073b
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: http://review.coreboot.org/1764
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src/mainboard/samsung/stumpy')
-rw-r--r-- | src/mainboard/samsung/stumpy/mainboard_smi.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/mainboard/samsung/stumpy/mainboard_smi.c b/src/mainboard/samsung/stumpy/mainboard_smi.c index 0b3024bad5..660bb31cd4 100644 --- a/src/mainboard/samsung/stumpy/mainboard_smi.c +++ b/src/mainboard/samsung/stumpy/mainboard_smi.c @@ -30,17 +30,12 @@ /* Include romstage serial for SIO helper functions */ #include <superio/ite/it8772f/early_serial.c> -/* The southbridge SMI handler checks whether gnvs has a - * valid pointer before calling the trap handler - */ -extern global_nvs_t *gnvs; - int mainboard_io_trap_handler(int smif) { switch (smif) { case 0x99: printk(BIOS_DEBUG, "Sample\n"); - gnvs->smif = 0; + smm_get_gnvs()->smif = 0; break; default: return 0; |