[coreboot] New patch to review for coreboot: 59253a6 smi: make tseg_relocate check pointer offset

Stefan Reinauer (stefan.reinauer@coreboot.org) gerrit at coreboot.org
Wed Nov 7 00:50:25 CET 2012

Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1740


commit 59253a69d7d0067fa4e5a9c3221e0e7240e1c251
Author: Duncan Laurie <dlaurie at chromium.org>
Date:   Tue Sep 4 11:11:58 2012 -0700

    smi: make tseg_relocate check pointer offset
    In case tseg_relocate() is called again on a pointer we should not
    relocate it again.
    Change-Id: Ida1f9c20dc94b448c773b14d8864afe585369119
    Signed-off-by: Duncan Laurie <dlaurie at chromium.org>
 src/southbridge/intel/bd82x6x/smihandler.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/southbridge/intel/bd82x6x/smihandler.c b/src/southbridge/intel/bd82x6x/smihandler.c
index da5b52b..8ed29e4 100644
--- a/src/southbridge/intel/bd82x6x/smihandler.c
+++ b/src/southbridge/intel/bd82x6x/smihandler.c
@@ -65,7 +65,7 @@ u32 smi_get_tseg_base(void)
 void tseg_relocate(void **ptr)
 	/* Adjust pointer with TSEG base */
-	if (*ptr)
+	if (*ptr && *ptr < (void*)smi_get_tseg_base())
 		*ptr = (void *)(((u8*)*ptr) + smi_get_tseg_base());

More information about the coreboot mailing list