From 1aa5194584df9385f822bbd7fcb7833a6116b84c Mon Sep 17 00:00:00 2001 From: Rocky Phagura Date: Mon, 19 Apr 2021 11:15:35 -0700 Subject: src/cpu/x86/smm: remove debug message; not thread safe This patch removes a call to console_init() and debug print message since the code is not thread safe. This prevents system hangs (soft hangs) while in SMM if user drops in a new SOC with more cores or another socket or as a result of bad configuration. Console is already initialized after the lock has been acquired so this does not affect any other functionality. Tested on DeltaLake mainboard with SMM enabled and 52 CPU threads. Change-Id: I7e8af35d1cde78b327144b6a9da528ae7870e874 Signed-off-by: Rocky Phagura Reviewed-on: https://review.coreboot.org/c/coreboot/+/52518 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber Reviewed-by: Angel Pons --- src/cpu/x86/smm/smm_module_handler.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/cpu/x86/smm') diff --git a/src/cpu/x86/smm/smm_module_handler.c b/src/cpu/x86/smm/smm_module_handler.c index f7cf928f73..0c0de78b21 100644 --- a/src/cpu/x86/smm/smm_module_handler.c +++ b/src/cpu/x86/smm/smm_module_handler.c @@ -132,9 +132,7 @@ asmlinkage void smm_handler_start(void *arg) gnvs = (void *)(uintptr_t)smm_runtime.gnvs_ptr; if (cpu >= CONFIG_MAX_CPUS) { - console_init(); - printk(BIOS_CRIT, - "Invalid CPU number assigned in SMM stub: %d\n", cpu); + /* Do not log messages to console here, it is not thread safe */ return; } -- cgit v1.2.3