Arthur Heymans has submitted this change. ( https://review.coreboot.org/c/coreboot/+/81097?usp=email )
Change subject: drivers/intel/fsp2_0: Use DECLARE_REGION for FSP-M heap ......................................................................
drivers/intel/fsp2_0: Use DECLARE_REGION for FSP-M heap
There are 2 ways of referring to linker symbols, as extern u8[] or extern u8*. Only the former will be correctly initiated into an immediate operand (a constant) to asm.
DECLARE_REGION defines reference in form of extern u8[]. Use DECLARE_REGION as a standard way for these references.
TEST=intel/archercity CRB
Change-Id: I5f7d7855592d99b074f7ef49c285a13f8105f089 Signed-off-by: Shuo Liu shuo.liu@intel.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/81097 Reviewed-by: Julius Werner jwerner@chromium.org Reviewed-by: Subrata Banik subratabanik@google.com Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Jérémy Compostella jeremy.compostella@intel.com Reviewed-by: Arthur Heymans arthur@aheymans.xyz --- M src/drivers/intel/fsp2_0/memory_init.c 1 file changed, 2 insertions(+), 3 deletions(-)
Approvals: Julius Werner: Looks good to me, approved build bot (Jenkins): Verified Arthur Heymans: Looks good to me, approved Subrata Banik: Looks good to me, approved Jérémy Compostella: Looks good to me, approved
diff --git a/src/drivers/intel/fsp2_0/memory_init.c b/src/drivers/intel/fsp2_0/memory_init.c index 922bca2..27921c6 100644 --- a/src/drivers/intel/fsp2_0/memory_init.c +++ b/src/drivers/intel/fsp2_0/memory_init.c @@ -178,10 +178,9 @@
if (CONFIG(FSP_USES_CB_STACK) && ENV_RAMINIT && CONFIG(FSP_SPEC_VIOLATION_XEON_SP_HEAP_WORKAROUND)) { - extern char _fspm_heap[]; - extern char _efspm_heap[]; + DECLARE_REGION(fspm_heap); arch_upd->StackBase = (uintptr_t)_fspm_heap; - arch_upd->StackSize = (size_t)(_efspm_heap - _fspm_heap); + arch_upd->StackSize = (size_t)REGION_SIZE(fspm_heap); } else if (CONFIG(FSP_USES_CB_STACK) || !ENV_CACHE_AS_RAM) { arch_upd->StackBase = (uintptr_t)temp_ram; arch_upd->StackSize = sizeof(temp_ram);