From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web12.3019.1578384333563484733 for ; Tue, 07 Jan 2020 00:05:33 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.136, mailfrom: eric.dong@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Jan 2020 00:05:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,404,1571727600"; d="scan'208";a="222489302" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga006.jf.intel.com with ESMTP; 07 Jan 2020 00:05:32 -0800 Received: from fmsmsx151.amr.corp.intel.com (10.18.125.4) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 7 Jan 2020 00:05:32 -0800 Received: from shsmsx106.ccr.corp.intel.com (10.239.4.159) by FMSMSX151.amr.corp.intel.com (10.18.125.4) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 7 Jan 2020 00:05:32 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.202]) by SHSMSX106.ccr.corp.intel.com ([169.254.10.139]) with mapi id 14.03.0439.000; Tue, 7 Jan 2020 16:05:30 +0800 From: "Dong, Eric" To: "devel@edk2.groups.io" , "Fu, Siyuan" CC: "Ni, Ray" Subject: Re: [edk2-devel] [Patch 1/1] UefiCpuPkg: Always load microcode patch on AP processor. Thread-Topic: [edk2-devel] [Patch 1/1] UefiCpuPkg: Always load microcode patch on AP processor. Thread-Index: AQHVwgNgZYDMa0XbbUK+UlLF5ZMYD6fe3Zrg Date: Tue, 7 Jan 2020 08:05:29 +0000 Message-ID: References: <20200103065927.2148-1-siyuan.fu@intel.com> In-Reply-To: <20200103065927.2148-1-siyuan.fu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: eric.dong@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Siyuan, Thanks for your patch. Reviewed-by: Eric Dong Thanks, Eric > -----Original Message----- > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of > Siyuan, Fu > Sent: Friday, January 3, 2020 2:59 PM > To: devel@edk2.groups.io > Cc: Dong, Eric ; Ni, Ray > Subject: [edk2-devel] [Patch 1/1] UefiCpuPkg: Always load microcode patc= h > on AP processor. >=20 > 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 ver= sion > 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. >=20 > Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2431 >=20 > Cc: Eric Dong > Cc: Ray Ni > Signed-off-by: Siyuan Fu > --- > UefiCpuPkg/Library/MpInitLib/Microcode.c | 8 +------- > 1 file changed, 1 insertion(+), 7 deletions(-) >=20 > 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. >=20 > - Copyright (c) 2015 - 2019, Intel Corporation. All rights reserved. > + Copyright (c) 2015 - 2020, Intel Corporation. All rights > + reserved.
> SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > **/ > @@ -105,12 +105,6 @@ MicrocodeDetect ( >=20 > CurrentRevision =3D GetCurrentMicrocodeSignature (); > IsBspCallIn =3D (ProcessorNumber =3D=3D (UINTN)CpuMpData->BspNumb= er) ? > TRUE : FALSE; > - if (CurrentRevision !=3D 0 && !IsBspCallIn) { > - // > - // Skip loading microcode if it has been loaded successfully > - // > - return; > - } >=20 > GetProcessorLocationByApicId (GetInitialApicId (), NULL, NULL, &Threa= dId); > if (ThreadId !=3D 0) { > -- > 2.19.1.windows.1 >=20 >=20 >=20