diff options
author | Duncan Laurie <dlaurie@chromium.org> | 2012-09-04 11:11:58 -0700 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2012-11-08 19:39:50 +0100 |
commit | 2558c736a06c416e41bb35c2e6439f457e541f61 (patch) | |
tree | d3348f806527e17f916fabd60ec372f53b144b5a /src/southbridge/intel | |
parent | 5c88c6f2d797b7fbcbf844a79356fcc833eb5338 (diff) |
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@chromium.org>
Reviewed-on: http://review.coreboot.org/1740
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/southbridge/intel')
-rw-r--r-- | src/southbridge/intel/bd82x6x/smihandler.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/southbridge/intel/bd82x6x/smihandler.c b/src/southbridge/intel/bd82x6x/smihandler.c index da5b52b413..8ed29e4675 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()); } #endif |