diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2016-12-04 22:17:37 +0200 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2016-12-11 08:56:40 +0100 |
commit | 9d8adc0e3a923e1d201d50344f94a9176e5ec939 (patch) | |
tree | 5868a41948f5eda05a1fb8a213c4891d8a631cad /src/southbridge/intel/i82801ix | |
parent | 3b3a28436f8ef65e2aee80f7367452c2bc136a19 (diff) |
x86 SMM: Fix use with RELOCATABLE_RAMSTAGE
The value for _size was not evaluated correctly if ramstage
is relocated, make the calculation runtime.
While touching it, move symbol declarations to header file.
Change-Id: I4402315945771acf1c86a81cac6d43f1fe99a2a2
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/17784
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/southbridge/intel/i82801ix')
-rw-r--r-- | src/southbridge/intel/i82801ix/smi.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/southbridge/intel/i82801ix/smi.c b/src/southbridge/intel/i82801ix/smi.c index 358a1a9ee7..421746df7e 100644 --- a/src/southbridge/intel/i82801ix/smi.c +++ b/src/southbridge/intel/i82801ix/smi.c @@ -26,9 +26,6 @@ #include <string.h> #include "i82801ix.h" -extern unsigned char _binary_smm_start; -extern unsigned char _binary_smm_size; - /* I945/GM45 */ #define SMRAM 0x9d #define D_OPEN (1 << 6) @@ -344,7 +341,8 @@ static void smm_install(void) D_OPEN | G_SMRAME | C_BASE_SEG); /* copy the real SMM handler */ - memcpy((void *)0xa0000, &_binary_smm_start, (size_t)&_binary_smm_size); + memcpy((void *)0xa0000, _binary_smm_start, + _binary_smm_end - _binary_smm_start); wbinvd(); } |