Subrata Banik has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/35165 )
Change subject: cpu/intel/car: Skip stack integrity check if FSP_USES_CB_STACK is enable ......................................................................
cpu/intel/car: Skip stack integrity check if FSP_USES_CB_STACK is enable
With FSP2.1 FSP_USES_CB_STACK likely to be enable. Impacted platforms are CML and ICL.
Don't need to run code logic to check the integrity of stack if FSP and coreboot both likely to make use of common stack. Notified by CONFIG_FSP_USES_CB_STACK, its expected to print "Smashed stack detected in romstage!" msg multiple time in that case.
This patch fixes CML/ICL platform printing "Smashed stack detected in romstage!" multiple times. This prints might be misleading.
TEST=Build and boot CML-Hatch
With this CL
No "Smashed stack detected in romstage!" msg in serial log.
Without this CL
"Smashed stack detected in romstage!" 64 times in serial log after FSP-M returns into coreboot.
Change-Id: I943eff1225b976dc4440a6ca6d02ceea378319f8 Signed-off-by: Subrata Banik subrata.banik@intel.com --- M src/cpu/intel/car/romstage.c 1 file changed, 13 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/65/35165/1
diff --git a/src/cpu/intel/car/romstage.c b/src/cpu/intel/car/romstage.c index 547b121..78b2b8d 100644 --- a/src/cpu/intel/car/romstage.c +++ b/src/cpu/intel/car/romstage.c @@ -54,10 +54,19 @@ mainboard_romstage_entry();
/* Check the stack. */ - for (i = 0; i < num_guards; i++) { - if (stack_base[i] == stack_guard) - continue; - printk(BIOS_DEBUG, "Smashed stack detected in romstage!\n"); + /* + * Don't need to run below logic to check the integrity of stack + * if FSP and coreboot both likely to make use of common stack. + * Notified by CONFIG_FSP_USES_CB_STACK, its expected to print + * "Smashed stack detected in romstage!" msg many times in that case. + */ + if (!CONFIG(FSP_USES_CB_STACK)) { + for (i = 0; i < num_guards; i++) { + if (stack_base[i] == stack_guard) + continue; + printk(BIOS_DEBUG, "Smashed stack detected in" + "romstage!\n"); + } }
if (CONFIG(SMM_TSEG))