[edk2-devel] [Patch 1/1] UefiCpuPkg: Always load microcode patch on AP processor.
Dong, Eric
eric.dong at intel.com
Tue Jan 7 08:05:29 UTC 2020
Hi Siyuan,
Thanks for your patch.
Reviewed-by: Eric Dong <eric.dong at intel.com>
Thanks,
Eric
> -----Original Message-----
> From: devel at edk2.groups.io [mailto:devel at edk2.groups.io] On Behalf Of
> Siyuan, Fu
> Sent: Friday, January 3, 2020 2:59 PM
> To: devel at edk2.groups.io
> Cc: Dong, Eric <eric.dong at intel.com>; Ni, Ray <ray.ni at intel.com>
> Subject: [edk2-devel] [Patch 1/1] 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.
>
> Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=2431
>
> Cc: Eric Dong <eric.dong at intel.com>
> Cc: Ray Ni <ray.ni at intel.com>
> Signed-off-by: Siyuan Fu <siyuan.fu at intel.com>
> ---
> UefiCpuPkg/Library/MpInitLib/Microcode.c | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/UefiCpuPkg/Library/MpInitLib/Microcode.c
> b/UefiCpuPkg/Library/MpInitLib/Microcode.c
> index 3da5bfb9cf2f..fa6f9681e55a 100644
> --- a/UefiCpuPkg/Library/MpInitLib/Microcode.c
> +++ b/UefiCpuPkg/Library/MpInitLib/Microcode.c
> @@ -1,7 +1,7 @@
> /** @file
> Implementation of loading microcode on processors.
>
> - Copyright (c) 2015 - 2019, Intel Corporation. All rights reserved.<BR>
> + Copyright (c) 2015 - 2020, Intel Corporation. All rights
> + reserved.<BR>
> SPDX-License-Identifier: BSD-2-Clause-Patent
>
> **/
> @@ -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) {
> --
> 2.19.1.windows.1
>
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#52958): https://edk2.groups.io/g/devel/message/52958
Mute This Topic: https://groups.io/mt/69394811/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list