From 396e791059f37062cbee85696e2b4186ec72a9e3 Mon Sep 17 00:00:00 2001 From: "Siyuan, Fu" Date: Fri, 3 Jan 2020 14:59:27 +0800 Subject: [PATCH] UefiCpuPkg: Always load microcode patch on AP processor. This patch updates the microcode loader to always perform a microcode detect and load on both BSP and AP processor. This is to fix a potential microcode revision mismatch issue in below situation: 1. Assume there are two microcode co-exists in flash: one production version and one debug version microcode. 2. FIT loads production microcode to BSP and all AP. 3. UefiCpuPkg loader loads debug microcode to BSP, and skip the loading on AP. As a result, different microcode patches are loaded to BSP and AP, and trigger microcode mismatch error during OS boot. BZ link: https://bugzilla.tianocore.org/show_bug.cgi?id=2431 Cc: Eric Dong Cc: Ray Ni Signed-off-by: Siyuan Fu Reviewed-by: Eric Dong --- UefiCpuPkg/Library/MpInitLib/Microcode.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/UefiCpuPkg/Library/MpInitLib/Microcode.c b/UefiCpuPkg/Library/MpInitLib/Microcode.c index a9d06dd409..8f4d4da40c 100644 --- a/UefiCpuPkg/Library/MpInitLib/Microcode.c +++ b/UefiCpuPkg/Library/MpInitLib/Microcode.c @@ -105,12 +105,6 @@ MicrocodeDetect ( CurrentRevision = GetCurrentMicrocodeSignature (); IsBspCallIn = (ProcessorNumber == (UINTN)CpuMpData->BspNumber) ? TRUE : FALSE; - if (CurrentRevision != 0 && !IsBspCallIn) { - // - // Skip loading microcode if it has been loaded successfully - // - return; - } GetProcessorLocationByApicId (GetInitialApicId (), NULL, NULL, &ThreadId); if (ThreadId != 0) {