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 <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/51184 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
		
				
					committed by
					
						
						Patrick Georgi
					
				
			
			
				
	
			
			
			
						parent
						
							1e1d5d60f7
						
					
				
				
					commit
					41b078f8ae
				
			@@ -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;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user