From 41b078f8aecd9d01b83ac8ceb646645b8d1c4722 Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Tue, 2 Mar 2021 12:29:16 +0100 Subject: cpu/x86/mp_init.c: Don't overwrite the global variable per CPU Global variables are located in .bss and not on the CPU stack. Overwriting them a per CPU case is bound to cause race conditions. In this case it is even just plainly wrong. Note: This variable is set up in the get_smm_info() function. Change-Id: Iaef26fa996f7e30b6e4c4941683026b8a29a5fd1 Signed-off-by: Arthur Heymans Reviewed-on: https://review.coreboot.org/c/coreboot/+/51184 Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons --- src/cpu/x86/mp_init.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/cpu/x86/mp_init.c b/src/cpu/x86/mp_init.c index 1acb22819a..a545d67537 100644 --- a/src/cpu/x86/mp_init.c +++ b/src/cpu/x86/mp_init.c @@ -732,7 +732,6 @@ static void asmlinkage smm_do_relocation(void *arg) */ #if CONFIG(X86_SMM_LOADER_VERSION2) perm_smbase = smm_get_cpu_smbase(cpu); - mp_state.perm_smbase = perm_smbase; if (!perm_smbase) { printk(BIOS_ERR, "%s: bad SMBASE for CPU %d\n", __func__, cpu); return; -- cgit v1.2.3