From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web12.10172.1597218924381384704 for ; Wed, 12 Aug 2020 00:55:24 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: aaron.li@intel.com) IronPort-SDR: Lj60368CMPtYolZ/Q8VzjRM6P6cx7ykB3CO1lPwzWNddRehL6mkXRa6HwHJXncAyec4Dz3q5kQ LQUz2TBibKvA== X-IronPort-AV: E=McAfee;i="6000,8403,9710"; a="218248442" X-IronPort-AV: E=Sophos;i="5.76,303,1592895600"; d="scan'208";a="218248442" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Aug 2020 00:55:23 -0700 IronPort-SDR: 8PRsR9iCBAsfWuYd/2EdrXYt7dHzeNiz+E0ZcDslCtFBSZswDx+RN9dPIkVPhseRDMQSZ43b68 T5ZtlkjeK5PQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,303,1592895600"; d="scan'208";a="469728472" Received: from sh1gapp1015.ccr.corp.intel.com ([10.239.189.85]) by orsmga005.jf.intel.com with ESMTP; 12 Aug 2020 00:55:22 -0700 From: "Aaron Li" To: devel@edk2.groups.io Cc: Ray Ni , Rangasai V Chaganty , Siyuan Fu Subject: [PATCH v1 1/1] IntelSiliconPkg/ShadowMicrocodePei: Add PCD for shadowing all microcode. Date: Wed, 12 Aug 2020 15:54:52 +0800 Message-Id: <20200812075452.9054-1-aaron.li@intel.com> X-Mailer: git-send-email 2.23.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable This patch is to add a PCD PcdShadowAllMicrocode to support shadowing all microcode patch to memory. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2891 Signed-off-by: Aaron Li Cc: Ray Ni Cc: Rangasai V Chaganty Cc: Siyuan Fu --- Silicon/Intel/IntelSiliconPkg/Feature/ShadowMicrocode/ShadowMicrocodePei.c= | 4 ++++ Silicon/Intel/IntelSiliconPkg/Feature/ShadowMicrocode/ShadowMicrocodePei.i= nf | 3 +++ Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dec = | 7 +++++++ 3 files changed, 14 insertions(+) diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/ShadowMicrocode/ShadowMi= crocodePei.c b/Silicon/Intel/IntelSiliconPkg/Feature/ShadowMicrocode/Shadow= MicrocodePei.c index 8d6574f66794..5c7ee6910c8e 100644 --- a/Silicon/Intel/IntelSiliconPkg/Feature/ShadowMicrocode/ShadowMicrocode= Pei.c +++ b/Silicon/Intel/IntelSiliconPkg/Feature/ShadowMicrocode/ShadowMicrocode= Pei.c @@ -132,6 +132,10 @@ IsMicrocodePatchNeedLoad ( CPU_MICROCODE_EXTENDED_TABLE *ExtendedTable;=0D UINTN Index;=0D =0D + if (FeaturePcdGet (PcdShadowAllMicrocode)) {=0D + return TRUE;=0D + }=0D +=0D //=0D // Check the 'ProcessorSignature' and 'ProcessorFlags' in microcode patc= h header.=0D //=0D diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/ShadowMicrocode/ShadowMi= crocodePei.inf b/Silicon/Intel/IntelSiliconPkg/Feature/ShadowMicrocode/Shad= owMicrocodePei.inf index 019400ab31da..581780add891 100644 --- a/Silicon/Intel/IntelSiliconPkg/Feature/ShadowMicrocode/ShadowMicrocode= Pei.inf +++ b/Silicon/Intel/IntelSiliconPkg/Feature/ShadowMicrocode/ShadowMicrocode= Pei.inf @@ -39,5 +39,8 @@ [Guids] gEdkiiMicrocodeShadowInfoHobGuid=0D gEdkiiMicrocodeStorageTypeFlashGuid=0D =0D +[Pcd]=0D + gIntelSiliconPkgTokenSpaceGuid.PcdShadowAllMicrocode=0D +=0D [Depex]=0D TRUE=0D diff --git a/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dec b/Silicon/In= tel/IntelSiliconPkg/IntelSiliconPkg.dec index e4a7fec3a3ea..3a12fe99fac6 100644 --- a/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dec +++ b/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dec @@ -76,6 +76,13 @@ [Protocols] # Include/Protocol/PlatformDeviceSecurityPolicy.h=0D gEdkiiDeviceSecurityPolicyProtocolGuid =3D {0x7ea41a99, 0x5e32, 0x4c97, = {0x88, 0xc4, 0xd6, 0xe7, 0x46, 0x84, 0x9, 0xd4}}=0D =0D +[PcdsFeatureFlag]=0D + ## Indicates if all microcode update patches shall be shadowed to memory= .=0D + # TRUE - All microcode patches will be shadowed.
=0D + # FALSE - Only the microcode for current present processors will be sh= adowed.
=0D + # @Prompt Shadow all microcode update patches.=0D + gIntelSiliconPkgTokenSpaceGuid.PcdShadowAllMicrocode|FALSE|BOOLEAN|0x000= 00006=0D +=0D [PcdsFixedAtBuild, PcdsPatchableInModule]=0D ## Error code for VTd error.

=0D # EDKII_ERROR_CODE_VTD_ERROR =3D (EFI_IO_BUS_UNSPECIFIED | (EFI_OEM_SPE= CIFIC | 0x00000000)) =3D 0x02008000
=0D --=20 2.23.0.windows.1