UPSTREAM: 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.

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/17784
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>

Change-Id: I4402315945771acf1c86a81cac6d43f1fe99a2a2
Reviewed-on: https://chromium-review.googlesource.com/418872
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
Kyösti Mälkki 2016-12-04 22:17:37 +02:00 committed by chrome-bot
commit 5604e16494
7 changed files with 14 additions and 23 deletions

View file

@ -485,6 +485,10 @@ void mainboard_smi_sleep(u8 slp_typ);
void smi_release_lock(void);
#endif
/* This is the SMM handler. */
extern unsigned char _binary_smm_start[];
extern unsigned char _binary_smm_end[];
/* Get PMBASE address */
u16 smm_get_pmbase(void);