[edk2] [Patch][edk2-platforms/devel-MinnowBoardMax-UDK2017] Capsule Update

Guo, Mang posted 1 patch 5 years, 11 months ago
Failed in applying to current master (apply log)
.../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(-)
[edk2] [Patch][edk2-platforms/devel-MinnowBoardMax-UDK2017] Capsule Update
Posted by Guo, Mang 5 years, 11 months ago
1. Fix ESRT issue
2. Add support for Capsule update processing between x64 and IA32 BIOS image

Contributed-under: TianoCore Contribution Agreement 1.1

Signed-off-by: Guo Mang <mang.guo@intel.com>
---
 .../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/Vlv2TbltDevicePkg/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 != NULL) {
       EsrtManagement->SyncEsrtFmp();
-      PcdSetBool(PcdEsrtSyncFmp, FALSE);
     }
 
+    DEBUG((DEBUG_INFO, "ProcessCapsules After ConnectAll......\n"));
+    ProcessCapsules();
+    DEBUG((DEBUG_INFO, "ProcessCapsules Done\n"));
 
 
     PlatformBdsLockNonUpdatableFlash ();
@@ -2089,6 +2091,9 @@ FULL_CONFIGURATION:
     TrEEPhysicalPresenceLibProcessRequest(NULL);
     #endif
 
+    if (EsrtManagement != NULL) {
+      EsrtManagement->SyncEsrtFmp();
+    }
     //
     // Close boot script and install ready to lock
     //
diff --git a/Vlv2TbltDevicePkg/PlatformPkg.fdf b/Vlv2TbltDevicePkg/PlatformPkg.fdf
index 1942cf5..d651833 100644
--- a/Vlv2TbltDevicePkg/PlatformPkg.fdf
+++ b/Vlv2TbltDevicePkg/PlatformPkg.fdf
@@ -840,7 +840,8 @@ READ_STATUS        = TRUE
 READ_LOCK_CAP      = TRUE
 READ_LOCK_STATUS   = TRUE
 
-INF  SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareUpdateDxe.inf
+INF FILE_GUID=232393E2-185F-4212-A986-2B01F529EED9 USE=IA32 SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareUpdateDxe.inf
+INF FILE_GUID=F1E68873-DA37-4AA0-A12F-F0F8EBA2B24E USE=X64 SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareUpdateDxe.inf
 
 
 !endif
diff --git a/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc b/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
index cc6f27e..a9a14d3 100644
--- a/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
+++ b/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
@@ -34,7 +34,7 @@
   DEFINE      PLATFORM_RC_PACKAGE             = Vlv2DeviceRefCodePkg
   DEFINE      PLATFORM_BINARY_PACKAGE         = Vlv2BinaryPkg
   OUTPUT_DIRECTORY                    = Build/$(PLATFORM_PACKAGE)
-  SUPPORTED_ARCHITECTURES             = IA32
+  SUPPORTED_ARCHITECTURES             = IA32|X64
   BUILD_TARGETS                       = DEBUG|RELEASE
   SKUID_IDENTIFIER                    = DEFAULT
 
@@ -361,6 +361,18 @@
   Tpm2DeviceLib|Vlv2TbltDevicePkg/Library/Tpm2DeviceLibSeCPei/Tpm2DeviceLibSeC.inf
 !endif
 
+
+
+[LibraryClasses.X64]
+  HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
+  MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
+  !if $(TPM_ENABLED) == TRUE
+    BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
+  !endif
+
+  !if $(SECURE_BOOT_ENABLE) == TRUE
+    BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
+  !endif
 [LibraryClasses.IA32]
   #
   # DXE phase common
@@ -1597,9 +1609,22 @@ MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmDxe.inf
       DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
   }
 
+[Components.IA32]
+  SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareUpdateDxe.inf {
+    <Defines>
+      FILE_GUID = 232393E2-185F-4212-A986-2B01F529EED9
+    <LibraryClasses>
+      FmpAuthenticationLib|SecurityPkg/Library/FmpAuthenticationLibRsa2048Sha256/FmpAuthenticationLibRsa2048Sha256.inf
+      DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
+  }
+
+[Components.X64]
   SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareUpdateDxe.inf {
+    <Defines>
+      FILE_GUID = F1E68873-DA37-4AA0-A12F-F0F8EBA2B24E
     <LibraryClasses>
       FmpAuthenticationLib|SecurityPkg/Library/FmpAuthenticationLibRsa2048Sha256/FmpAuthenticationLibRsa2048Sha256.inf
+      PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
       DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
   }
 
diff --git a/Vlv2TbltDevicePkg/PlatformPkgX64.dsc b/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
index 50f168f..b66f285 100644
--- a/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
+++ b/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
@@ -361,6 +361,17 @@
   Tpm2DeviceLib|Vlv2TbltDevicePkg/Library/Tpm2DeviceLibSeCPei/Tpm2DeviceLibSeC.inf
 !endif
 
+[LibraryClasses.IA32]
+  HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
+  MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
+  !if $(TPM_ENABLED) == TRUE
+    BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
+  !endif
+
+  !if $(SECURE_BOOT_ENABLE) == TRUE
+    BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
+  !endif
+
 [LibraryClasses.X64]
   #
   # DXE phase common
@@ -1600,7 +1611,20 @@ MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmDxe.inf
       DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
   }
 
+[Components.IA32]
+  SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareUpdateDxe.inf {
+    <Defines>
+      FILE_GUID = 232393E2-185F-4212-A986-2B01F529EED9
+    <LibraryClasses>
+      FmpAuthenticationLib|SecurityPkg/Library/FmpAuthenticationLibRsa2048Sha256/FmpAuthenticationLibRsa2048Sha256.inf
+      DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
+      PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
+  }
+
+[Components.X64]
   SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareUpdateDxe.inf {
+    <Defines>
+      FILE_GUID = F1E68873-DA37-4AA0-A12F-F0F8EBA2B24E
     <LibraryClasses>
       FmpAuthenticationLib|SecurityPkg/Library/FmpAuthenticationLibRsa2048Sha256/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
 
 echo TARGET          = %TARGET%                                  >> Conf\target.txt.tmp
 if "%Arch%"=="IA32" (
-    echo TARGET_ARCH = IA32                                      >> Conf\target.txt.tmp
+    echo TARGET_ARCH = IA32 X64                                      >> Conf\target.txt.tmp
 ) else if "%Arch%"=="X64" (
     echo TARGET_ARCH = IA32 X64                                  >> Conf\target.txt.tmp
 )
-- 
2.10.1.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel