From 393992f31dc612b7e07b0ec61d83fc5589726ca1 Mon Sep 17 00:00:00 2001 From: Patrick Rudolph Date: Mon, 11 Jan 2021 09:35:49 +0100 Subject: cpu/mp_init: Fix microcode lock Fix C code to match comment and assembly implementation. Tested on Prodrive hermes: The microcode spinlock is no longer used. Change-Id: I21441299f538783551d4d5ba2b2e7567e152d718 Signed-off-by: Patrick Rudolph Reviewed-on: https://review.coreboot.org/c/coreboot/+/49304 Reviewed-by: Angel Pons Reviewed-by: Arthur Heymans Tested-by: build bot (Jenkins) --- src/cpu/x86/mp_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cpu/x86/mp_init.c b/src/cpu/x86/mp_init.c index 01c1d5fb83..c691c4882b 100644 --- a/src/cpu/x86/mp_init.c +++ b/src/cpu/x86/mp_init.c @@ -344,9 +344,9 @@ static atomic_t *load_sipi_vector(struct mp_params *mp_params) sp->microcode_ptr = (uintptr_t)mp_params->microcode_pointer; /* Pass on ability to load microcode in parallel. */ if (mp_params->parallel_microcode_load) - sp->microcode_lock = 0; - else sp->microcode_lock = ~0; + else + sp->microcode_lock = 0; sp->c_handler = (uintptr_t)&ap_init; ap_count = &sp->ap_count; atomic_set(ap_count, 0); -- cgit v1.2.3