From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.151; helo=mga17.intel.com; envelope-from=mang.guo@intel.com; receiver=edk2-devel@lists.01.org Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 1D394207E5401 for ; Fri, 25 May 2018 03:26:29 -0700 (PDT) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 May 2018 03:26:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,439,1520924400"; d="dat'59?scan'59,208,59";a="53777471" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga003.jf.intel.com with ESMTP; 25 May 2018 03:26:28 -0700 Received: from fmsmsx124.amr.corp.intel.com (10.18.125.39) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 25 May 2018 03:26:28 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx124.amr.corp.intel.com (10.18.125.39) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 25 May 2018 03:26:28 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.210]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.47]) with mapi id 14.03.0319.002; Fri, 25 May 2018 18:26:26 +0800 From: "Guo, Mang" To: "edk2-devel@lists.01.org" CC: "Wei, David" Thread-Topic: [Patch][edk2-platforms/devel-MinnowBoardMax-UDK2017] Capsule Update Thread-Index: AdP0EtVrOni43IkoQIizpJS/u8IawA== Date: Fri, 25 May 2018 10:26:25 +0000 Message-ID: <22D2C85ED001C54AA20BFE3B0E4751D15260FDF8@SHSMSX103.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: <22D2C85ED001C54AA20BFE3B0E4751D15260FDF8@SHSMSX103.ccr.corp.intel.com> x-originating-ip: [10.239.127.40] MIME-Version: 1.0 X-Content-Filtered-By: Mailman/MimeDel 2.1.26 Subject: [Patch][edk2-platforms/devel-MinnowBoardMax-UDK2017] Capsule Update X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 10:26:30 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 1. Fix ESRT issue 2. Add support for Capsule update processing between x64 and IA32 BIOS imag= e Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Guo Mang --- .../Library/PlatformBdsLib/BdsPlatform.c | 7 +++++- Vlv2TbltDevicePkg/PlatformPkg.fdf | 3 ++- Vlv2TbltDevicePkg/PlatformPkgIA32.dsc | 27 ++++++++++++++++++= +++- Vlv2TbltDevicePkg/PlatformPkgX64.dsc | 24 ++++++++++++++++++= + Vlv2TbltDevicePkg/bld_vlv.bat | 2 +- 5 files changed, 59 insertions(+), 4 deletions(-) diff --git a/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.c b/Vlv2T= bltDevicePkg/Library/PlatformBdsLib/BdsPlatform.c index e7aa3b3..847254a 100644 --- a/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.c +++ b/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.c @@ -2031,9 +2031,11 @@ PlatformBdsPolicyBehavior ( // if (EsrtManagement !=3D NULL) { EsrtManagement->SyncEsrtFmp(); - PcdSetBool(PcdEsrtSyncFmp, FALSE); } =20 + DEBUG((DEBUG_INFO, "ProcessCapsules After ConnectAll......\n")); + ProcessCapsules(); + DEBUG((DEBUG_INFO, "ProcessCapsules Done\n")); =20 =20 PlatformBdsLockNonUpdatableFlash (); @@ -2089,6 +2091,9 @@ FULL_CONFIGURATION: TrEEPhysicalPresenceLibProcessRequest(NULL); #endif =20 + if (EsrtManagement !=3D NULL) { + EsrtManagement->SyncEsrtFmp(); + } // // Close boot script and install ready to lock // diff --git a/Vlv2TbltDevicePkg/PlatformPkg.fdf b/Vlv2TbltDevicePkg/Platform= Pkg.fdf index 1942cf5..d651833 100644 --- a/Vlv2TbltDevicePkg/PlatformPkg.fdf +++ b/Vlv2TbltDevicePkg/PlatformPkg.fdf @@ -840,7 +840,8 @@ READ_STATUS =3D TRUE READ_LOCK_CAP =3D TRUE READ_LOCK_STATUS =3D TRUE =20 -INF SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareUpdateD= xe.inf +INF FILE_GUID=3D232393E2-185F-4212-A986-2B01F529EED9 USE=3DIA32 SignedCaps= ulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareUpdateDxe.inf +INF FILE_GUID=3DF1E68873-DA37-4AA0-A12F-F0F8EBA2B24E USE=3DX64 SignedCapsu= lePkg/Universal/SystemFirmwareUpdate/SystemFirmwareUpdateDxe.inf =20 =20 !endif diff --git a/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc b/Vlv2TbltDevicePkg/Plat= formPkgIA32.dsc index cc6f27e..a9a14d3 100644 --- a/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc +++ b/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc @@ -34,7 +34,7 @@ DEFINE PLATFORM_RC_PACKAGE =3D Vlv2DeviceRefCodePkg DEFINE PLATFORM_BINARY_PACKAGE =3D Vlv2BinaryPkg OUTPUT_DIRECTORY =3D Build/$(PLATFORM_PACKAGE) - SUPPORTED_ARCHITECTURES =3D IA32 + SUPPORTED_ARCHITECTURES =3D IA32|X64 BUILD_TARGETS =3D DEBUG|RELEASE SKUID_IDENTIFIER =3D DEFAULT =20 @@ -361,6 +361,18 @@ Tpm2DeviceLib|Vlv2TbltDevicePkg/Library/Tpm2DeviceLibSeCPei/Tpm2DeviceLi= bSeC.inf !endif =20 + + +[LibraryClasses.X64] + HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf + MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAll= ocationLib.inf + !if $(TPM_ENABLED) =3D=3D TRUE + BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf + !endif + + !if $(SECURE_BOOT_ENABLE) =3D=3D TRUE + BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf + !endif [LibraryClasses.IA32] # # DXE phase common @@ -1597,9 +1609,22 @@ MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTo= lerantWriteSmmDxe.inf DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf } =20 +[Components.IA32] + SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareUpdateDxe.= inf { + + FILE_GUID =3D 232393E2-185F-4212-A986-2B01F529EED9 + + FmpAuthenticationLib|SecurityPkg/Library/FmpAuthenticationLibRsa2048= Sha256/FmpAuthenticationLibRsa2048Sha256.inf + DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf + } + +[Components.X64] SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareUpdateDxe.= inf { + + FILE_GUID =3D F1E68873-DA37-4AA0-A12F-F0F8EBA2B24E FmpAuthenticationLib|SecurityPkg/Library/FmpAuthenticationLibRsa2048= Sha256/FmpAuthenticationLibRsa2048Sha256.inf + PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf } =20 diff --git a/Vlv2TbltDevicePkg/PlatformPkgX64.dsc b/Vlv2TbltDevicePkg/Platf= ormPkgX64.dsc index 50f168f..b66f285 100644 --- a/Vlv2TbltDevicePkg/PlatformPkgX64.dsc +++ b/Vlv2TbltDevicePkg/PlatformPkgX64.dsc @@ -361,6 +361,17 @@ Tpm2DeviceLib|Vlv2TbltDevicePkg/Library/Tpm2DeviceLibSeCPei/Tpm2DeviceLi= bSeC.inf !endif =20 +[LibraryClasses.IA32] + HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf + MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAll= ocationLib.inf + !if $(TPM_ENABLED) =3D=3D TRUE + BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf + !endif + + !if $(SECURE_BOOT_ENABLE) =3D=3D TRUE + BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf + !endif + [LibraryClasses.X64] # # DXE phase common @@ -1600,7 +1611,20 @@ MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTo= lerantWriteSmmDxe.inf DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf } =20 +[Components.IA32] + SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareUpdateDxe.= inf { + + FILE_GUID =3D 232393E2-185F-4212-A986-2B01F529EED9 + + FmpAuthenticationLib|SecurityPkg/Library/FmpAuthenticationLibRsa2048= Sha256/FmpAuthenticationLibRsa2048Sha256.inf + DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf + PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf + } + +[Components.X64] SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareUpdateDxe.= inf { + + FILE_GUID =3D F1E68873-DA37-4AA0-A12F-F0F8EBA2B24E FmpAuthenticationLib|SecurityPkg/Library/FmpAuthenticationLibRsa2048= Sha256/FmpAuthenticationLibRsa2048Sha256.inf DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf diff --git a/Vlv2TbltDevicePkg/bld_vlv.bat b/Vlv2TbltDevicePkg/bld_vlv.bat index 1488b0c..501a1ea 100644 --- a/Vlv2TbltDevicePkg/bld_vlv.bat +++ b/Vlv2TbltDevicePkg/bld_vlv.bat @@ -186,7 +186,7 @@ findstr /V "TARGET TARGET_ARCH TOOL_CHAIN_TAG BUILD_= RULE_CONF ACTIVE_PLATFOR =20 echo TARGET =3D %TARGET% >> Conf= \target.txt.tmp if "%Arch%"=3D=3D"IA32" ( - echo TARGET_ARCH =3D IA32 >> Conf= \target.txt.tmp + echo TARGET_ARCH =3D IA32 X64 >> = Conf\target.txt.tmp ) else if "%Arch%"=3D=3D"X64" ( echo TARGET_ARCH =3D IA32 X64 >> Conf= \target.txt.tmp ) --=20 2.10.1.windows.1