public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch 0/4] Vlv2TbltDevicePkg: Add FmpDevicePkg support
@ 2018-08-10  1:28 Michael D Kinney
  2018-08-10  1:28 ` [Patch 1/4] Vlv2TbltDevicePkg/Override/Bds: Add test key notification Michael D Kinney
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Michael D Kinney @ 2018-08-10  1:28 UTC (permalink / raw)
  To: edk2-devel; +Cc: David Wei, Mang Guo

Update Vlv2TbltDevicePkg to build UEFI capsules for system firmare and device
firmware using the GenerateCapsule tool and use the FmpDevicePkg to implement
drivers that produce the Firmware Management Protocol to process UEFI capsules.

* Update Vlv2TbltDevicePkg specific BDS to notify when test key is detected.
* Add FmpDeviceLib instance for Minnow Max FLASH update
* Add FmpDeviceLib instance for sample devices
* Add scripts to generate UEFI Capsules for system and device firmware
* Update Vlv2TbltDevicePkg DSC/FDF to use FmpDevicePkg

Cc: David Wei <david.wei@intel.com>
Cc: Mang Guo <mang.guo@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>

Kinney, Michael D (1):
  Vlv2TbltDevicePkg/Override/Bds: Add test key notification

Michael D Kinney (3):
  Vlv2TbltDevicePkg/Feature/Capsule: Add FmpDeviceLib instances
  Vlv2TbltDevicePkg/Capsule: Add scripts to generate capsules
  Vlv2TbltDevicePkg: Update DSC/FDF to use FmpDevicePkg

 .../Capsule/GenerateCapsule/GenCapsuleAll.bat      |  35 ++
 .../GenerateCapsule/GenCapsuleMinnowMax.bat        | 139 +++++
 .../GenerateCapsule/GenCapsuleMinnowMaxRelease.bat | 139 +++++
 .../GenerateCapsule/GenCapsuleSampleColor.bat      | 145 +++++
 ...kenSpaceGuid.PcdFmpDevicePkcs7CertBufferXdr.inc |   1 +
 ...kenSpaceGuid.PcdFmpDevicePkcs7CertBufferXdr.inc |   1 +
 ...kenSpaceGuid.PcdFmpDevicePkcs7CertBufferXdr.inc |   1 +
 .../Capsule/Library/FmpDeviceLib/FmpDeviceLib.c    | 607 +++++++++++++++++++++
 .../Capsule/Library/FmpDeviceLib/FmpDeviceLib.inf  |  63 +++
 .../Library/FmpDeviceLibSample/FmpDeviceLib.c      | 429 +++++++++++++++
 .../Library/FmpDeviceLibSample/FmpDeviceLib.inf    |  51 ++
 Vlv2TbltDevicePkg/FmpBlueSampleDevice.dsc          |  61 +++
 Vlv2TbltDevicePkg/FmpCertificate.dsc               |  28 +
 Vlv2TbltDevicePkg/FmpGreenSampleDevice.dsc         |  61 +++
 Vlv2TbltDevicePkg/FmpMinnowMaxSystem.dsc           |  65 +++
 Vlv2TbltDevicePkg/FmpRedSampleDevice.dsc           |  61 +++
 .../Library/GenericBdsLib/BdsConsole.c             |  11 +
 .../Library/GenericBdsLib/GenericBdsLib.inf        |   1 +
 Vlv2TbltDevicePkg/PlatformCapsule.dsc              |   1 +
 Vlv2TbltDevicePkg/PlatformCapsule.fdf              |  23 -
 Vlv2TbltDevicePkg/PlatformCapsuleGcc.fdf           |  23 -
 Vlv2TbltDevicePkg/PlatformPkg.dec                  |   5 +
 Vlv2TbltDevicePkg/PlatformPkg.fdf                  |  61 +--
 Vlv2TbltDevicePkg/PlatformPkgConfig.dsc            |  19 +-
 Vlv2TbltDevicePkg/PlatformPkgGcc.fdf               |  61 +--
 Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc            |  66 +--
 Vlv2TbltDevicePkg/PlatformPkgIA32.dsc              |  64 +--
 Vlv2TbltDevicePkg/PlatformPkgX64.dsc               |  62 +--
 28 files changed, 2032 insertions(+), 252 deletions(-)
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.bat
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMax.bat
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMaxRelease.bat
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleSampleColor.bat
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/NewRoot.cer.gFmpDevicePkgTokenSpaceGuid.PcdFmpDevicePkcs7CertBufferXdr.inc
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/SAMPLE_DEVELOPMENT.cer.gFmpDevicePkgTokenSpaceGuid.PcdFmpDevicePkcs7CertBufferXdr.inc
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/SAMPLE_DEVELOPMENT_SAMPLE_PRODUCTION.cer.gFmpDevicePkgTokenSpaceGuid.PcdFmpDevicePkcs7CertBufferXdr.inc
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/Library/FmpDeviceLib/FmpDeviceLib.c
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/Library/FmpDeviceLib/FmpDeviceLib.inf
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/Library/FmpDeviceLibSample/FmpDeviceLib.c
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/Library/FmpDeviceLibSample/FmpDeviceLib.inf
 create mode 100644 Vlv2TbltDevicePkg/FmpBlueSampleDevice.dsc
 create mode 100644 Vlv2TbltDevicePkg/FmpCertificate.dsc
 create mode 100644 Vlv2TbltDevicePkg/FmpGreenSampleDevice.dsc
 create mode 100644 Vlv2TbltDevicePkg/FmpMinnowMaxSystem.dsc
 create mode 100644 Vlv2TbltDevicePkg/FmpRedSampleDevice.dsc

-- 
2.14.2.windows.3



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Patch 1/4] Vlv2TbltDevicePkg/Override/Bds: Add test key notification
  2018-08-10  1:28 [Patch 0/4] Vlv2TbltDevicePkg: Add FmpDevicePkg support Michael D Kinney
@ 2018-08-10  1:28 ` Michael D Kinney
  2018-08-10  1:28 ` [Patch 2/4] Vlv2TbltDevicePkg/Feature/Capsule: Add FmpDeviceLib instances Michael D Kinney
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Michael D Kinney @ 2018-08-10  1:28 UTC (permalink / raw)
  To: edk2-devel; +Cc: Kinney, Michael D, David Wei, Mang Guo

From: "Kinney, Michael D" <michael.d.kinney@intel.com>

Cc: David Wei <david.wei@intel.com>
Cc: Mang Guo <mang.guo@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
 .../Library/GenericBdsLib/BdsConsole.c                        | 11 +++++++++++
 .../Library/GenericBdsLib/GenericBdsLib.inf                   |  1 +
 2 files changed, 12 insertions(+)

diff --git a/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c b/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c
index 9c21cfcd59..b8968048f4 100644
--- a/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c
+++ b/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c
@@ -568,6 +568,17 @@ BdsLibConnectAllDefaultConsoles (
           );
   }
 
+  //
+  // If any component set PcdTestKeyUsed to TRUE because use of a test key
+  // was detected, then display a warning message on the debug log and the console
+  //
+  if (PcdGetBool (PcdTestKeyUsed) == TRUE) {
+    DEBUG ((DEBUG_ERROR, "**********************************\n"));
+    DEBUG ((DEBUG_ERROR, "**  WARNING: Test Key is used.  **\n"));
+    DEBUG ((DEBUG_ERROR, "**********************************\n"));
+    Print (L"**  WARNING: Test Key is used.  **\n");
+  }
+
   return EFI_SUCCESS;
 
 }
diff --git a/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf b/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf
index bd93847941..a4a2a9db98 100644
--- a/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf
+++ b/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf
@@ -138,6 +138,7 @@ [Pcd]
   gEfiMdeModulePkgTokenSpaceGuid.PcdProgressCodeOsLoaderStart ## SOMETIMES_CONSUMES
   gEfiMdeModulePkgTokenSpaceGuid.PcdErrorCodeSetVariable      ## CONSUMES
   gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdShellFile      ## CONSUMES
+  gEfiMdeModulePkgTokenSpaceGuid.PcdTestKeyUsed                       ## CONSUMES
 
 #
 # [BootMode] 
-- 
2.14.2.windows.3



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Patch 2/4] Vlv2TbltDevicePkg/Feature/Capsule: Add FmpDeviceLib instances
  2018-08-10  1:28 [Patch 0/4] Vlv2TbltDevicePkg: Add FmpDevicePkg support Michael D Kinney
  2018-08-10  1:28 ` [Patch 1/4] Vlv2TbltDevicePkg/Override/Bds: Add test key notification Michael D Kinney
@ 2018-08-10  1:28 ` Michael D Kinney
  2018-08-10  1:28 ` [Patch 3/4] Vlv2TbltDevicePkg/Capsule: Add scripts to generate capsules Michael D Kinney
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Michael D Kinney @ 2018-08-10  1:28 UTC (permalink / raw)
  To: edk2-devel; +Cc: David Wei, Mang Guo

Cc: David Wei <david.wei@intel.com>
Cc: Mang Guo <mang.guo@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
 .../Capsule/Library/FmpDeviceLib/FmpDeviceLib.c    | 607 +++++++++++++++++++++
 .../Capsule/Library/FmpDeviceLib/FmpDeviceLib.inf  |  63 +++
 .../Library/FmpDeviceLibSample/FmpDeviceLib.c      | 429 +++++++++++++++
 .../Library/FmpDeviceLibSample/FmpDeviceLib.inf    |  51 ++
 4 files changed, 1150 insertions(+)
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/Library/FmpDeviceLib/FmpDeviceLib.c
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/Library/FmpDeviceLib/FmpDeviceLib.inf
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/Library/FmpDeviceLibSample/FmpDeviceLib.c
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/Library/FmpDeviceLibSample/FmpDeviceLib.inf

diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/Library/FmpDeviceLib/FmpDeviceLib.c b/Vlv2TbltDevicePkg/Feature/Capsule/Library/FmpDeviceLib/FmpDeviceLib.c
new file mode 100644
index 0000000000..6725632664
--- /dev/null
+++ b/Vlv2TbltDevicePkg/Feature/Capsule/Library/FmpDeviceLib/FmpDeviceLib.c
@@ -0,0 +1,607 @@
+/**
+
+Copyright (c) 2016, Microsoft Corporation
+
+All rights reserved.
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+1. Redistributions of source code must retain the above copyright notice,
+this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+**/
+
+#include <PiDxe.h>
+
+#include <Library/FmpDeviceLib.h>
+
+#include <Library/DebugLib.h>
+#include <Library/BaseLib.h>
+#include <Library/BaseMemoryLib.h>
+#include <Library/MemoryAllocationLib.h>
+#include <Library/UefiBootServicesTableLib.h>
+
+#include <Library/PlatformFlashAccessLib.h>
+
+//#include <Protocol/FirmwareManagement.h>
+
+//#include <Guid/SystemResourceTable.h>
+
+typedef struct {
+  PLATFORM_FIRMWARE_TYPE          FirmwareType;
+  FLASH_ADDRESS_TYPE              AddressType;
+  EFI_PHYSICAL_ADDRESS            BaseAddress;
+  UINTN                           Length;
+  UINTN                           ImageOffset;
+} UPDATE_CONFIG_DATA;
+
+UPDATE_CONFIG_DATA mUpdateConfigData[] = {
+  { PlatformFirmwareTypeSystemFirmware, FlashAddressTypeRelativeAddress, 0x00000000, 0x00040000, 0x00000000 },
+  { PlatformFirmwareTypeSystemFirmware, FlashAddressTypeRelativeAddress, 0x000C0000, 0x00050000, 0x000C0000 },
+  { PlatformFirmwareTypeSystemFirmware, FlashAddressTypeRelativeAddress, 0x00110000, 0x00210000, 0x00110000 },
+  { PlatformFirmwareTypeSystemFirmware, FlashAddressTypeRelativeAddress, 0x00320000, 0x00070000, 0x00320000 },
+  { PlatformFirmwareTypeSystemFirmware, FlashAddressTypeRelativeAddress, 0x00390000, 0x00070000, 0x00390000 },
+  { PlatformFirmwareTypeNvRam,          FlashAddressTypeRelativeAddress, 0x00040000, 0x00080000, 0x00040000 }
+};
+
+/**
+  Used to pass the FMP install function to this lib.  This allows the library to
+  have control of the handle that the FMP instance is installed on.  This allows
+  the library to use DriverBinding protocol model to locate its device(s) in the
+  system.
+
+  @param[in] Func  Function pointer to FMP install function.
+
+  @retval EFI_SUCCESS       Library has saved function pointer and will call
+                            function pointer on each DriverBinding Start.
+  @retval EFI_UNSUPPORTED   Library doesn't use driver binding and only supports
+                            a single instance.
+  @retval other error       Error occurred.  Don't install FMP
+
+**/
+EFI_STATUS
+EFIAPI
+RegisterFmpInstaller (
+  IN FMP_DEVICE_LIB_REGISTER_FMP_INSTALLER Func
+  )
+{
+  //
+  // This is a system firmware update that does not use Driver Binding Protocol
+  //
+  return EFI_UNSUPPORTED;
+}
+
+
+/**
+  Returns the size, in bytes, of the firmware image currently stored in the
+  firmware device.  This function is used to by the GetImage() and
+  GetImageInfo() services of the Firmware Management Protocol.  If the image
+  size can not be determined from the firmware device, then 0 must be returned.
+
+  @param[out] Size  Pointer to the size, in bytes, of the firmware image
+                    currently stored in the firmware device.
+
+  @retval EFI_SUCCESS            The size of the firmware image currently
+                                 stored in the firmware device was returned.
+  @retval EFI_INVALID_PARAMETER  Size is NULL.
+  @retval EFI_UNSUPPORTED        The firmware device does not support reporting
+                                 the size of the currently stored firmware image.
+  @retval EFI_DEVICE_ERROR       An error occured attempting to determine the
+                                 size of the firmware image currently stored in
+                                 in the firmware device.
+
+**/
+EFI_STATUS
+EFIAPI
+FmpDeviceGetSize (
+  IN UINTN  *Size
+  )
+{
+  if (Size == NULL) {
+    return EFI_INVALID_PARAMETER;
+  }
+  *Size = PcdGet32 (PcdBiosRomBase);
+  return EFI_SUCCESS;
+}
+
+/**
+  Used to return a library supplied guid that will be the ImageTypeId guid of
+  the FMP descriptor.  This is optional but can be used if at runtime the guid
+  needs to be determined.
+
+  @param[out] Guid  Double Guid Ptr that will be updated to point to guid.
+                    This should be from static memory and will not be freed.
+
+  @return EFI_UNSUPPORTED  Library instance doesn't need dynamic guid.
+  @return Error            Any error will cause the wrapper to use the GUID
+                           defined by PCD.
+  @return EFI_SUCCESS      Guid ptr should be updated to point to static memeory
+                           which contains a valid guid.
+
+**/
+EFI_STATUS
+EFIAPI
+FmpDeviceGetImageTypeIdGuidPtr (
+  OUT EFI_GUID  **Guid
+  )
+{
+  return EFI_UNSUPPORTED;
+}
+
+/**
+  Returns values used to fill in the AttributesSupported and AttributesSettings
+  fields of the EFI_FIRMWARE_IMAGE_DESCRIPTOR structure that is returned by the
+  GetImageInfo() service of the Firmware Management Protocol.  The following
+  bit values from the Firmware Management Protocol may be combined:
+    IMAGE_ATTRIBUTE_IMAGE_UPDATABLE
+    IMAGE_ATTRIBUTE_RESET_REQUIRED
+    IMAGE_ATTRIBUTE_AUTHENTICATION_REQUIRED
+    IMAGE_ATTRIBUTE_IN_USE
+    IMAGE_ATTRIBUTE_UEFI_IMAGE
+
+  @param[out] Supported  Attributes supported by this firmware device.
+  @param[out] Setting    Attributes settings for this firmware device.
+
+  @retval EFI_SUCCESS            The attributes supported by the firmware
+                                 device were returned.
+  @retval EFI_INVALID_PARAMETER  Supported is NULL.
+  @retval EFI_INVALID_PARAMETER  Setting is NULL.
+
+**/
+EFI_STATUS
+EFIAPI
+FmpDeviceGetAttributes (
+  IN OUT UINT64  *Supported,
+  IN OUT UINT64  *Setting
+  )
+{
+  if (Supported == NULL || Setting == NULL) {
+    return EFI_INVALID_PARAMETER;
+  }
+  *Supported = (IMAGE_ATTRIBUTE_IMAGE_UPDATABLE         |
+                IMAGE_ATTRIBUTE_RESET_REQUIRED          |
+                IMAGE_ATTRIBUTE_AUTHENTICATION_REQUIRED |
+                IMAGE_ATTRIBUTE_IN_USE
+                );
+  *Setting   = (IMAGE_ATTRIBUTE_IMAGE_UPDATABLE         |
+                IMAGE_ATTRIBUTE_RESET_REQUIRED          |
+                IMAGE_ATTRIBUTE_AUTHENTICATION_REQUIRED |
+                IMAGE_ATTRIBUTE_IN_USE
+                );
+  return EFI_SUCCESS;
+}
+
+/**
+  Gets the current Lowest Supported Version.
+
+  This is a protection mechanism so that a previous version with known issue is
+  not applied.  ONLY implement this if your running firmware has a method to
+  return this at runtime.  If EFI_UNSUPPORTED is returned, then the Lowest
+  Supported Version is stored in a UEFI Variable.
+
+  @param[out] Version  On return this value represents the current Lowest
+                       Supported Version (in same format as GetVersion).
+
+  @retval EFI_SUCCESS       The Lowest Supported Version was correctly retrieved
+  @retval EFI_UNSUPPORTED   Device firmware doesn't support reporting LSV
+  @retval EFI_DEVICE_ERROR  Error occurred when trying to get the LSV
+**/
+EFI_STATUS
+EFIAPI
+FmpDeviceGetLowestSupportedVersion (
+  IN OUT UINT32  *LowestSupportedVersion
+  )
+{
+  //
+  // Retrieve the lowest support version from a PCD
+  // NOTE: This method of using a PCD can only be used for the system firmware
+  //       FMP instance that is updated every time the system firmware is
+  //       updated.  If system firmware updates support partial updates that
+  //       would not include the system firmware FMP instance, then a PCD can
+  //       not be used and the value must come from the currently running system
+  //       firmware image.
+  //
+  *LowestSupportedVersion = PcdGet32 (PcdSystemFirmwareFmpLowestSupportedVersion);
+  return EFI_SUCCESS;
+}
+
+
+/**
+  Returns the Null-terminated Unicode string that is used to fill in the
+  VersionName field of the EFI_FIRMWARE_IMAGE_DESCRIPTOR structure that is
+  returned by the GetImageInfo() service of the Firmware Management Protocol.
+  The returned string must be allocated using EFI_BOOT_SERVICES.AllocatePool().
+
+  @note It is recommended that all firmware devices support a method to report
+        the VersionName string from the currently stored firmware image.
+
+  @param[out] VersionString  The version string retrieved from the currently
+                             stored firmware image.
+
+  @retval EFI_SUCCESS            The version string of currently stored
+                                 firmware image was returned in Version.
+  @retval EFI_INVALID_PARAMETER  VersionString is NULL.
+  @retval EFI_UNSUPPORTED        The firmware device does not support a method
+                                 to report the version string of the currently
+                                 stored firmware image.
+  @retval EFI_DEVICE_ERROR       An error occurred attempting to retrieve the
+                                 version string of the currently stored
+                                 firmware image.
+  @retval EFI_OUT_OF_RESOURCES   There are not enough resources to allocate the
+                                 buffer for the version string of the currently
+                                 stored firmware image.
+
+**/
+EFI_STATUS
+EFIAPI
+FmpDeviceGetVersionString (
+  OUT CHAR16  **VersionString
+  )
+{
+  if (VersionString == NULL) {
+    return EFI_INVALID_PARAMETER;
+  }
+
+  //
+  // Retrieve the version string from a PCD
+  // NOTE: This method of using a PCD can only be used for the system firmware
+  //       FMP instance that is updated every time the system firmware is
+  //       updated.  If system firmware updates support partial updates that
+  //       would not include the system firmware FMP instance, then a PCD can
+  //       not be used and the value must come from the currently running system
+  //       firmware image.
+  //
+  *VersionString = (CHAR16 *)AllocateCopyPool (
+                               PcdGetSize (PcdSystemFirmwareFmpVersionString),
+                               PcdGetPtr (PcdSystemFirmwareFmpVersionString)
+                               );
+  if (*VersionString == NULL) {
+    return EFI_OUT_OF_RESOURCES;
+  }
+  return EFI_SUCCESS;
+}
+
+/**
+  Gets the current running version.
+
+  ONLY implement this if your running firmware has a method to return this at
+  runtime.
+
+  @param[out] Version  On return this value represents the current running
+                       version.
+
+  @retval EFI_SUCCESS       The version was correctly retrieved.
+  @retval EFI_UNSUPPORTED   Device firmware doesn't support reporting current
+                            version.
+  @retval EFI_DEVICE_ERROR  Error occurred when trying to get the version.
+**/
+EFI_STATUS
+EFIAPI
+FmpDeviceGetVersion (
+  IN OUT UINT32  *Version
+  )
+{
+  //
+  // Retrieve the version string from a PCD
+  // NOTE: This method of using a PCD can only be used for the system firmware
+  //       FMP instance that is updated every time the system firmware is
+  //       updated.  If system firmware updates support partial updates that
+  //       would not include the system firmware FMP instance, then a PCD can
+  //       not be used and the value must come from the currently running system
+  //       firmware image.
+  //
+  *Version = PcdGet32 (PcdSystemFirmwareFmpVersion);
+  return EFI_SUCCESS;
+}
+
+
+/**
+  Retrieves a copy of the current firmware image of the device.
+
+  This function allows a copy of the current firmware image to be created and
+  saved.  The saved copy could later been used, for example, in firmware image
+  recovery or rollback.
+
+  @param[out] Image      Points to the buffer where the current image is copied
+                         to.
+  @param[out] ImageSize  On entry, points to the size of the buffer pointed to
+                         by Image, in bytes.  On return, points to the length of
+                         the image, in bytes.
+
+  @retval EFI_SUCCESS            The image was successfully read from the device.
+  @retval EFI_BUFFER_TOO_SMALL   The buffer specified by ImageSize is too small
+                                 to hold the image. The current buffer size
+                                 needed to hold the image is returned in
+                                 ImageSize.
+  @retval EFI_INVALID_PARAMETER  The Image was NULL.
+  @retval EFI_NOT_FOUND          The current image is not copied to the buffer.
+  @retval EFI_UNSUPPORTED        The operation is not supported.
+
+**/
+EFI_STATUS
+EFIAPI
+FmpDeviceGetImage (
+  IN OUT VOID   *Image,
+  IN OUT UINTN  *ImageSize
+  )
+{
+  //
+  // Check for invalid p;arameters
+  //
+  if (Image == NULL || ImageSize == NULL) {
+    return EFI_INVALID_PARAMETER;
+  }
+
+  //
+  // Make sure the buffer is big enough to hold the device image
+  //
+  if (*ImageSize < PcdGet32 (PcdBiosRomSize)) {
+    *ImageSize = PcdGet32 (PcdBiosRomSize);
+    return EFI_BUFFER_TOO_SMALL;
+  }
+
+  //
+  // Copy the device image to the buffer
+  //
+  *ImageSize = PcdGet32 (PcdBiosRomSize);
+  CopyMem (
+    Image,
+    (VOID *)(UINTN)PcdGet32 (PcdBiosRomBase),
+    *ImageSize
+    );
+
+  return EFI_SUCCESS;
+}
+
+/**
+  Updates the firmware image of the device.
+
+  This function updates the hardware with the new firmware image.  This function
+  returns EFI_UNSUPPORTED if the firmware image is not updatable.  If the
+  firmware image is updatable, the function should perform the following minimal
+  validations before proceeding to do the firmware image update.
+    - Validate the image is a supported image for this device.  The function
+      returns EFI_ABORTED if the image is unsupported.  The function can
+      optionally provide more detailed information on why the image is not a
+      supported image.
+    - Validate the data from VendorCode if not null.  Image validation must be
+      performed before VendorCode data validation.  VendorCode data is ignored
+      or considered invalid if image validation failed.  The function returns
+      EFI_ABORTED if the data is invalid.
+
+  VendorCode enables vendor to implement vendor-specific firmware image update
+  policy.  Null if the caller did not specify the policy or use the default
+  policy.  As an example, vendor can implement a policy to allow an option to
+  force a firmware image update when the abort reason is due to the new firmware
+  image version is older than the current firmware image version or bad image
+  checksum.  Sensitive operations such as those wiping the entire firmware image
+  and render the device to be non-functional should be encoded in the image
+  itself rather than passed with the VendorCode.  AbortReason enables vendor to
+  have the option to provide a more detailed description of the abort reason to
+  the caller.
+
+  @param[in]  Image             Points to the new image.
+  @param[in]  ImageSize         Size of the new image in bytes.
+  @param[in]  VendorCode        This enables vendor to implement vendor-specific
+                                firmware image update policy. Null indicates the
+                                caller did not specify the policy or use the
+                                default policy.
+  @param[in]  Progress          A function used by the driver to report the
+                                progress of the firmware update.
+  @param[in]  CapsuleFwVersion  FMP Payload Header version of the image.
+  @param[out] AbortReason       A pointer to a pointer to a null-terminated
+                                string providing more details for the aborted
+                                operation. The buffer is allocated by this
+                                function with AllocatePool(), and it is the
+                                caller's responsibility to free it with a call
+                                to FreePool().
+
+  @retval EFI_SUCCESS            The device was successfully updated with the
+                                 new image.
+  @retval EFI_ABORTED            The operation is aborted.
+  @retval EFI_INVALID_PARAMETER  The Image was NULL.
+  @retval EFI_UNSUPPORTED        The operation is not supported.
+
+**/
+EFI_STATUS
+EFIAPI
+FmpDeviceSetImage (
+  IN  CONST VOID                                     *Image,
+  IN  UINTN                                          ImageSize,
+  IN  CONST VOID                                     *VendorCode,
+  IN  EFI_FIRMWARE_MANAGEMENT_UPDATE_IMAGE_PROGRESS  Progress,
+  IN  UINT32                                         CapsuleFwVersion,
+  OUT CHAR16                                         **AbortReason
+  )
+{
+  EFI_STATUS          Status;
+  UINT32              Updateable;
+  UINTN               Percentage;
+  UINTN               Index;
+  UPDATE_CONFIG_DATA  *ConfigData;
+  UINTN               TotalSize;
+  UINTN               BytesWritten;
+
+  Updateable = 0;
+  Status = FmpDeviceCheckImage (Image, ImageSize, &Updateable);
+  if (EFI_ERROR (Status)) {
+    DEBUG((DEBUG_ERROR, "FmpDeviceSetImage - Check Image failed with %r.\n", Status));
+    return Status;
+  }
+
+  if (Updateable != IMAGE_UPDATABLE_VALID) {
+    DEBUG((DEBUG_ERROR, "FmpDeviceSetImage - Check Image returned that the Image was not valid for update.  Updatable value = 0x%X.\n", Updateable));
+    return EFI_ABORTED;
+  }
+
+  if (Progress == NULL) {
+    DEBUG((DEBUG_ERROR, "FmpDeviceSetImage - Invalid progress callback\n"));
+    return EFI_INVALID_PARAMETER;
+  }
+
+  Status = Progress (15);
+  if (EFI_ERROR (Status)) {
+    DEBUG((DEBUG_ERROR, "FmpDeviceSetImage - Progress Callback failed with Status %r.\n", Status));
+  }
+
+  //
+  // Write the image to the firmware device
+  //
+  Progress (20);
+  if (EFI_ERROR (Status)) {
+    DEBUG((DEBUG_ERROR, "FmpDeviceSetImage - Progress Callback failed with Status %r.\n", Status));
+  }
+
+  //
+  // Simulate update with delays between progress updates
+  //
+  for (Percentage = 20; Percentage <= 100; Percentage++) {
+    //
+    // Wait 0.05 seconds
+    //
+//    gBS->Stall (50000);
+
+//    Progress (Percentage);
+//    if (EFI_ERROR (Status)) {
+//      DEBUG((DEBUG_ERROR, "FmpDeviceSetImage - Progress Callback failed with Status %r.\n", Status));
+//    }
+  }
+
+  DEBUG ((DEBUG_INFO, "FmpDeviceSetImage - %d Images ...\n", ARRAY_SIZE (mUpdateConfigData)));
+
+  if (ARRAY_SIZE (mUpdateConfigData) == 0) {
+    DEBUG((DEBUG_INFO, "PlatformUpdate: BaseAddress - 0x%lx ImageOffset - 0x%x Length - 0x%x\n", 0, 0, ImageSize));
+    Status = PerformFlashWriteWithProgress (
+               PlatformFirmwareTypeSystemFirmware,  // FirmwareType
+               0x00000000,                          // FlashAddress
+               FlashAddressTypeRelativeAddress,     // FlashAddressType
+               (VOID *)(UINTN)Image,                // Buffer
+               ImageSize,                           // BufferLength
+               Progress,                            // Progress
+               20,                                  // StartPercentage
+               100                                  // EndPercentage
+               );
+  }
+
+
+  //
+  // Compute total size of update
+  //
+  for (Index = 0, TotalSize = 0; Index < ARRAY_SIZE (mUpdateConfigData); Index++) {
+    TotalSize += mUpdateConfigData[Index].Length;
+  }
+
+  BytesWritten = 0;
+  for (Index = 0, ConfigData = mUpdateConfigData; Index < ARRAY_SIZE (mUpdateConfigData); Index++, ConfigData++) {
+    DEBUG((DEBUG_INFO, "PlatformUpdate(%d): BaseAddress - 0x%lx ImageOffset - 0x%x Length - 0x%x\n",
+      Index,
+      ConfigData->BaseAddress,
+      ConfigData->ImageOffset,
+      ConfigData->Length
+      ));
+    Status = PerformFlashWriteWithProgress (
+               ConfigData->FirmwareType,                                     // FirmwareType
+               ConfigData->BaseAddress,                                      // FlashAddress
+               ConfigData->AddressType,                                      // FlashAddressType
+               (VOID *)((UINTN)Image + (UINTN)ConfigData->ImageOffset),      // Buffer
+               ConfigData->Length,                                           // BufferLength
+               Progress,                                                     // Progress
+               20 + (BytesWritten * 80) / TotalSize,                         // StartPercentage
+               20 + ((BytesWritten + ConfigData->Length) * 80) / TotalSize   // EndPercentage
+               );
+    if (EFI_ERROR(Status)) {
+      break;
+    }
+    BytesWritten += ConfigData->Length;
+  }
+
+  DEBUG ((DEBUG_INFO, "FmpDeviceSetImage - %r\n", Status));
+
+  return Status;
+}
+
+/**
+Checks if the firmware image is valid for the device.
+
+This function allows firmware update application to validate the firmware image without
+invoking the SetImage() first.
+
+@param[in]  Image              Points to the new image.
+@param[in]  ImageSize          Size of the new image in bytes.
+@param[out] ImageUpdatable     Indicates if the new image is valid for update. It also provides,
+if available, additional information if the image is invalid.
+
+@retval EFI_SUCCESS            The image was successfully checked.
+@retval EFI_INVALID_PARAMETER  The Image was NULL.
+
+**/
+EFI_STATUS
+EFIAPI
+FmpDeviceCheckImage (
+  IN  CONST VOID  *Image,
+  IN  UINTN       ImageSize,
+  OUT UINT32      *ImageUpdateable
+  )
+{
+  if (ImageUpdateable == NULL) {
+    DEBUG((DEBUG_ERROR, "CheckImage - ImageUpdateable Pointer Parameter is NULL.\n"));
+    return EFI_INVALID_PARAMETER;
+  }
+
+  //
+  //Set to valid and then if any tests fail it will update this flag.
+  //
+  *ImageUpdateable = IMAGE_UPDATABLE_VALID;
+
+  if (Image == NULL) {
+    DEBUG((DEBUG_ERROR, "CheckImage - Image Pointer Parameter is NULL.\n"));
+    //
+    // Not sure if this is needed
+    //
+    *ImageUpdateable = IMAGE_UPDATABLE_INVALID;
+    return EFI_INVALID_PARAMETER;
+  }
+
+  //
+  // Make sure the image size is correct
+  //
+  if (ImageSize != PcdGet32 (PcdBiosRomSize)) {
+    *ImageUpdateable = IMAGE_UPDATABLE_INVALID;
+    return EFI_INVALID_PARAMETER;
+  }
+
+  return EFI_SUCCESS;
+}
+
+/**
+  Device firmware should trigger lock mechanism so that device fw can not be
+  updated or tampered with. This lock mechanism is generally only cleared by a
+  full system reset (not just sleep state/low power mode)
+
+  @retval EFI_SUCCESS           The device was successfully locked.
+  @retval EFI_UNSUPPORTED       The hardware device/firmware doesn't support locking
+
+**/
+EFI_STATUS
+EFIAPI
+FmpDeviceLock (
+  VOID
+  )
+{
+  DEBUG ((DEBUG_INFO, "VLV2: FmpDeviceLock() for system FLASH\n"));
+  // TODO: Add lock logic
+  return EFI_UNSUPPORTED;
+}
diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/Library/FmpDeviceLib/FmpDeviceLib.inf b/Vlv2TbltDevicePkg/Feature/Capsule/Library/FmpDeviceLib/FmpDeviceLib.inf
new file mode 100644
index 0000000000..af4eabf0ad
--- /dev/null
+++ b/Vlv2TbltDevicePkg/Feature/Capsule/Library/FmpDeviceLib/FmpDeviceLib.inf
@@ -0,0 +1,63 @@
+##
+# Copyright (c) 2016, Microsoft Corporation
+
+# All rights reserved.
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# 1. Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+##
+
+
+[Defines]
+  INF_VERSION                    = 0x00010005
+  BASE_NAME                      = Vlv2FmpDeviceLib
+  FILE_GUID                      = 83723F51-39B5-4D99-A974-90132AB55F83
+  MODULE_TYPE                    = DXE_DRIVER
+  VERSION_STRING                 = 1.0
+  LIBRARY_CLASS                  = FmpDeviceLib|DXE_DRIVER
+
+#
+# The following information is for reference only and not required by the build tools.
+#
+#  VALID_ARCHITECTURES           = IA32 X64
+#
+
+[Sources]
+  FmpDeviceLib.c
+
+[Packages]
+  MdePkg/MdePkg.dec
+  FmpDevicePkg/FmpDevicePkg.dec
+  SignedCapsulePkg/SignedCapsulePkg.dec
+  Vlv2TbltDevicePkg/PlatformPkg.dec
+
+[LibraryClasses]
+  DebugLib
+  BaseLib
+  BaseMemoryLib
+  MemoryAllocationLib
+  UefiBootServicesTableLib
+  PlatformFlashAccessLib
+
+[Pcd]
+  gPlatformModuleTokenSpaceGuid.PcdBiosRomBase
+  gPlatformModuleTokenSpaceGuid.PcdBiosRomSize
+  gPlatformModuleTokenSpaceGuid.PcdSystemFirmwareFmpLowestSupportedVersion
+  gPlatformModuleTokenSpaceGuid.PcdSystemFirmwareFmpVersion
+  gPlatformModuleTokenSpaceGuid.PcdSystemFirmwareFmpVersionString
+
diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/Library/FmpDeviceLibSample/FmpDeviceLib.c b/Vlv2TbltDevicePkg/Feature/Capsule/Library/FmpDeviceLibSample/FmpDeviceLib.c
new file mode 100644
index 0000000000..19a152bfc5
--- /dev/null
+++ b/Vlv2TbltDevicePkg/Feature/Capsule/Library/FmpDeviceLibSample/FmpDeviceLib.c
@@ -0,0 +1,429 @@
+/**
+
+Copyright (c) 2016, Microsoft Corporation
+
+All rights reserved.
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+1. Redistributions of source code must retain the above copyright notice,
+this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+**/
+
+
+#include <PiDxe.h>
+#include <Library/DebugLib.h>
+#include <Protocol/FirmwareManagement.h>
+#include <Library/BaseLib.h>
+#include <Library/MemoryAllocationLib.h>
+#include <Library/BaseMemoryLib.h>
+#include <Library/FmpDeviceLib.h>
+#include <Library/UefiBootServicesTableLib.h>
+
+/**
+  Used to pass the FMP install function to this lib.
+  This allows the library to have control of the handle
+  that the FMP instance is installed on.  This allows the library
+  to use DriverBinding protocol model to locate its device(s) in the
+  system.
+
+  @param[in]  Function pointer to FMP install function.
+
+  @retval EFI_SUCCESS      Library has saved function pointer and will call function pointer on each DriverBinding Start.
+  @retval EFI_UNSUPPORTED  Library doesn't use driver binding and only supports a single instance.
+  @retval other error      Error occurred.  Don't install FMP
+
+**/
+EFI_STATUS
+EFIAPI
+RegisterFmpInstaller(
+IN FMP_DEVICE_LIB_REGISTER_FMP_INSTALLER Func
+)
+{
+  // Because this is a sample lib with very simple fake device we don't use
+  // the driverbinding protocol to locate our device.
+  //
+  return EFI_UNSUPPORTED;
+}
+
+
+/**
+Used to get the size of the image in bytes.
+NOTE - Do not return zero as that will identify the device as
+not updatable.
+
+@retval UINTN that represents the size of the firmware.
+
+**/
+EFI_STATUS
+EFIAPI
+FmpDeviceGetSize (
+  IN UINTN  *Size
+  )
+{
+  if (Size == NULL) {
+    return EFI_INVALID_PARAMETER;
+  }
+  *Size = 0x1000;
+  return EFI_SUCCESS;
+}
+
+/**
+Used to return a library supplied guid that will be the ImageTypeId guid of the FMP descriptor.
+This is optional but can be used if at runtime the guid needs to be determined.
+
+@param  Guid:  Double Guid Ptr that will be updated to point to guid.  This should be from static memory
+and will not be freed.
+@return EFI_UNSUPPORTED: if you library instance doesn't need dynamic guid return this.
+@return Error: Any error will cause the wrapper to use the GUID defined by PCD
+@return EFI_SUCCESS:  Guid ptr should be updated to point to static memeory which contains a valid guid
+**/
+EFI_STATUS
+EFIAPI
+FmpDeviceGetImageTypeIdGuidPtr(
+  OUT EFI_GUID** Guid)
+{
+  //this instance doesn't need dynamic guid detection.
+  return EFI_UNSUPPORTED;
+}
+
+/**
+  Returns values used to fill in the AttributesSupported and AttributesSettings
+  fields of the EFI_FIRMWARE_IMAGE_DESCRIPTOR structure that is returned by the
+  GetImageInfo() service of the Firmware Management Protocol.  The following
+  bit values from the Firmware Management Protocol may be combined:
+    IMAGE_ATTRIBUTE_IMAGE_UPDATABLE
+    IMAGE_ATTRIBUTE_RESET_REQUIRED
+    IMAGE_ATTRIBUTE_AUTHENTICATION_REQUIRED
+    IMAGE_ATTRIBUTE_IN_USE
+    IMAGE_ATTRIBUTE_UEFI_IMAGE
+
+  @param[out] Supported  Attributes supported by this firmware device.
+  @param[out] Setting    Attributes settings for this firmware device.
+
+  @retval EFI_SUCCESS            The attributes supported by the firmware
+                                 device were returned.
+  @retval EFI_INVALID_PARAMETER  Supported is NULL.
+  @retval EFI_INVALID_PARAMETER  Setting is NULL.
+
+**/
+EFI_STATUS
+EFIAPI
+FmpDeviceGetAttributes (
+  IN OUT UINT64  *Supported,
+  IN OUT UINT64  *Setting
+  )
+{
+  if (Supported == NULL || Setting == NULL) {
+    return EFI_INVALID_PARAMETER;
+  }
+  *Supported = (IMAGE_ATTRIBUTE_IMAGE_UPDATABLE | IMAGE_ATTRIBUTE_IN_USE);
+  *Setting   = (IMAGE_ATTRIBUTE_IMAGE_UPDATABLE | IMAGE_ATTRIBUTE_IN_USE);
+  return EFI_SUCCESS;
+}
+
+/**
+Gets the current Lowest Supported Version.
+This is a protection mechanism so that a previous version with known issue is not
+applied.
+
+ONLY implement this if your running firmware has a method to return this at runtime.
+
+@param[out] Version           On return this value represents the
+current Lowest Supported Version (in same format as GetVersion).
+
+@retval EFI_SUCCESS           The Lowest Supported Version was correctly retrieved
+@retval EFI_UNSUPPORTED       Device firmware doesn't support reporting LSV
+@retval EFI_DEVICE_ERROR      Error occurred when trying to get the LSV
+**/
+EFI_STATUS
+EFIAPI
+FmpDeviceGetLowestSupportedVersion (
+  IN OUT UINT32* LowestSupportedVersion
+  )
+{
+  return EFI_UNSUPPORTED;
+}
+
+
+/**
+  Returns the Null-terminated Unicode string that is used to fill in the
+  VersionName field of the EFI_FIRMWARE_IMAGE_DESCRIPTOR structure that is
+  returned by the GetImageInfo() service of the Firmware Management Protocol.
+  The returned string must be allocated using EFI_BOOT_SERVICES.AllocatePool().
+
+  @note It is recommended that all firmware devices support a method to report
+        the VersionName string from the currently stored firmware image.
+
+  @param[out] VersionString  The version string retrieved from the currently
+                             stored firmware image.
+
+  @retval EFI_SUCCESS            The version string of currently stored
+                                 firmware image was returned in Version.
+  @retval EFI_INVALID_PARAMETER  VersionString is NULL.
+  @retval EFI_UNSUPPORTED        The firmware device does not support a method
+                                 to report the version string of the currently
+                                 stored firmware image.
+  @retval EFI_DEVICE_ERROR       An error occurred attempting to retrieve the
+                                 version string of the currently stored
+                                 firmware image.
+  @retval EFI_OUT_OF_RESOURCES   There are not enough resources to allocate the
+                                 buffer for the version string of the currently
+                                 stored firmware image.
+
+**/
+EFI_STATUS
+EFIAPI
+FmpDeviceGetVersionString (
+  OUT CHAR16  **VersionString
+  )
+{
+  if (VersionString == NULL) {
+    return EFI_INVALID_PARAMETER;
+  }
+  *VersionString = NULL;
+  return EFI_UNSUPPORTED;
+}
+
+/**
+Gets the current running version.
+ONLY implement this if your running firmware has a method to return this at runtime.
+
+@param[out] Version           On return this value represents the current running version
+
+@retval EFI_SUCCESS           The version was correctly retrieved
+@retval EFI_UNSUPPORTED       Device firmware doesn't support reporting current version
+@retval EFI_DEVICE_ERROR      Error occurred when trying to get the version
+**/
+EFI_STATUS
+EFIAPI
+FmpDeviceGetVersion(
+IN OUT UINT32* Version
+)
+{
+  return EFI_UNSUPPORTED;
+}
+
+
+/**
+Retrieves a copy of the current firmware image of the device.
+
+This function allows a copy of the current firmware image to be created and saved.
+The saved copy could later been used, for example, in firmware image recovery or rollback.
+
+@param[out] Image              Points to the buffer where the current image is copied to.
+@param[out] ImageSize          On entry, points to the size of the buffer pointed to by Image, in bytes.
+On return, points to the length of the image, in bytes.
+
+@retval EFI_SUCCESS            The device was successfully updated with the new image.
+@retval EFI_BUFFER_TOO_SMALL   The buffer specified by ImageSize is too small to hold the
+image. The current buffer size needed to hold the image is returned
+in ImageSize.
+@retval EFI_INVALID_PARAMETER  The Image was NULL.
+@retval EFI_NOT_FOUND          The current image is not copied to the buffer.
+@retval EFI_UNSUPPORTED        The operation is not supported.
+
+**/
+EFI_STATUS
+EFIAPI
+FmpDeviceGetImage(
+IN  OUT  VOID                         *Image,
+IN  OUT  UINTN                        *ImageSize
+)
+/*++
+
+Routine Description:
+
+    This is a function used to read the current firmware from the device into memory.
+    This is an optional function and can return EFI_UNSUPPORTED.  This is useful for
+    test and diagnostics.
+
+Arguments:
+    Image               -- Buffer to place the image into.
+    ImageSize           -- Size of the Image buffer.
+
+Return Value:
+
+    EFI_STATUS code.
+    If not possible or not practical return EFI_UNSUPPORTED.
+
+--*/
+{
+  return EFI_UNSUPPORTED;
+}//GetImage()
+
+
+/**
+Updates the firmware image of the device.
+
+This function updates the hardware with the new firmware image.
+This function returns EFI_UNSUPPORTED if the firmware image is not updatable.
+If the firmware image is updatable, the function should perform the following minimal validations
+before proceeding to do the firmware image update.
+- Validate the image is a supported image for this device.  The function returns EFI_ABORTED if
+the image is unsupported.  The function can optionally provide more detailed information on
+why the image is not a supported image.
+- Validate the data from VendorCode if not null.  Image validation must be performed before
+VendorCode data validation.  VendorCode data is ignored or considered invalid if image
+validation failed.  The function returns EFI_ABORTED if the data is invalid.
+
+VendorCode enables vendor to implement vendor-specific firmware image update policy.  Null if
+the caller did not specify the policy or use the default policy.  As an example, vendor can implement
+a policy to allow an option to force a firmware image update when the abort reason is due to the new
+firmware image version is older than the current firmware image version or bad image checksum.
+Sensitive operations such as those wiping the entire firmware image and render the device to be
+non-functional should be encoded in the image itself rather than passed with the VendorCode.
+AbortReason enables vendor to have the option to provide a more detailed description of the abort
+reason to the caller.
+
+@param[in]  Image              Points to the new image.
+@param[in]  ImageSize          Size of the new image in bytes.
+@param[in]  VendorCode         This enables vendor to implement vendor-specific firmware image update policy.
+Null indicates the caller did not specify the policy or use the default policy.
+@param[in]  Progress           A function used by the driver to report the progress of the firmware update.
+@param[in]  CapsuleFwVersion   FMP Payload Header version of the image
+@param[out] AbortReason        A pointer to a pointer to a null-terminated string providing more
+details for the aborted operation. The buffer is allocated by this function
+with AllocatePool(), and it is the caller's responsibility to free it with a
+call to FreePool().
+
+@retval EFI_SUCCESS            The device was successfully updated with the new image.
+@retval EFI_ABORTED            The operation is aborted.
+@retval EFI_INVALID_PARAMETER  The Image was NULL.
+@retval EFI_UNSUPPORTED        The operation is not supported.
+
+**/
+EFI_STATUS
+EFIAPI
+FmpDeviceSetImage (
+IN  CONST VOID                                       *Image,
+IN  UINTN                                            ImageSize,
+IN  CONST VOID                                       *VendorCode,
+IN  EFI_FIRMWARE_MANAGEMENT_UPDATE_IMAGE_PROGRESS    Progress,
+IN  UINT32                                           CapsuleFwVersion,
+OUT CHAR16                                           **AbortReason
+)
+{
+    EFI_STATUS Status                         = EFI_SUCCESS;
+    UINT32 Updateable                         = 0;
+
+    Status = FmpDeviceCheckImage(Image, ImageSize, &Updateable);
+    if (EFI_ERROR(Status))
+    {
+        DEBUG((DEBUG_ERROR, "SetImage - Check Image failed with %r.\n", Status));
+        goto cleanup;
+    }
+
+    if (Updateable != IMAGE_UPDATABLE_VALID)
+    {
+        DEBUG((DEBUG_ERROR, "SetImage - Check Image returned that the Image was not valid for update.  Updatable value = 0x%X.\n", Updateable));
+        Status = EFI_ABORTED;
+        goto cleanup;
+    }
+
+    if (Progress == NULL)
+    {
+        DEBUG((DEBUG_ERROR, "SetImage - Invalid progress callback\n"));
+        Status = EFI_INVALID_PARAMETER;
+        goto cleanup;
+    }
+
+    Status = Progress(15);
+    if (EFI_ERROR(Status))
+    {
+        DEBUG((DEBUG_ERROR, "SetImage - Progress Callback failed with Status %r.\n", Status));
+    }
+
+    {
+      UINTN  p;
+
+      for (p = 20; p < 100; p++) {
+        gBS->Stall (100000);  //us  = 0.1 seconds
+        Progress (p);
+      }
+    }
+
+    //TODO: add support for VendorCode, and AbortReason
+cleanup:
+    return Status;
+}// SetImage()
+
+
+
+/**
+Checks if the firmware image is valid for the device.
+
+This function allows firmware update application to validate the firmware image without
+invoking the SetImage() first.
+
+@param[in]  Image              Points to the new image.
+@param[in]  ImageSize          Size of the new image in bytes.
+@param[out] ImageUpdatable     Indicates if the new image is valid for update. It also provides,
+if available, additional information if the image is invalid.
+
+@retval EFI_SUCCESS            The image was successfully checked.
+@retval EFI_INVALID_PARAMETER  The Image was NULL.
+
+**/
+EFI_STATUS
+EFIAPI
+FmpDeviceCheckImage(
+IN  CONST VOID                        *Image,
+IN  UINTN                             ImageSize,
+OUT UINT32                            *ImageUpdateable
+)
+{
+    EFI_STATUS status = EFI_SUCCESS;
+
+    if (ImageUpdateable == NULL)
+    {
+        DEBUG((DEBUG_ERROR, "CheckImage - ImageUpdateable Pointer Parameter is NULL.\n"));
+        status = EFI_INVALID_PARAMETER;
+        goto cleanup;
+    }
+
+    //
+    //Set to valid and then if any tests fail it will update this flag.
+    //
+    *ImageUpdateable = IMAGE_UPDATABLE_VALID;
+
+    if (Image == NULL)
+    {
+        DEBUG((DEBUG_ERROR, "CheckImage - Image Pointer Parameter is NULL.\n"));
+        *ImageUpdateable = IMAGE_UPDATABLE_INVALID; //not sure if this is needed
+        return EFI_INVALID_PARAMETER;
+    }
+
+cleanup:
+    return status;
+}// CheckImage()
+
+/**
+Device firmware should trigger lock mechanism so that device fw can not be updated or tampered with.
+This lock mechanism is generally only cleared by a full system reset (not just sleep state/low power mode)
+
+@retval EFI_SUCCESS           The device was successfully locked.
+@retval EFI_UNSUPPORTED       The hardware device/firmware doesn't support locking
+
+**/
+EFI_STATUS
+EFIAPI
+FmpDeviceLock(
+)
+{
+  return EFI_SUCCESS;
+}
diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/Library/FmpDeviceLibSample/FmpDeviceLib.inf b/Vlv2TbltDevicePkg/Feature/Capsule/Library/FmpDeviceLibSample/FmpDeviceLib.inf
new file mode 100644
index 0000000000..6914c57ee7
--- /dev/null
+++ b/Vlv2TbltDevicePkg/Feature/Capsule/Library/FmpDeviceLibSample/FmpDeviceLib.inf
@@ -0,0 +1,51 @@
+##
+# Copyright (c) 2016, Microsoft Corporation
+
+# All rights reserved.
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# 1. Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+##
+
+
+[Defines]
+  INF_VERSION                    = 0x00010005
+  BASE_NAME                      = Vlv2FmpDeviceLibSample
+  FILE_GUID                      = 582DF9AB-E626-42A8-A11C-3FEA098FF3FA
+  MODULE_TYPE                    = DXE_DRIVER
+  VERSION_STRING                 = 1.0
+  LIBRARY_CLASS                  = FmpDeviceLib|DXE_DRIVER
+
+#
+# The following information is for reference only and not required by the build tools.
+#
+#  VALID_ARCHITECTURES           = IA32 X64
+#
+
+[Sources]
+  FmpDeviceLib.c
+
+[Packages]
+  MdePkg/MdePkg.dec
+  FmpDevicePkg/FmpDevicePkg.dec
+
+[LibraryClasses]
+  DebugLib
+  BaseLib
+  UefiBootServicesTableLib   #for stall...remove later as stall is only needed to show progress
+
-- 
2.14.2.windows.3



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Patch 3/4] Vlv2TbltDevicePkg/Capsule: Add scripts to generate capsules
  2018-08-10  1:28 [Patch 0/4] Vlv2TbltDevicePkg: Add FmpDevicePkg support Michael D Kinney
  2018-08-10  1:28 ` [Patch 1/4] Vlv2TbltDevicePkg/Override/Bds: Add test key notification Michael D Kinney
  2018-08-10  1:28 ` [Patch 2/4] Vlv2TbltDevicePkg/Feature/Capsule: Add FmpDeviceLib instances Michael D Kinney
@ 2018-08-10  1:28 ` Michael D Kinney
  2018-08-10  1:28 ` [Patch 4/4] Vlv2TbltDevicePkg: Update DSC/FDF to use FmpDevicePkg Michael D Kinney
  2018-08-10  6:25 ` [Patch 0/4] Vlv2TbltDevicePkg: Add FmpDevicePkg support Guo, Mang
  4 siblings, 0 replies; 8+ messages in thread
From: Michael D Kinney @ 2018-08-10  1:28 UTC (permalink / raw)
  To: edk2-devel; +Cc: David Wei, Mang Guo

Use GenerateCapsule to generate capsules for MinnowMax
debug and release builds and sample devices.

Cc: David Wei <david.wei@intel.com>
Cc: Mang Guo <mang.guo@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
 .../Capsule/GenerateCapsule/GenCapsuleAll.bat      |  35 +++++
 .../GenerateCapsule/GenCapsuleMinnowMax.bat        | 139 ++++++++++++++++++++
 .../GenerateCapsule/GenCapsuleMinnowMaxRelease.bat | 139 ++++++++++++++++++++
 .../GenerateCapsule/GenCapsuleSampleColor.bat      | 145 +++++++++++++++++++++
 ...kenSpaceGuid.PcdFmpDevicePkcs7CertBufferXdr.inc |   1 +
 ...kenSpaceGuid.PcdFmpDevicePkcs7CertBufferXdr.inc |   1 +
 ...kenSpaceGuid.PcdFmpDevicePkcs7CertBufferXdr.inc |   1 +
 7 files changed, 461 insertions(+)
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.bat
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMax.bat
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMaxRelease.bat
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleSampleColor.bat
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/NewRoot.cer.gFmpDevicePkgTokenSpaceGuid.PcdFmpDevicePkcs7CertBufferXdr.inc
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/SAMPLE_DEVELOPMENT.cer.gFmpDevicePkgTokenSpaceGuid.PcdFmpDevicePkcs7CertBufferXdr.inc
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/SAMPLE_DEVELOPMENT_SAMPLE_PRODUCTION.cer.gFmpDevicePkgTokenSpaceGuid.PcdFmpDevicePkcs7CertBufferXdr.inc

diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.bat b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.bat
new file mode 100644
index 0000000000..df326dc3af
--- /dev/null
+++ b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.bat
@@ -0,0 +1,35 @@
+@REM @file
+@REM   Windows batch file to generate UEFI capsules for system firmware and
+@REM   firmware for sample devices
+@REM
+@REM Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
+@REM This program and the accompanying materials
+@REM are licensed and made available under the terms and conditions of the BSD License
+@REM which accompanies this distribution.  The full text of the license may be found at
+@REM http://opensource.org/licenses/bsd-license.php
+@REM
+@REM THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+@REM WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+@REM
+
+@echo off
+setlocal
+cd /d %~dp0
+
+rmdir /s /q %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules
+mkdir %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules
+mkdir %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\SampleDevelopment
+mkdir %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\NewCert
+mkdir %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert
+copy %WORKSPACE%\Build\Vlv2TbltDevicePkg\DEBUG_VS2015x86\X64\CapsuleApp.efi %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\SampleDevelopment\CapsuleApp.efi
+copy %WORKSPACE%\Build\Vlv2TbltDevicePkg\RELEASE_VS2015x86\X64\CapsuleApp.efi %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\SampleDevelopment\CapsuleAppRelease.efi
+copy %WORKSPACE%\Build\Vlv2TbltDevicePkg\DEBUG_VS2015x86\X64\CapsuleApp.efi %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\NewCert\CapsuleApp.efi
+copy %WORKSPACE%\Build\Vlv2TbltDevicePkg\RELEASE_VS2015x86\X64\CapsuleApp.efi %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\NewCert\CapsuleAppRelease.efi
+copy %WORKSPACE%\Build\Vlv2TbltDevicePkg\DEBUG_VS2015x86\X64\CapsuleApp.efi %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert\CapsuleApp.efi
+copy %WORKSPACE%\Build\Vlv2TbltDevicePkg\RELEASE_VS2015x86\X64\CapsuleApp.efi %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert\CapsuleAppRelease.efi
+
+call GenCapsuleMinnowMax.bat
+call GenCapsuleMinnowMaxRelease.bat
+call GenCapsuleSampleColor.bat Blue  149DA854-7D19-4FAA-A91E-862EA1324BE6
+call GenCapsuleSampleColor.bat Green 79179BFD-704D-4C90-9E02-0AB8D968C18A
+call GenCapsuleSampleColor.bat Red   72E2945A-00DA-448E-9AA7-075AD840F9D4
diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMax.bat b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMax.bat
new file mode 100644
index 0000000000..2a049c4c0f
--- /dev/null
+++ b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMax.bat
@@ -0,0 +1,139 @@
+@REM @file
+@REM   Windows batch file to generate UEFI capsules for system firmware
+@REM
+@REM Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
+@REM This program and the accompanying materials
+@REM are licensed and made available under the terms and conditions of the BSD License
+@REM which accompanies this distribution.  The full text of the license may be found at
+@REM http://opensource.org/licenses/bsd-license.php
+@REM
+@REM THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+@REM WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+@REM
+
+@echo off
+setlocal
+
+set FMP_CAPSULE_VENDOR=Intel
+set FMP_CAPSULE_GUID=4096267B-DA0A-42EB-B5EB-FEF31D207CB4
+set FMP_CAPSULE_FILE=MinnowMax.cap
+set FMP_CAPSULE_VERSION=0x00000009
+set FMP_CAPSULE_STRING=0.0.0.9
+set FMP_CAPSULE_NAME="Intel MinnowMax DEBUG UEFI %FMP_CAPSULE_STRING%"
+set FMP_CAPSULE_LSV=0x00000000
+set FMP_CAPSULE_KEY=SAMPLE_DEVELOPMENT.pfx
+set FMP_CAPSULE_PAYLOAD=%WORKSPACE%\Build\Vlv2TbltDevicePkg\DEBUG_VS2015x86\FV\Vlv.ROM
+set WINDOWS_CAPSULE_KEY=SAMPLE_DEVELOPMENT.pfx
+
+if not exist "%FMP_CAPSULE_PAYLOAD%" exit /b
+
+if exist "%FMP_CAPSULE_KEY%" (
+  REM
+  REM Sign capsule using signtool
+  REM
+  call GenerateCapsule ^
+    --encode ^
+    -v ^
+    --guid %FMP_CAPSULE_GUID% ^
+    --fw-version %FMP_CAPSULE_VERSION% ^
+    --lsv %FMP_CAPSULE_LSV% ^
+    --capflag PersistAcrossReset ^
+    --capflag InitiateReset ^
+    --signing-tool-path="c:\Program Files (x86)\Windows Kits\8.1\bin\x86" ^
+    --pfx-file %FMP_CAPSULE_KEY% ^
+    -o %FMP_CAPSULE_FILE% ^
+    %FMP_CAPSULE_PAYLOAD%
+
+  copy %FMP_CAPSULE_FILE% %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\SampleDevelopment
+
+  if exist "%WINDOWS_CAPSULE_KEY%" (
+    CreateWindowsCapsule.py ^
+      UEFI ^
+      %FMP_CAPSULE_STRING% ^
+      %FMP_CAPSULE_GUID% ^
+      %FMP_CAPSULE_FILE% ^
+      %FMP_CAPSULE_VERSION% ^
+      %FMP_CAPSULE_VENDOR% ^
+      %FMP_CAPSULE_VENDOR% ^
+      %FMP_CAPSULE_NAME% %WINDOWS_CAPSULE_KEY%
+
+    xcopy /s/e/v/i/y WindowsCapsule %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\SampleDevelopment\MinnowMaxWindowsCapsule
+    rmdir /s /q WindowsCapsule
+  )
+  erase %FMP_CAPSULE_FILE%
+)
+
+if exist "NewCert.pem" (
+  REM
+  REM Sign capsule using OpenSSL with a new certificate
+  REM
+  call GenerateCapsule ^
+    --encode ^
+    -v ^
+    --guid %FMP_CAPSULE_GUID% ^
+    --fw-version %FMP_CAPSULE_VERSION% ^
+    --lsv %FMP_CAPSULE_LSV% ^
+    --capflag PersistAcrossReset ^
+    --capflag InitiateReset ^
+    --signing-tool-path=c:\OpenSSL-Win32\bin ^
+    --signer-private-cert=NewCert.pem ^
+    --other-public-cert=NewSub.pub.pem ^
+    --trusted-public-cert=NewRoot.pub.pem ^
+    -o %FMP_CAPSULE_FILE% ^
+    %FMP_CAPSULE_PAYLOAD%
+
+  copy %FMP_CAPSULE_FILE% %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\NewCert
+
+  if exist "%WINDOWS_CAPSULE_KEY%" (
+    CreateWindowsCapsule.py ^
+      UEFI ^
+      %FMP_CAPSULE_STRING% ^
+      %FMP_CAPSULE_GUID% ^
+      %FMP_CAPSULE_FILE% ^
+      %FMP_CAPSULE_VERSION% ^
+      %FMP_CAPSULE_VENDOR% ^
+      %FMP_CAPSULE_VENDOR% ^
+      %FMP_CAPSULE_NAME% %WINDOWS_CAPSULE_KEY%
+
+    xcopy /s/e/v/i/y WindowsCapsule %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\NewCert\MinnowMaxWindowsCapsule
+    rmdir /s /q WindowsCapsule
+  )
+  erase %FMP_CAPSULE_FILE%
+)
+
+REM
+REM Sign capsule using OpenSSL with EDK II Test Certificate
+REM
+call GenerateCapsule ^
+  --encode ^
+  -v ^
+  --guid %FMP_CAPSULE_GUID% ^
+  --fw-version %FMP_CAPSULE_VERSION% ^
+  --lsv %FMP_CAPSULE_LSV% ^
+  --capflag PersistAcrossReset ^
+  --capflag InitiateReset ^
+  --signing-tool-path=c:\OpenSSL-Win32\bin ^
+  --signer-private-cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\TestCert.pem ^
+  --other-public-cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\TestSub.pub.pem ^
+  --trusted-public-cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\TestRoot.pub.pem ^
+  -o %FMP_CAPSULE_FILE% ^
+  %FMP_CAPSULE_PAYLOAD%
+
+copy %FMP_CAPSULE_FILE% %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert
+
+if exist "%WINDOWS_CAPSULE_KEY%" (
+  CreateWindowsCapsule.py ^
+    UEFI ^
+    %FMP_CAPSULE_STRING% ^
+    %FMP_CAPSULE_GUID% ^
+    %FMP_CAPSULE_FILE% ^
+    %FMP_CAPSULE_VERSION% ^
+    %FMP_CAPSULE_VENDOR% ^
+    %FMP_CAPSULE_VENDOR% ^
+    %FMP_CAPSULE_NAME% %WINDOWS_CAPSULE_KEY%
+
+  xcopy /s/e/v/i/y WindowsCapsule %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert\MinnowMaxWindowsCapsule
+  rmdir /s /q WindowsCapsule
+)
+
+erase %FMP_CAPSULE_FILE%
diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMaxRelease.bat b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMaxRelease.bat
new file mode 100644
index 0000000000..c0cdac0904
--- /dev/null
+++ b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMaxRelease.bat
@@ -0,0 +1,139 @@
+@REM @file
+@REM   Windows batch file to generate UEFI capsules for system firmware
+@REM
+@REM Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
+@REM This program and the accompanying materials
+@REM are licensed and made available under the terms and conditions of the BSD License
+@REM which accompanies this distribution.  The full text of the license may be found at
+@REM http://opensource.org/licenses/bsd-license.php
+@REM
+@REM THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+@REM WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+@REM
+
+@echo off
+setlocal
+
+set FMP_CAPSULE_VENDOR=Intel
+set FMP_CAPSULE_GUID=4096267B-DA0A-42EB-B5EB-FEF31D207CB4
+set FMP_CAPSULE_FILE=MinnowMaxRelease.cap
+set FMP_CAPSULE_VERSION=0x00000009
+set FMP_CAPSULE_STRING=0.0.0.9
+set FMP_CAPSULE_NAME="Intel MinnowMax RELEASE UEFI %FMP_CAPSULE_STRING%"
+set FMP_CAPSULE_LSV=0x00000000
+set FMP_CAPSULE_KEY=SAMPLE_DEVELOPMENT.pfx
+set FMP_CAPSULE_PAYLOAD=%WORKSPACE%\Build\Vlv2TbltDevicePkg\RELEASE_VS2015x86\FV\Vlv.ROM
+set WINDOWS_CAPSULE_KEY=SAMPLE_DEVELOPMENT.pfx
+
+if not exist "%FMP_CAPSULE_PAYLOAD%" exit /b
+
+if exist "%FMP_CAPSULE_KEY%" (
+  REM
+  REM Sign capsule using signtool
+  REM
+  call GenerateCapsule ^
+    --encode ^
+    -v ^
+    --guid %FMP_CAPSULE_GUID% ^
+    --fw-version %FMP_CAPSULE_VERSION% ^
+    --lsv %FMP_CAPSULE_LSV% ^
+    --capflag PersistAcrossReset ^
+    --capflag InitiateReset ^
+    --signing-tool-path="c:\Program Files (x86)\Windows Kits\8.1\bin\x86" ^
+    --pfx-file %FMP_CAPSULE_KEY% ^
+    -o %FMP_CAPSULE_FILE% ^
+    %FMP_CAPSULE_PAYLOAD%
+
+  copy %FMP_CAPSULE_FILE% %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\SampleDevelopment
+
+  if exist "%WINDOWS_CAPSULE_KEY%" (
+    CreateWindowsCapsule.py ^
+      UEFI ^
+      %FMP_CAPSULE_STRING% ^
+      %FMP_CAPSULE_GUID% ^
+      %FMP_CAPSULE_FILE% ^
+      %FMP_CAPSULE_VERSION% ^
+      %FMP_CAPSULE_VENDOR% ^
+      %FMP_CAPSULE_VENDOR% ^
+      %FMP_CAPSULE_NAME% %WINDOWS_CAPSULE_KEY%
+
+    xcopy /s/e/v/i/y WindowsCapsule %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\SampleDevelopment\MinnowMaxReleaseWindowsCapsule
+    rmdir /s /q WindowsCapsule
+  )
+  erase %FMP_CAPSULE_FILE%
+)
+
+if exist "NewCert.pem" (
+  REM
+  REM Sign capsule using OpenSSL with a new certificate
+  REM
+  call GenerateCapsule ^
+    --encode ^
+    -v ^
+    --guid %FMP_CAPSULE_GUID% ^
+    --fw-version %FMP_CAPSULE_VERSION% ^
+    --lsv %FMP_CAPSULE_LSV% ^
+    --capflag PersistAcrossReset ^
+    --capflag InitiateReset ^
+    --signing-tool-path=c:\OpenSSL-Win32\bin ^
+    --signer-private-cert=NewCert.pem ^
+    --other-public-cert=NewSub.pub.pem ^
+    --trusted-public-cert=NewRoot.pub.pem ^
+    -o %FMP_CAPSULE_FILE% ^
+    %FMP_CAPSULE_PAYLOAD%
+
+  copy %FMP_CAPSULE_FILE% %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\NewCert
+
+  if exist "%WINDOWS_CAPSULE_KEY%" (
+    CreateWindowsCapsule.py ^
+      UEFI ^
+      %FMP_CAPSULE_STRING% ^
+      %FMP_CAPSULE_GUID% ^
+      %FMP_CAPSULE_FILE% ^
+      %FMP_CAPSULE_VERSION% ^
+      %FMP_CAPSULE_VENDOR% ^
+      %FMP_CAPSULE_VENDOR% ^
+      %FMP_CAPSULE_NAME% %WINDOWS_CAPSULE_KEY%
+
+    xcopy /s/e/v/i/y WindowsCapsule %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\NewCert\MinnowMaxReleaseWindowsCapsule
+    rmdir /s /q WindowsCapsule
+  )
+  erase %FMP_CAPSULE_FILE%
+)
+
+REM
+REM Sign capsule using OpenSSL with EDK II Test Certificate
+REM
+call GenerateCapsule ^
+  --encode ^
+  -v ^
+  --guid %FMP_CAPSULE_GUID% ^
+  --fw-version %FMP_CAPSULE_VERSION% ^
+  --lsv %FMP_CAPSULE_LSV% ^
+  --capflag PersistAcrossReset ^
+  --capflag InitiateReset ^
+  --signing-tool-path=c:\OpenSSL-Win32\bin ^
+  --signer-private-cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\TestCert.pem ^
+  --other-public-cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\TestSub.pub.pem ^
+  --trusted-public-cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\TestRoot.pub.pem ^
+  -o %FMP_CAPSULE_FILE% ^
+  %FMP_CAPSULE_PAYLOAD%
+
+copy %FMP_CAPSULE_FILE% %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert
+
+if exist "%WINDOWS_CAPSULE_KEY%" (
+  CreateWindowsCapsule.py ^
+    UEFI ^
+    %FMP_CAPSULE_STRING% ^
+    %FMP_CAPSULE_GUID% ^
+    %FMP_CAPSULE_FILE% ^
+    %FMP_CAPSULE_VERSION% ^
+    %FMP_CAPSULE_VENDOR% ^
+    %FMP_CAPSULE_VENDOR% ^
+    %FMP_CAPSULE_NAME% %WINDOWS_CAPSULE_KEY%
+
+  xcopy /s/e/v/i/y WindowsCapsule %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert\MinnowMaxReleaseWindowsCapsule
+  rmdir /s /q WindowsCapsule
+)
+
+erase %FMP_CAPSULE_FILE%
diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleSampleColor.bat b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleSampleColor.bat
new file mode 100644
index 0000000000..c7f70ff958
--- /dev/null
+++ b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleSampleColor.bat
@@ -0,0 +1,145 @@
+@REM @file
+@REM   Windows batch file to generate UEFI capsules for a sample device
+@REM
+@REM Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
+@REM This program and the accompanying materials
+@REM are licensed and made available under the terms and conditions of the BSD License
+@REM which accompanies this distribution.  The full text of the license may be found at
+@REM http://opensource.org/licenses/bsd-license.php
+@REM
+@REM THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+@REM WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+@REM
+
+@echo off
+setlocal
+
+set COLOR=%1
+
+set FMP_CAPSULE_VENDOR=Intel
+set FMP_CAPSULE_GUID=%2
+set FMP_CAPSULE_FILE=%COLOR%.cap
+set FMP_CAPSULE_VERSION=0x00000010
+set FMP_CAPSULE_STRING=0.0.0.16
+set FMP_CAPSULE_NAME="%COLOR% Progress Bar %FMP_CAPSULE_STRING%"
+set FMP_CAPSULE_LSV=0x00000000
+set FMP_CAPSULE_KEY=SAMPLE_DEVELOPMENT.pfx
+set FMP_CAPSULE_PAYLOAD=Payload.bin
+set WINDOWS_CAPSULE_KEY=SAMPLE_DEVELOPMENT.pfx
+
+echo "%COLOR% Progress Bar" > %FMP_CAPSULE_PAYLOAD%
+
+if not exist "%FMP_CAPSULE_PAYLOAD%" exit
+
+if exist "%FMP_CAPSULE_KEY%" (
+  REM
+  REM Sign capsule using signtool
+  REM
+  call GenerateCapsule ^
+    --encode ^
+    -v ^
+    --guid %FMP_CAPSULE_GUID% ^
+    --fw-version %FMP_CAPSULE_VERSION% ^
+    --lsv %FMP_CAPSULE_LSV% ^
+    --capflag PersistAcrossReset ^
+    --capflag InitiateReset ^
+    --signing-tool-path="c:\Program Files (x86)\Windows Kits\8.1\bin\x86" ^
+    --pfx-file %FMP_CAPSULE_KEY% ^
+    -o %FMP_CAPSULE_FILE% ^
+    %FMP_CAPSULE_PAYLOAD%
+
+  copy %FMP_CAPSULE_FILE% %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\SampleDevelopment
+
+  if exist "%WINDOWS_CAPSULE_KEY%" (
+    CreateWindowsCapsule.py ^
+      UEFI ^
+      %FMP_CAPSULE_STRING% ^
+      %FMP_CAPSULE_GUID% ^
+      %FMP_CAPSULE_FILE% ^
+      %FMP_CAPSULE_VERSION% ^
+      %FMP_CAPSULE_VENDOR% ^
+      %FMP_CAPSULE_VENDOR% ^
+      %FMP_CAPSULE_NAME% %WINDOWS_CAPSULE_KEY%
+
+    xcopy /s/e/v/i/y WindowsCapsule %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\SampleDevelopment\%COLOR%WindowsCapsule
+    rmdir /s /q WindowsCapsule
+  )
+  erase %FMP_CAPSULE_FILE%
+)
+
+if exist "NewCert.pem" (
+  REM
+  REM Sign capsule using OpenSSL with a new certificate
+  REM
+  call GenerateCapsule ^
+    --encode ^
+    -v ^
+    --guid %FMP_CAPSULE_GUID% ^
+    --fw-version %FMP_CAPSULE_VERSION% ^
+    --lsv %FMP_CAPSULE_LSV% ^
+    --capflag PersistAcrossReset ^
+    --capflag InitiateReset ^
+    --signing-tool-path=c:\OpenSSL-Win32\bin ^
+    --signer-private-cert=NewCert.pem ^
+    --other-public-cert=NewSub.pub.pem ^
+    --trusted-public-cert=NewRoot.pub.pem ^
+    -o %FMP_CAPSULE_FILE% ^
+    %FMP_CAPSULE_PAYLOAD%
+
+  copy %FMP_CAPSULE_FILE% %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\NewCert
+
+  if exist "%WINDOWS_CAPSULE_KEY%" (
+    CreateWindowsCapsule.py ^
+      UEFI ^
+      %FMP_CAPSULE_STRING% ^
+      %FMP_CAPSULE_GUID% ^
+      %FMP_CAPSULE_FILE% ^
+      %FMP_CAPSULE_VERSION% ^
+      %FMP_CAPSULE_VENDOR% ^
+      %FMP_CAPSULE_VENDOR% ^
+      %FMP_CAPSULE_NAME% %WINDOWS_CAPSULE_KEY%
+
+    xcopy /s/e/v/i/y WindowsCapsule %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\NewCert\%COLOR%WindowsCapsule
+    rmdir /s /q WindowsCapsule
+  )
+  erase %FMP_CAPSULE_FILE%
+)
+
+REM
+REM Sign capsule using OpenSSL with EDK II Test Certificate
+REM
+call GenerateCapsule ^
+  --encode ^
+  -v ^
+  --guid %FMP_CAPSULE_GUID% ^
+  --fw-version %FMP_CAPSULE_VERSION% ^
+  --lsv %FMP_CAPSULE_LSV% ^
+  --capflag PersistAcrossReset ^
+  --capflag InitiateReset ^
+  --signing-tool-path=c:\OpenSSL-Win32\bin ^
+  --signer-private-cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\TestCert.pem ^
+  --other-public-cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\TestSub.pub.pem ^
+  --trusted-public-cert=%WORKSPACE%\edk2\BaseTools\Source\Python\Pkcs7Sign\TestRoot.pub.pem ^
+  -o %FMP_CAPSULE_FILE% ^
+  %FMP_CAPSULE_PAYLOAD%
+
+copy %FMP_CAPSULE_FILE% %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert
+
+if exist "%WINDOWS_CAPSULE_KEY%" (
+  CreateWindowsCapsule.py ^
+    UEFI ^
+    %FMP_CAPSULE_STRING% ^
+    %FMP_CAPSULE_GUID% ^
+    %FMP_CAPSULE_FILE% ^
+    %FMP_CAPSULE_VERSION% ^
+    %FMP_CAPSULE_VENDOR% ^
+    %FMP_CAPSULE_VENDOR% ^
+    %FMP_CAPSULE_NAME% %WINDOWS_CAPSULE_KEY%
+
+  xcopy /s/e/v/i/y WindowsCapsule %WORKSPACE%\Build\Vlv2TbltDevicePkg\Capsules\TestCert\%COLOR%WindowsCapsule
+  rmdir /s /q WindowsCapsule
+)
+
+erase %FMP_CAPSULE_FILE%
+
+erase %FMP_CAPSULE_PAYLOAD%
diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/NewRoot.cer.gFmpDevicePkgTokenSpaceGuid.PcdFmpDevicePkcs7CertBufferXdr.inc b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/NewRoot.cer.gFmpDevicePkgTokenSpaceGuid.PcdFmpDevicePkcs7CertBufferXdr.inc
new file mode 100644
index 0000000000..d3f5a12faa
--- /dev/null
+++ b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/NewRoot.cer.gFmpDevicePkgTokenSpaceGuid.PcdFmpDevicePkcs7CertBufferXdr.inc
@@ -0,0 +1 @@
+
diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/SAMPLE_DEVELOPMENT.cer.gFmpDevicePkgTokenSpaceGuid.PcdFmpDevicePkcs7CertBufferXdr.inc b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/SAMPLE_DEVELOPMENT.cer.gFmpDevicePkgTokenSpaceGuid.PcdFmpDevicePkcs7CertBufferXdr.inc
new file mode 100644
index 0000000000..d3f5a12faa
--- /dev/null
+++ b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/SAMPLE_DEVELOPMENT.cer.gFmpDevicePkgTokenSpaceGuid.PcdFmpDevicePkcs7CertBufferXdr.inc
@@ -0,0 +1 @@
+
diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/SAMPLE_DEVELOPMENT_SAMPLE_PRODUCTION.cer.gFmpDevicePkgTokenSpaceGuid.PcdFmpDevicePkcs7CertBufferXdr.inc b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/SAMPLE_DEVELOPMENT_SAMPLE_PRODUCTION.cer.gFmpDevicePkgTokenSpaceGuid.PcdFmpDevicePkcs7CertBufferXdr.inc
new file mode 100644
index 0000000000..d3f5a12faa
--- /dev/null
+++ b/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/SAMPLE_DEVELOPMENT_SAMPLE_PRODUCTION.cer.gFmpDevicePkgTokenSpaceGuid.PcdFmpDevicePkcs7CertBufferXdr.inc
@@ -0,0 +1 @@
+
-- 
2.14.2.windows.3



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Patch 4/4] Vlv2TbltDevicePkg: Update DSC/FDF to use FmpDevicePkg
  2018-08-10  1:28 [Patch 0/4] Vlv2TbltDevicePkg: Add FmpDevicePkg support Michael D Kinney
                   ` (2 preceding siblings ...)
  2018-08-10  1:28 ` [Patch 3/4] Vlv2TbltDevicePkg/Capsule: Add scripts to generate capsules Michael D Kinney
@ 2018-08-10  1:28 ` Michael D Kinney
  2018-08-10  6:25 ` [Patch 0/4] Vlv2TbltDevicePkg: Add FmpDevicePkg support Guo, Mang
  4 siblings, 0 replies; 8+ messages in thread
From: Michael D Kinney @ 2018-08-10  1:28 UTC (permalink / raw)
  To: edk2-devel; +Cc: David Wei, Mang Guo

Cc: David Wei <david.wei@intel.com>
Cc: Mang Guo <mang.guo@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
 Vlv2TbltDevicePkg/FmpBlueSampleDevice.dsc  | 61 +++++++++++++++++++++++++++
 Vlv2TbltDevicePkg/FmpCertificate.dsc       | 28 +++++++++++++
 Vlv2TbltDevicePkg/FmpGreenSampleDevice.dsc | 61 +++++++++++++++++++++++++++
 Vlv2TbltDevicePkg/FmpMinnowMaxSystem.dsc   | 65 +++++++++++++++++++++++++++++
 Vlv2TbltDevicePkg/FmpRedSampleDevice.dsc   | 61 +++++++++++++++++++++++++++
 Vlv2TbltDevicePkg/PlatformCapsule.dsc      |  1 +
 Vlv2TbltDevicePkg/PlatformCapsule.fdf      | 23 -----------
 Vlv2TbltDevicePkg/PlatformCapsuleGcc.fdf   | 23 -----------
 Vlv2TbltDevicePkg/PlatformPkg.dec          |  5 +++
 Vlv2TbltDevicePkg/PlatformPkg.fdf          | 61 ++++++++-------------------
 Vlv2TbltDevicePkg/PlatformPkgConfig.dsc    | 19 +++++++--
 Vlv2TbltDevicePkg/PlatformPkgGcc.fdf       | 61 ++++++++-------------------
 Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc    | 66 ++++++++++++------------------
 Vlv2TbltDevicePkg/PlatformPkgIA32.dsc      | 64 ++++++++++++-----------------
 Vlv2TbltDevicePkg/PlatformPkgX64.dsc       | 62 +++++++++++-----------------
 15 files changed, 409 insertions(+), 252 deletions(-)
 create mode 100644 Vlv2TbltDevicePkg/FmpBlueSampleDevice.dsc
 create mode 100644 Vlv2TbltDevicePkg/FmpCertificate.dsc
 create mode 100644 Vlv2TbltDevicePkg/FmpGreenSampleDevice.dsc
 create mode 100644 Vlv2TbltDevicePkg/FmpMinnowMaxSystem.dsc
 create mode 100644 Vlv2TbltDevicePkg/FmpRedSampleDevice.dsc

diff --git a/Vlv2TbltDevicePkg/FmpBlueSampleDevice.dsc b/Vlv2TbltDevicePkg/FmpBlueSampleDevice.dsc
new file mode 100644
index 0000000000..5f59845866
--- /dev/null
+++ b/Vlv2TbltDevicePkg/FmpBlueSampleDevice.dsc
@@ -0,0 +1,61 @@
+#/** @file
+# FmpDxe driver for Blue Sample device firmware update.
+#
+# Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
+#
+# This program and the accompanying materials are licensed and made available under
+# the terms and conditions of the BSD License that accompanies this distribution.
+# The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php.
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+#
+#**/
+
+  FmpDevicePkg/FmpDxe/FmpDxe.inf {
+    <Defines>
+      #
+      # ESRT and FMP GUID for sample device capsule update
+      #
+      FILE_GUID = $(FMP_BLUE_SAMPLE_DEVICE)
+    <PcdsFixedAtBuild>
+      #
+      # Unicode name string that is used to populate FMP Image Descriptor for this capsule update module
+      #
+      gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceImageIdName|L"Sample Firmware Device"
+
+      #
+      # ESRT and FMP Lowest Support Version for this capsule update module
+      # 000.000.000.000
+      #
+      gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceBuildTimeLowestSupportedVersion|0x00000000
+
+      gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceProgressWatchdogTimeInSeconds|2
+
+      #
+      # Capsule Update Progress Bar Color.  Set to Blue (RGB) (0, 0, 255)
+      #
+      gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceProgressColor|0x000000FF
+
+      #
+      # Certificates used to authenticate capsule update image
+      #
+      !include Vlv2TbltDevicePkg/FmpCertificate.dsc
+
+    <LibraryClasses>
+      #
+      # Generic libraries that are used "as is" by all FMP modules
+      #
+      FmpPayloadHeaderLib|FmpDevicePkg/Library/FmpPayloadHeaderLibV1/FmpPayloadHeaderLibV1.inf
+      FmpAuthenticationLib|SecurityPkg/Library/FmpAuthenticationLibPkcs7/FmpAuthenticationLibPkcs7.inf
+      #
+      # Platform specific capsule policy library
+      #
+      CapsuleUpdatePolicyLib|FmpDevicePkg/Library/CapsuleUpdatePolicyLibNull/CapsuleUpdatePolicyLibNull.inf
+      #
+      # Device specific library that processes a capsule and updates the FW storage device
+      #
+      FmpDeviceLib|Vlv2TbltDevicePkg/Feature/Capsule/Library/FmpDeviceLibSample/FmpDeviceLib.inf
+  }
diff --git a/Vlv2TbltDevicePkg/FmpCertificate.dsc b/Vlv2TbltDevicePkg/FmpCertificate.dsc
new file mode 100644
index 0000000000..c510c90582
--- /dev/null
+++ b/Vlv2TbltDevicePkg/FmpCertificate.dsc
@@ -0,0 +1,28 @@
+#/** @file
+# FMP Certificates shared by multiple FmpDxe drivers for firmware update.
+#
+# Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
+#
+# This program and the accompanying materials are licensed and made available under
+# the terms and conditions of the BSD License that accompanies this distribution.
+# The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php.
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+#
+#**/
+
+!if $(CAPSULE_PKCS7_CERT) == SAMPLE_DEVELOPMENT_SAMPLE_PRODUCTION
+  !include Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/SAMPLE_DEVELOPMENT_SAMPLE_PRODUCTION.cer.gFmpDevicePkgTokenSpaceGuid.PcdFmpDevicePkcs7CertBufferXdr.inc
+!endif
+!if $(CAPSULE_PKCS7_CERT) == SAMPLE_DEVELOPMENT
+  !include Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/SAMPLE_DEVELOPMENT.cer.gFmpDevicePkgTokenSpaceGuid.PcdFmpDevicePkcs7CertBufferXdr.inc
+!endif
+!if $(CAPSULE_PKCS7_CERT) == EDKII_TEST
+  !include BaseTools/Source/Python/Pkcs7Sign/TestRoot.cer.gFmpDevicePkgTokenSpaceGuid.PcdFmpDevicePkcs7CertBufferXdr.inc
+!endif
+!if $(CAPSULE_PKCS7_CERT) == NEW_ROOT
+  !include Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/NewRoot.cer.gFmpDevicePkgTokenSpaceGuid.PcdFmpDevicePkcs7CertBufferXdr.inc
+!endif
diff --git a/Vlv2TbltDevicePkg/FmpGreenSampleDevice.dsc b/Vlv2TbltDevicePkg/FmpGreenSampleDevice.dsc
new file mode 100644
index 0000000000..085318fa5d
--- /dev/null
+++ b/Vlv2TbltDevicePkg/FmpGreenSampleDevice.dsc
@@ -0,0 +1,61 @@
+#/** @file
+# FmpDxe driver for Green Sample device firmware update.
+#
+# Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
+#
+# This program and the accompanying materials are licensed and made available under
+# the terms and conditions of the BSD License that accompanies this distribution.
+# The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php.
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+#
+#**/
+
+  FmpDevicePkg/FmpDxe/FmpDxe.inf {
+    <Defines>
+      #
+      # ESRT and FMP GUID for sample device capsule update
+      #
+      FILE_GUID = $(FMP_GREEN_SAMPLE_DEVICE)
+    <PcdsFixedAtBuild>
+      #
+      # Unicode name string that is used to populate FMP Image Descriptor for this capsule update module
+      #
+      gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceImageIdName|L"Sample Firmware Device"
+
+      #
+      # ESRT and FMP Lowest Support Version for this capsule update module
+      # 000.000.000.000
+      #
+      gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceBuildTimeLowestSupportedVersion|0x00000000
+
+      gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceProgressWatchdogTimeInSeconds|2
+
+      #
+      # Capsule Update Progress Bar Color.  Set to Green (RGB) (0, 255, 0)
+      #
+      gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceProgressColor|0x0000FF00
+
+      #
+      # Certificates used to authenticate capsule update image
+      #
+      !include Vlv2TbltDevicePkg/FmpCertificate.dsc
+
+    <LibraryClasses>
+      #
+      # Generic libraries that are used "as is" by all FMP modules
+      #
+      FmpPayloadHeaderLib|FmpDevicePkg/Library/FmpPayloadHeaderLibV1/FmpPayloadHeaderLibV1.inf
+      FmpAuthenticationLib|SecurityPkg/Library/FmpAuthenticationLibPkcs7/FmpAuthenticationLibPkcs7.inf
+      #
+      # Platform specific capsule policy library
+      #
+      CapsuleUpdatePolicyLib|FmpDevicePkg/Library/CapsuleUpdatePolicyLibNull/CapsuleUpdatePolicyLibNull.inf
+      #
+      # Device specific library that processes a capsule and updates the FW storage device
+      #
+      FmpDeviceLib|Vlv2TbltDevicePkg/Feature/Capsule/Library/FmpDeviceLibSample/FmpDeviceLib.inf
+  }
diff --git a/Vlv2TbltDevicePkg/FmpMinnowMaxSystem.dsc b/Vlv2TbltDevicePkg/FmpMinnowMaxSystem.dsc
new file mode 100644
index 0000000000..3b5d303e9e
--- /dev/null
+++ b/Vlv2TbltDevicePkg/FmpMinnowMaxSystem.dsc
@@ -0,0 +1,65 @@
+#/** @file
+# FmpDxe driver for Minnow Max system firmware update.
+#
+# Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
+#
+# This program and the accompanying materials are licensed and made available under
+# the terms and conditions of the BSD License that accompanies this distribution.
+# The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php.
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+#
+#**/
+
+  FmpDevicePkg/FmpDxe/FmpDxe.inf {
+    <Defines>
+      #
+      # ESRT and FMP GUID for system firmware capsule update
+      #
+      FILE_GUID = $(FMP_MINNOW_MAX_SYSTEM)
+    <PcdsFixedAtBuild>
+      #
+      # Unicode name string that is used to populate FMP Image Descriptor for this capsule update module
+      #
+      gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceImageIdName|L"Minnow Max System Firmware Device"
+
+      #
+      # ESRT and FMP Lowest Support Version for this capsule update module
+      # 000.000.000.000
+      #
+      gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceBuildTimeLowestSupportedVersion|0x00000000
+
+      gPlatformModuleTokenSpaceGuid.PcdSystemFirmwareFmpLowestSupportedVersion|0x00000000
+      gPlatformModuleTokenSpaceGuid.PcdSystemFirmwareFmpVersion|0x00000000
+      gPlatformModuleTokenSpaceGuid.PcdSystemFirmwareFmpVersionString|"000.000.000.000"
+
+      gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceProgressWatchdogTimeInSeconds|4
+
+      #
+      # Capsule Update Progress Bar Color.  Set to Purple (RGB) (255, 0, 255)
+      #
+      gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceProgressColor|0x00FF00FF
+
+      #
+      # Certificates used to authenticate capsule update image
+      #
+      !include Vlv2TbltDevicePkg/FmpCertificate.dsc
+
+    <LibraryClasses>
+      #
+      # Generic libraries that are used "as is" by all FMP modules
+      #
+      FmpPayloadHeaderLib|FmpDevicePkg/Library/FmpPayloadHeaderLibV1/FmpPayloadHeaderLibV1.inf
+      FmpAuthenticationLib|SecurityPkg/Library/FmpAuthenticationLibPkcs7/FmpAuthenticationLibPkcs7.inf
+      #
+      # Platform specific capsule policy library
+      #
+      CapsuleUpdatePolicyLib|FmpDevicePkg/Library/CapsuleUpdatePolicyLibNull/CapsuleUpdatePolicyLibNull.inf
+      #
+      # Device specific library that processes a capsule and updates the FW storage device
+      #
+      FmpDeviceLib|Vlv2TbltDevicePkg/Feature/Capsule/Library/FmpDeviceLib/FmpDeviceLib.inf
+  }
diff --git a/Vlv2TbltDevicePkg/FmpRedSampleDevice.dsc b/Vlv2TbltDevicePkg/FmpRedSampleDevice.dsc
new file mode 100644
index 0000000000..6e181acf57
--- /dev/null
+++ b/Vlv2TbltDevicePkg/FmpRedSampleDevice.dsc
@@ -0,0 +1,61 @@
+#/** @file
+# FmpDxe driver for Red Sample device firmware update.
+#
+# Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
+#
+# This program and the accompanying materials are licensed and made available under
+# the terms and conditions of the BSD License that accompanies this distribution.
+# The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php.
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+#
+#**/
+
+  FmpDevicePkg/FmpDxe/FmpDxe.inf {
+    <Defines>
+      #
+      # ESRT and FMP GUID for sample device capsule update
+      #
+      FILE_GUID = $(FMP_RED_SAMPLE_DEVICE)
+    <PcdsFixedAtBuild>
+      #
+      # Unicode name string that is used to populate FMP Image Descriptor for this capsule update module
+      #
+      gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceImageIdName|L"Sample Firmware Device"
+
+      #
+      # ESRT and FMP Lowest Support Version for this capsule update module
+      # 000.000.000.000
+      #
+      gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceBuildTimeLowestSupportedVersion|0x00000000
+
+      gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceProgressWatchdogTimeInSeconds|2
+
+      #
+      # Capsule Update Progress Bar Color.  Set to Blue (RGB) (255, 0, 0)
+      #
+      gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceProgressColor|0x00FF0000
+
+      #
+      # Certificates used to authenticate capsule update image
+      #
+      !include Vlv2TbltDevicePkg/FmpCertificate.dsc
+
+    <LibraryClasses>
+      #
+      # Generic libraries that are used "as is" by all FMP modules
+      #
+      FmpPayloadHeaderLib|FmpDevicePkg/Library/FmpPayloadHeaderLibV1/FmpPayloadHeaderLibV1.inf
+      FmpAuthenticationLib|SecurityPkg/Library/FmpAuthenticationLibPkcs7/FmpAuthenticationLibPkcs7.inf
+      #
+      # Platform specific capsule policy library
+      #
+      CapsuleUpdatePolicyLib|FmpDevicePkg/Library/CapsuleUpdatePolicyLibNull/CapsuleUpdatePolicyLibNull.inf
+      #
+      # Device specific library that processes a capsule and updates the FW storage device
+      #
+      FmpDeviceLib|Vlv2TbltDevicePkg/Feature/Capsule/Library/FmpDeviceLibSample/FmpDeviceLib.inf
+  }
diff --git a/Vlv2TbltDevicePkg/PlatformCapsule.dsc b/Vlv2TbltDevicePkg/PlatformCapsule.dsc
index a619ed853a..80cda88384 100644
--- a/Vlv2TbltDevicePkg/PlatformCapsule.dsc
+++ b/Vlv2TbltDevicePkg/PlatformCapsule.dsc
@@ -23,6 +23,7 @@ [Defines]
   SUPPORTED_ARCHITECTURES        = IA32|X64
   BUILD_TARGETS                  = DEBUG|RELEASE
   SKUID_IDENTIFIER               = DEFAULT
+  POSTBUILD                      = Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.bat
 
 ###################################################################################################
 #
diff --git a/Vlv2TbltDevicePkg/PlatformCapsule.fdf b/Vlv2TbltDevicePkg/PlatformCapsule.fdf
index a80a75cf83..a05f6c6e6e 100644
--- a/Vlv2TbltDevicePkg/PlatformCapsule.fdf
+++ b/Vlv2TbltDevicePkg/PlatformCapsule.fdf
@@ -35,24 +35,10 @@ [FV.SystemFirmwareUpdateCargo]
     $(WORKSPACE)/$(OUTPUT_DIRECTORY)/$(TARGET)_$(TOOL_CHAIN_TAG)/FV/Vlv.ROM
   }
 
-FILE RAW = ce57b167-b0e4-41e8-a897-5f4feb781d40 { # gEdkiiSystemFmpCapsuleDriverFvFileGuid
-    $(WORKSPACE)/$(OUTPUT_DIRECTORY)/$(TARGET)_$(TOOL_CHAIN_TAG)/FV/CAPSULEDISPATCHFV.Fv
-  }
-
 FILE RAW = 812136D3-4D3A-433A-9418-29BB9BF78F6E { # gEdkiiSystemFmpCapsuleConfigFileGuid
     Vlv2TbltDevicePkg/Feature/Capsule/SystemFirmwareUpdateConfig/SystemFirmwareUpdateConfig.ini
   }
 
-[FmpPayload.FmpPayloadSystemFirmwarePkcs7]
-IMAGE_HEADER_INIT_VERSION = 0x02
-IMAGE_TYPE_ID             = 4096267b-da0a-42eb-b5eb-fef31d207cb4 # PcdSystemFmpCapsuleImageTypeIdGuid
-IMAGE_INDEX               = 0x1
-HARDWARE_INSTANCE         = 0x0
-MONOTONIC_COUNT           = 0x2
-CERTIFICATE_GUID          = 4AAFD29D-68DF-49EE-8AA9-347D375665A7 # PKCS7
-
-FILE DATA = $(WORKSPACE)/$(OUTPUT_DIRECTORY)/$(TARGET)_$(TOOL_CHAIN_TAG)/FV/SYSTEMFIRMWAREUPDATECARGO.Fv
-
 [FmpPayload.FmpPayloadSystemFirmwareRsa2048]
 IMAGE_HEADER_INIT_VERSION = 0x02
 IMAGE_TYPE_ID             = 4096267b-da0a-42eb-b5eb-fef31d207cb4 # PcdSystemFmpCapsuleImageTypeIdGuid
@@ -63,14 +49,6 @@ [FmpPayload.FmpPayloadSystemFirmwareRsa2048]
 
 FILE DATA = $(WORKSPACE)/$(OUTPUT_DIRECTORY)/$(TARGET)_$(TOOL_CHAIN_TAG)/FV/SYSTEMFIRMWAREUPDATECARGO.Fv
 
-[Capsule.Vlv2FirmwareUpdateCapsuleFmpPkcs7]
-CAPSULE_GUID                = 6dcbd5ed-e82d-4c44-bda1-7194199ad92a # gEfiFmpCapsuleGuid
-CAPSULE_FLAGS               = PersistAcrossReset,InitiateReset
-CAPSULE_HEADER_SIZE         = 0x20
-CAPSULE_HEADER_INIT_VERSION = 0x1
-
-FMP_PAYLOAD = FmpPayloadSystemFirmwarePkcs7
-
 [Capsule.Vlv2Rec]
 CAPSULE_GUID                = 6dcbd5ed-e82d-4c44-bda1-7194199ad92a # gEfiFmpCapsuleGuid
 CAPSULE_FLAGS               = PersistAcrossReset,InitiateReset
@@ -78,4 +56,3 @@ [Capsule.Vlv2Rec]
 CAPSULE_HEADER_INIT_VERSION = 0x1
 
 FMP_PAYLOAD = FmpPayloadSystemFirmwareRsa2048
-
diff --git a/Vlv2TbltDevicePkg/PlatformCapsuleGcc.fdf b/Vlv2TbltDevicePkg/PlatformCapsuleGcc.fdf
index f4f396cf4e..b7ea8bf839 100644
--- a/Vlv2TbltDevicePkg/PlatformCapsuleGcc.fdf
+++ b/Vlv2TbltDevicePkg/PlatformCapsuleGcc.fdf
@@ -35,24 +35,10 @@ [FV.SystemFirmwareUpdateCargo]
     $(WORKSPACE)/$(OUTPUT_DIRECTORY)/$(TARGET)_$(TOOL_CHAIN_TAG)/FV/Vlv.ROM
   }
 
-FILE RAW = ce57b167-b0e4-41e8-a897-5f4feb781d40 { # gEdkiiSystemFmpCapsuleDriverFvFileGuid
-    $(WORKSPACE)/$(OUTPUT_DIRECTORY)/$(TARGET)_$(TOOL_CHAIN_TAG)/FV/CAPSULEDISPATCHFV.Fv
-  }
-
 FILE RAW = 812136D3-4D3A-433A-9418-29BB9BF78F6E { # gEdkiiSystemFmpCapsuleConfigFileGuid
     Vlv2TbltDevicePkg/Feature/Capsule/SystemFirmwareUpdateConfig/SystemFirmwareUpdateConfigGcc.ini
   }
 
-[FmpPayload.FmpPayloadSystemFirmwarePkcs7]
-IMAGE_HEADER_INIT_VERSION = 0x02
-IMAGE_TYPE_ID             = 4096267b-da0a-42eb-b5eb-fef31d207cb4 # PcdSystemFmpCapsuleImageTypeIdGuid
-IMAGE_INDEX               = 0x1
-HARDWARE_INSTANCE         = 0x0
-MONOTONIC_COUNT           = 0x2
-CERTIFICATE_GUID          = 4AAFD29D-68DF-49EE-8AA9-347D375665A7 # PKCS7
-
-FILE DATA = $(WORKSPACE)/$(OUTPUT_DIRECTORY)/$(TARGET)_$(TOOL_CHAIN_TAG)/FV/SYSTEMFIRMWAREUPDATECARGO.Fv
-
 [FmpPayload.FmpPayloadSystemFirmwareRsa2048]
 IMAGE_HEADER_INIT_VERSION = 0x02
 IMAGE_TYPE_ID             = 4096267b-da0a-42eb-b5eb-fef31d207cb4 # PcdSystemFmpCapsuleImageTypeIdGuid
@@ -63,14 +49,6 @@ [FmpPayload.FmpPayloadSystemFirmwareRsa2048]
 
 FILE DATA = $(WORKSPACE)/$(OUTPUT_DIRECTORY)/$(TARGET)_$(TOOL_CHAIN_TAG)/FV/SYSTEMFIRMWAREUPDATECARGO.Fv
 
-[Capsule.Vlv2FirmwareUpdateCapsuleFmpPkcs7]
-CAPSULE_GUID                = 6dcbd5ed-e82d-4c44-bda1-7194199ad92a # gEfiFmpCapsuleGuid
-CAPSULE_FLAGS               = PersistAcrossReset,InitiateReset
-CAPSULE_HEADER_SIZE         = 0x20
-CAPSULE_HEADER_INIT_VERSION = 0x1
-
-FMP_PAYLOAD = FmpPayloadSystemFirmwarePkcs7
-
 [Capsule.Vlv2Rec]
 CAPSULE_GUID                = 6dcbd5ed-e82d-4c44-bda1-7194199ad92a # gEfiFmpCapsuleGuid
 CAPSULE_FLAGS               = PersistAcrossReset,InitiateReset
@@ -78,4 +56,3 @@ [Capsule.Vlv2Rec]
 CAPSULE_HEADER_INIT_VERSION = 0x1
 
 FMP_PAYLOAD = FmpPayloadSystemFirmwareRsa2048
-
diff --git a/Vlv2TbltDevicePkg/PlatformPkg.dec b/Vlv2TbltDevicePkg/PlatformPkg.dec
index 731fd05ed5..8fccd7f1b1 100644
--- a/Vlv2TbltDevicePkg/PlatformPkg.dec
+++ b/Vlv2TbltDevicePkg/PlatformPkg.dec
@@ -165,6 +165,11 @@ [PcdsFixedAtBuild]
   gPlatformModuleTokenSpaceGuid.PcdBiosRomBase|0xFFC00000|UINT32|0x4000000B
   gPlatformModuleTokenSpaceGuid.PcdBiosRomSize|0x00400000|UINT32|0x4000000C
 
+  # PCDs for System Firmware FMP instance
+  gPlatformModuleTokenSpaceGuid.PcdSystemFirmwareFmpLowestSupportedVersion|0x00000000|UINT32|0x40000100
+  gPlatformModuleTokenSpaceGuid.PcdSystemFirmwareFmpVersion|0x00000000|UINT32|0x40000101
+  gPlatformModuleTokenSpaceGuid.PcdSystemFirmwareFmpVersionString|""|VOID*|0x40000102
+
 [PcdsFeatureFlag]
   ## This PCD specifies whether StatusCode is reported via ISA Serial port.
   gEfiSerialPortTokenSpaceGuid.PcdStatusCodeUseIsaSerial|TRUE|BOOLEAN|0x00000020
diff --git a/Vlv2TbltDevicePkg/PlatformPkg.fdf b/Vlv2TbltDevicePkg/PlatformPkg.fdf
index 85309650db..b7a0e584de 100644
--- a/Vlv2TbltDevicePkg/PlatformPkg.fdf
+++ b/Vlv2TbltDevicePkg/PlatformPkg.fdf
@@ -242,7 +242,7 @@ [FV.MICROCODE_FV]
 READ_LOCK_STATUS   = TRUE
 
 FILE RAW = 197DB236-F856-4924-90F8-CDF12FB875F3 {
-  $(OUTPUT_DIRECTORY)\$(TARGET)_$(TOOL_CHAIN_TAG)\$(DXE_ARCHITECTURE)\MicrocodeUpdates.bin
+  $(OUTPUT_DIRECTORY)/$(TARGET)_$(TOOL_CHAIN_TAG)/$(DXE_ARCHITECTURE)/MicrocodeUpdates.bin
 }
 
 !if $(RECOVERY_ENABLE)
@@ -413,11 +413,6 @@ [FV.FVRECOVERY]
 
 INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf
 
-!if $(CAPSULE_ENABLE) || $(RECOVERY_ENABLE)
-  # FMP image decriptor
-INF RuleOverride = FMP_IMAGE_DESC Vlv2TbltDevicePkg/Feature/Capsule/SystemFirmwareDescriptor/SystemFirmwareDescriptor.inf
-!endif
-
 [FV.FVMAIN]
 BlockSize          = $(FLASH_BLOCK_SIZE)
 FvAlignment        = 16
@@ -775,14 +770,25 @@ [FV.FVMAIN]
   !endif
 !endif
 
-!if $(CAPSULE_ENABLE) || $(MICOCODE_CAPSULE_ENABLE)
+!if $(CAPSULE_ENABLE)
 INF  MdeModulePkg/Universal/EsrtFmpDxe/EsrtFmpDxe.inf
+
+#
+# Minnow Max System Firmware FMP
+#
+INF  FILE_GUID = $(FMP_MINNOW_MAX_SYSTEM) FmpDevicePkg/FmpDxe/FmpDxe.inf
+
+#
+# Sample Device FMP
+#
+INF  FILE_GUID = $(FMP_GREEN_SAMPLE_DEVICE) FmpDevicePkg/FmpDxe/FmpDxe.inf
+INF  FILE_GUID = $(FMP_BLUE_SAMPLE_DEVICE)  FmpDevicePkg/FmpDxe/FmpDxe.inf
+INF  FILE_GUID = $(FMP_RED_SAMPLE_DEVICE)   FmpDevicePkg/FmpDxe/FmpDxe.inf
+
 !endif
-!if $(CAPSULE_ENABLE)
-INF  SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareReportDxe.inf
-!endif
+
 !if $(MICOCODE_CAPSULE_ENABLE)
-INF  UefiCpuPkg/Feature/Capsule/MicrocodeUpdateDxe/MicrocodeUpdateDxe.inf
+INF  IntelSiliconPkg/Feature/Capsule/MicrocodeUpdateDxe/MicrocodeUpdateDxe.inf
 !endif
 
 !if $(RECOVERY_ENABLE)
@@ -792,13 +798,6 @@ [FV.FVMAIN]
      }
 !endif
 
-!if $(CAPSULE_ENABLE)
-FILE FREEFORM = PCD(gEfiSignedCapsulePkgTokenSpaceGuid.PcdEdkiiPkcs7TestPublicKeyFileGuid) {
-     SECTION RAW = BaseTools/Source/Python/Pkcs7Sign/TestRoot.cer
-     SECTION UI = "Pkcs7TestRoot"
-     }
-!endif
-
 [FV.FVMAIN_COMPACT]
 BlockSize          = $(FLASH_BLOCK_SIZE)
 FvAlignment        = 16
@@ -861,32 +860,6 @@ [FV.SETUP_DATA]
 READ_LOCK_CAP      = TRUE
 READ_LOCK_STATUS   = TRUE
 
-
-!if $(CAPSULE_ENABLE) || $(RECOVERY_ENABLE)
-[FV.CapsuleDispatchFv]
-FvAlignment        = 16
-ERASE_POLARITY     = 1
-MEMORY_MAPPED      = TRUE
-STICKY_WRITE       = TRUE
-LOCK_CAP           = TRUE
-LOCK_STATUS        = TRUE
-WRITE_DISABLED_CAP = TRUE
-WRITE_ENABLED_CAP  = TRUE
-WRITE_STATUS       = TRUE
-WRITE_LOCK_CAP     = TRUE
-WRITE_LOCK_STATUS  = TRUE
-READ_DISABLED_CAP  = TRUE
-READ_ENABLED_CAP   = TRUE
-READ_STATUS        = TRUE
-READ_LOCK_CAP      = TRUE
-READ_LOCK_STATUS   = TRUE
-
-!if $(CAPSULE_ENABLE)
-INF  SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareUpdateDxe.inf
-!endif
-
-!endif
-
 ################################################################################
 #
 # Rules are use with the [FV] section's module INF type to define
diff --git a/Vlv2TbltDevicePkg/PlatformPkgConfig.dsc b/Vlv2TbltDevicePkg/PlatformPkgConfig.dsc
index c93ca8a457..672853dda6 100644
--- a/Vlv2TbltDevicePkg/PlatformPkgConfig.dsc
+++ b/Vlv2TbltDevicePkg/PlatformPkgConfig.dsc
@@ -66,7 +66,7 @@
 DEFINE CAPSULE_ENABLE = TRUE
 DEFINE CAPSULE_RESET_ENABLE = TRUE
 DEFINE RECOVERY_ENABLE = FALSE
-DEFINE MICOCODE_CAPSULE_ENABLE = FALSE
+DEFINE MICOCODE_CAPSULE_ENABLE = TRUE
 
 DEFINE GOP_DRIVER_ENABLE = TRUE
 DEFINE DATAHUB_ENABLE = TRUE
@@ -94,6 +94,19 @@
 #
 DEFINE SOURCE_DEBUG_ENABLE     = FALSE
 
+#
+# Capsule Pubic Certificate.  Default is EDK_TEST.  Options are:
+#   SAMPLE_DEVELOPMENT                    - Only signtool SAMPLE_DEVELOPMENT
+#   SAMPLE_DEVELOPMENT_SAMPLE_PRODUCTION  - Both signtool SAMPLE_DEVELOPMENT and SAMPLE_PRODUCTION
+#   EDKII_TEST                            - Only openssl EDK II test certificate
+#   NEW_ROOT                              - Only openssl new VLV2 certificate
+#
+DEFINE CAPSULE_PKCS7_CERT = EDKII_TEST
 
-
-
+#
+# Define ESRT GUIDs for Firmware Management Protocol instances
+#
+DEFINE FMP_MINNOW_MAX_SYSTEM   = 4096267b-da0a-42eb-b5eb-fef31d207cb4
+DEFINE FMP_RED_SAMPLE_DEVICE   = 72E2945A-00DA-448E-9AA7-075AD840F9D4
+DEFINE FMP_BLUE_SAMPLE_DEVICE  = 149DA854-7D19-4FAA-A91E-862EA1324BE6
+DEFINE FMP_GREEN_SAMPLE_DEVICE = 79179BFD-704D-4C90-9E02-0AB8D968C18A
diff --git a/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf b/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
index 51a620ea15..eca273e33f 100644
--- a/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
+++ b/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
@@ -123,7 +123,6 @@ [FD.Vlv]
 $(FLASH_REGION_VLVMICROCODE_OFFSET)|$(FLASH_REGION_VLVMICROCODE_SIZE)
 gPlatformModuleTokenSpaceGuid.PcdFlashMicroCodeAddress|gPlatformModuleTokenSpaceGuid.PcdFlashMicroCodeSize
 FV = MICROCODE_FV
-
 $(FLASH_REGION_VPD_OFFSET)|$(FLASH_REGION_VPD_SIZE)
 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize
 FILE = $(WORKSPACE)/Vlv2TbltDevicePkg/Stitch/Gcc/NvStorageVariable.bin
@@ -370,11 +369,6 @@ [FV.FVRECOVERY]
 
 INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf
 
-!if $(CAPSULE_ENABLE) || $(RECOVERY_ENABLE)
-  # FMP image decriptor
-INF RuleOverride = FMP_IMAGE_DESC Vlv2TbltDevicePkg/Feature/Capsule/SystemFirmwareDescriptor/SystemFirmwareDescriptor.inf
-!endif
-
 [FV.FVMAIN]
 BlockSize          = $(FLASH_BLOCK_SIZE)
 FvAlignment        = 16
@@ -732,14 +726,25 @@ [FV.FVMAIN]
   !endif
 !endif
 
-!if $(CAPSULE_ENABLE) || $(MICOCODE_CAPSULE_ENABLE)
+!if $(CAPSULE_ENABLE)
 INF  MdeModulePkg/Universal/EsrtFmpDxe/EsrtFmpDxe.inf
+
+#
+# Minnow Max System Firmware FMP
+#
+INF  FILE_GUID = $(FMP_MINNOW_MAX_SYSTEM) FmpDevicePkg/FmpDxe/FmpDxe.inf
+
+#
+# Sample Device FMP
+#
+INF  FILE_GUID = $(FMP_GREEN_SAMPLE_DEVICE) FmpDevicePkg/FmpDxe/FmpDxe.inf
+INF  FILE_GUID = $(FMP_BLUE_SAMPLE_DEVICE)  FmpDevicePkg/FmpDxe/FmpDxe.inf
+INF  FILE_GUID = $(FMP_RED_SAMPLE_DEVICE)   FmpDevicePkg/FmpDxe/FmpDxe.inf
+
 !endif
-!if $(CAPSULE_ENABLE)
-INF  SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareReportDxe.inf
-!endif
+
 !if $(MICOCODE_CAPSULE_ENABLE)
-INF  UefiCpuPkg/Feature/Capsule/MicrocodeUpdateDxe/MicrocodeUpdateDxe.inf
+INF  IntelSiliconPkg/Feature/Capsule/MicrocodeUpdateDxe/MicrocodeUpdateDxe.inf
 !endif
 
 !if $(RECOVERY_ENABLE)
@@ -748,13 +753,6 @@ [FV.FVMAIN]
      SECTION UI = "Rsa2048Sha256TestSigningPublicKey"
      }
 !endif
-     
-!if $(CAPSULE_ENABLE)
-FILE FREEFORM = PCD(gEfiSignedCapsulePkgTokenSpaceGuid.PcdEdkiiPkcs7TestPublicKeyFileGuid) {
-     SECTION RAW = BaseTools/Source/Python/Pkcs7Sign/TestRoot.cer
-     SECTION UI = "Pkcs7TestRoot"
-     }
-!endif
 
 [FV.FVMAIN_COMPACT]
 BlockSize          = $(FLASH_BLOCK_SIZE)
@@ -818,32 +816,6 @@ [FV.SETUP_DATA]
 READ_LOCK_CAP      = TRUE
 READ_LOCK_STATUS   = TRUE
 
-
-!if $(CAPSULE_ENABLE) || $(RECOVERY_ENABLE)
-[FV.CapsuleDispatchFv]
-FvAlignment        = 16
-ERASE_POLARITY     = 1
-MEMORY_MAPPED      = TRUE
-STICKY_WRITE       = TRUE
-LOCK_CAP           = TRUE
-LOCK_STATUS        = TRUE
-WRITE_DISABLED_CAP = TRUE
-WRITE_ENABLED_CAP  = TRUE
-WRITE_STATUS       = TRUE
-WRITE_LOCK_CAP     = TRUE
-WRITE_LOCK_STATUS  = TRUE
-READ_DISABLED_CAP  = TRUE
-READ_ENABLED_CAP   = TRUE
-READ_STATUS        = TRUE
-READ_LOCK_CAP      = TRUE
-READ_LOCK_STATUS   = TRUE
-
-!if $(CAPSULE_ENABLE)
-INF  SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareUpdateDxe.inf
-!endif
-
-!endif
-
 ################################################################################
 #
 # Rules are use with the [FV] section's module INF type to define
@@ -1086,4 +1058,3 @@ [Rule.Common.PEIM.FMP_IMAGE_DESC]
      UI       STRING="$(MODULE_NAME)" Optional
      VERSION  STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
   }
-
diff --git a/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc b/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
index 8b8a55ae6f..3e3522aee9 100644
--- a/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
+++ b/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
@@ -190,7 +190,6 @@ [LibraryClasses.common]
 !else
   CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
 !endif
-  EdkiiSystemCapsuleLib|SignedCapsulePkg/Library/EdkiiSystemCapsuleLib/EdkiiSystemCapsuleLib.inf
   FmpAuthenticationLib|MdeModulePkg/Library/FmpAuthenticationLibNull/FmpAuthenticationLibNull.inf
   IniParsingLib|SignedCapsulePkg/Library/IniParsingLib/IniParsingLib.inf
   PlatformFlashAccessLib|Vlv2TbltDevicePkg/Feature/Capsule/Library/PlatformFlashAccessLib/PlatformFlashAccessLib.inf
@@ -336,7 +335,7 @@ [LibraryClasses.IA32.PEIM, LibraryClasses.IA32.PEI_CORE, LibraryClasses.IA32.SEC
   DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
   SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull.inf
 !else
-  DebugLib|IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf
+  DebugLib|MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf
   SerialPortLib|$(PLATFORM_PACKAGE)/Library/SerialPortLib/SerialPortLib.inf
 !endif
 
@@ -706,7 +705,23 @@ [PcdsFixedAtBuild.common]
   #
   gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmStackSize|0x4000
 
-[PcdsFixedAtBuild.IA32.PEIM, PcdsFixedAtBuild.IA32.PEI_CORE, PcdsFixedAtBuild.IA32.SEC]
+  #
+  # Clear unused single certificate PCD
+  #
+  gEfiSecurityPkgTokenSpaceGuid.PcdPkcs7CertBuffer|{0}
+
+  #
+  # Lock all updatable firmware devices at End of DXE
+  #
+  gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceLockEventGuid|{GUID(gEfiEndOfDxeEventGroupGuid)}
+#  gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceLockEventGuid|{GUID(gEfiEventReadyToBootGuid)}
+
+  #
+  # Set PcdFmpDeviceTestKeySha256Digest to {0} to disable test key detection
+  #
+#  gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceTestKeySha256Digest|{0}
+
+[PcdsFixedAtBuild.IA32]
 !if $(TARGET) == RELEASE
   gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x0
   gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x3
@@ -910,10 +925,10 @@ [PcdsDynamicExDefault.common.DEFAULT]
   gEfiVLVTokenSpaceGuid.PcdCpuSmramCpuDataAddress|0
   gEfiVLVTokenSpaceGuid.PcdCpuLockBoxSize|0
 
-!if $(CAPSULE_ENABLE) || $(RECOVERY_ENABLE)
-  gEfiSignedCapsulePkgTokenSpaceGuid.PcdEdkiiSystemFirmwareImageDescriptor|{0x0}|VOID*|0x100
-  gEfiMdeModulePkgTokenSpaceGuid.PcdSystemFmpCapsuleImageTypeIdGuid|{0x7b, 0x26, 0x96, 0x40, 0x0a, 0xda, 0xeb, 0x42, 0xb5, 0xeb, 0xfe, 0xf3, 0x1d, 0x20, 0x7c, 0xb4}
-  gEfiSignedCapsulePkgTokenSpaceGuid.PcdEdkiiSystemFirmwareFileGuid|{0xb2, 0x9e, 0x9c, 0xaf, 0xad, 0x12, 0x3e, 0x4d, 0xa4, 0xd4, 0x96, 0xf6, 0xc9, 0x96, 0x62, 0x15}
+[PcdsDynamicExDefault.X64.DEFAULT]
+!if $(RECOVERY_ENABLE)
+  gEfiSignedCapsulePkgTokenSpaceGuid.PcdEdkiiSystemFirmwareFileGuid|{GUID("AF9C9EB2-12AD-4D3E-A4D4-96F6C9966215")}|VOID*|0x10
+  gEfiMdeModulePkgTokenSpaceGuid.PcdSystemFmpCapsuleImageTypeIdGuid|{GUID("4096267b-da0a-42eb-b5eb-fef31d207cb4")}|VOID*|0x10
 !endif
 
 [Components.IA32]
@@ -937,14 +952,6 @@ [Components.IA32]
   }
   !endif
 
-!if $(CAPSULE_ENABLE) || $(RECOVERY_ENABLE)
-  # FMP image decriptor
-  Vlv2TbltDevicePkg/Feature/Capsule/SystemFirmwareDescriptor/SystemFirmwareDescriptor.inf {
-    <LibraryClasses>
-      PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
-  }
-!endif
-
   MdeModulePkg/Core/Pei/PeiMain.inf {
 !if $(TARGET) == DEBUG
     <PcdsFixedAtBuild>
@@ -1199,11 +1206,6 @@ [Components.X64]
       DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
       PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
       SerialPortLib|$(PLATFORM_PACKAGE)/Library/SerialPortLib/SerialPortLib.inf
-!if $(CAPSULE_ENABLE)
-      FmpAuthenticationLib|SecurityPkg/Library/FmpAuthenticationLibPkcs7/FmpAuthenticationLibPkcs7.inf
-!else
-      FmpAuthenticationLib|MdeModulePkg/Library/FmpAuthenticationLibNull/FmpAuthenticationLibNull.inf
-!endif
     !if $(FTPM_ENABLE) == TRUE
       Tpm2DeviceLib|Vlv2TbltDevicePkg/Library/Tpm2DeviceLibSeCDxe/Tpm2DeviceLibSeC.inf
     !else
@@ -1572,32 +1574,20 @@ [Components.X64]
     !endif
 !endif
 
-  Vlv2TbltDevicePkg/Application/FirmwareUpdate/FirmwareUpdate.inf
-
 !if $(CAPSULE_ENABLE) || $(MICOCODE_CAPSULE_ENABLE)
   MdeModulePkg/Universal/EsrtFmpDxe/EsrtFmpDxe.inf
   MdeModulePkg/Application/CapsuleApp/CapsuleApp.inf
 !endif
 
 !if $(CAPSULE_ENABLE)
-  SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareReportDxe.inf {
-    <LibraryClasses>
-      DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
-      PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
-      SerialPortLib|$(PLATFORM_PACKAGE)/Library/SerialPortLib/SerialPortLib.inf
-      FmpAuthenticationLib|SecurityPkg/Library/FmpAuthenticationLibPkcs7/FmpAuthenticationLibPkcs7.inf
-  }
-  SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareUpdateDxe.inf {
-    <LibraryClasses>
-      DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
-      PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
-      SerialPortLib|$(PLATFORM_PACKAGE)/Library/SerialPortLib/SerialPortLib.inf
-      FmpAuthenticationLib|SecurityPkg/Library/FmpAuthenticationLibPkcs7/FmpAuthenticationLibPkcs7.inf
-  }
+  !include Vlv2TbltDevicePkg/FmpMinnowMaxSystem.dsc
+  !include Vlv2TbltDevicePkg/FmpGreenSampleDevice.dsc
+  !include Vlv2TbltDevicePkg/FmpBlueSampleDevice.dsc
+  !include Vlv2TbltDevicePkg/FmpRedSampleDevice.dsc
 !endif
 
 !if $(MICOCODE_CAPSULE_ENABLE)
-  UefiCpuPkg/Feature/Capsule/MicrocodeUpdateDxe/MicrocodeUpdateDxe.inf {
+  IntelSiliconPkg/Feature/Capsule/MicrocodeUpdateDxe/MicrocodeUpdateDxe.inf {
     <LibraryClasses>
       DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
       PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
@@ -1787,8 +1777,6 @@ [BuildOptions.Common.EDKII]
 
 
 [Components.X64]
- $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/SysFwUpdateCapsuleDxe.inf
-
   $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/I2cBus.inf {
     <PcdsPatchableInModule>
       gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0xF0000043
diff --git a/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc b/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
index cbdfb1b83a..55c873d565 100644
--- a/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
+++ b/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
@@ -190,7 +190,6 @@ [LibraryClasses.common]
 !else
   CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
 !endif
-  EdkiiSystemCapsuleLib|SignedCapsulePkg/Library/EdkiiSystemCapsuleLib/EdkiiSystemCapsuleLib.inf
   FmpAuthenticationLib|MdeModulePkg/Library/FmpAuthenticationLibNull/FmpAuthenticationLibNull.inf
   IniParsingLib|SignedCapsulePkg/Library/IniParsingLib/IniParsingLib.inf
   PlatformFlashAccessLib|Vlv2TbltDevicePkg/Feature/Capsule/Library/PlatformFlashAccessLib/PlatformFlashAccessLib.inf
@@ -706,7 +705,23 @@ [PcdsFixedAtBuild.common]
   #
   gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmStackSize|0x4000
 
-[PcdsFixedAtBuild.IA32.PEIM, PcdsFixedAtBuild.IA32.PEI_CORE, PcdsFixedAtBuild.IA32.SEC]
+  #
+  # Clear unused single certificate PCD
+  #
+  gEfiSecurityPkgTokenSpaceGuid.PcdPkcs7CertBuffer|{0}
+
+  #
+  # Lock all updatable firmware devices at End of DXE
+  #
+  gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceLockEventGuid|{GUID(gEfiEndOfDxeEventGroupGuid)}
+#  gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceLockEventGuid|{GUID(gEfiEventReadyToBootGuid)}
+
+  #
+  # Set PcdFmpDeviceTestKeySha256Digest to {0} to disable test key detection
+  #
+#  gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceTestKeySha256Digest|{0}
+
+[PcdsFixedAtBuild.IA32]
 !if $(TARGET) == RELEASE
   gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x0
   gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x3
@@ -910,10 +925,10 @@ [PcdsDynamicExDefault.common.DEFAULT]
   gEfiVLVTokenSpaceGuid.PcdCpuSmramCpuDataAddress|0
   gEfiVLVTokenSpaceGuid.PcdCpuLockBoxSize|0
 
-!if $(CAPSULE_ENABLE) || $(RECOVERY_ENABLE)
-  gEfiSignedCapsulePkgTokenSpaceGuid.PcdEdkiiSystemFirmwareImageDescriptor|{0x0}|VOID*|0x100
-  gEfiMdeModulePkgTokenSpaceGuid.PcdSystemFmpCapsuleImageTypeIdGuid|{0x7b, 0x26, 0x96, 0x40, 0x0a, 0xda, 0xeb, 0x42, 0xb5, 0xeb, 0xfe, 0xf3, 0x1d, 0x20, 0x7c, 0xb4}
-  gEfiSignedCapsulePkgTokenSpaceGuid.PcdEdkiiSystemFirmwareFileGuid|{0xb2, 0x9e, 0x9c, 0xaf, 0xad, 0x12, 0x3e, 0x4d, 0xa4, 0xd4, 0x96, 0xf6, 0xc9, 0x96, 0x62, 0x15}
+[PcdsDynamicExDefault.X64.DEFAULT]
+!if $(RECOVERY_ENABLE)
+  gEfiSignedCapsulePkgTokenSpaceGuid.PcdEdkiiSystemFirmwareFileGuid|{GUID("AF9C9EB2-12AD-4D3E-A4D4-96F6C9966215")}|VOID*|0x10
+  gEfiMdeModulePkgTokenSpaceGuid.PcdSystemFmpCapsuleImageTypeIdGuid|{GUID("4096267b-da0a-42eb-b5eb-fef31d207cb4")}|VOID*|0x10
 !endif
 
 [Components.IA32]
@@ -937,14 +952,6 @@ [Components.IA32]
   }
   !endif
 
-!if $(CAPSULE_ENABLE) || $(RECOVERY_ENABLE)
-  # FMP image decriptor
-  Vlv2TbltDevicePkg/Feature/Capsule/SystemFirmwareDescriptor/SystemFirmwareDescriptor.inf {
-    <LibraryClasses>
-      PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
-  }
-!endif
-
   MdeModulePkg/Core/Pei/PeiMain.inf {
 !if $(TARGET) == DEBUG
     <PcdsFixedAtBuild>
@@ -1187,11 +1194,6 @@ [Components.IA32]
       DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
       PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
       SerialPortLib|$(PLATFORM_PACKAGE)/Library/SerialPortLib/SerialPortLib.inf
-!if $(CAPSULE_ENABLE)
-      FmpAuthenticationLib|SecurityPkg/Library/FmpAuthenticationLibPkcs7/FmpAuthenticationLibPkcs7.inf
-!else
-      FmpAuthenticationLib|MdeModulePkg/Library/FmpAuthenticationLibNull/FmpAuthenticationLibNull.inf
-!endif
     !if $(FTPM_ENABLE) == TRUE
       Tpm2DeviceLib|Vlv2TbltDevicePkg/Library/Tpm2DeviceLibSeCDxe/Tpm2DeviceLibSeC.inf
     !else
@@ -1560,32 +1562,20 @@ [Components.IA32]
     !endif
 !endif
 
-  Vlv2TbltDevicePkg/Application/FirmwareUpdate/FirmwareUpdate.inf
-
 !if $(CAPSULE_ENABLE) || $(MICOCODE_CAPSULE_ENABLE)
   MdeModulePkg/Universal/EsrtFmpDxe/EsrtFmpDxe.inf
   MdeModulePkg/Application/CapsuleApp/CapsuleApp.inf
 !endif
 
 !if $(CAPSULE_ENABLE)
-  SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareReportDxe.inf {
-    <LibraryClasses>
-      DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
-      PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
-      SerialPortLib|$(PLATFORM_PACKAGE)/Library/SerialPortLib/SerialPortLib.inf
-      FmpAuthenticationLib|SecurityPkg/Library/FmpAuthenticationLibPkcs7/FmpAuthenticationLibPkcs7.inf
-  }
-  SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareUpdateDxe.inf {
-    <LibraryClasses>
-      DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
-      PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
-      SerialPortLib|$(PLATFORM_PACKAGE)/Library/SerialPortLib/SerialPortLib.inf
-      FmpAuthenticationLib|SecurityPkg/Library/FmpAuthenticationLibPkcs7/FmpAuthenticationLibPkcs7.inf
-  }
+  !include Vlv2TbltDevicePkg/FmpMinnowMaxSystem.dsc
+  !include Vlv2TbltDevicePkg/FmpGreenSampleDevice.dsc
+  !include Vlv2TbltDevicePkg/FmpBlueSampleDevice.dsc
+  !include Vlv2TbltDevicePkg/FmpRedSampleDevice.dsc
 !endif
 
 !if $(MICOCODE_CAPSULE_ENABLE)
-  UefiCpuPkg/Feature/Capsule/MicrocodeUpdateDxe/MicrocodeUpdateDxe.inf {
+  IntelSiliconPkg/Feature/Capsule/MicrocodeUpdateDxe/MicrocodeUpdateDxe.inf {
     <LibraryClasses>
       DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
       PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
@@ -1776,8 +1766,6 @@ [BuildOptions.Common.EDKII]
 
 
 [Components.IA32]
- $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/SysFwUpdateCapsuleDxe.inf
-
   $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/I2cBus.inf {
     <PcdsPatchableInModule>
       gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0xF0000043
diff --git a/Vlv2TbltDevicePkg/PlatformPkgX64.dsc b/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
index 6396f7aad4..fa6aa63491 100644
--- a/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
+++ b/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
@@ -190,7 +190,6 @@ [LibraryClasses.common]
 !else
   CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
 !endif
-  EdkiiSystemCapsuleLib|SignedCapsulePkg/Library/EdkiiSystemCapsuleLib/EdkiiSystemCapsuleLib.inf
   FmpAuthenticationLib|MdeModulePkg/Library/FmpAuthenticationLibNull/FmpAuthenticationLibNull.inf
   IniParsingLib|SignedCapsulePkg/Library/IniParsingLib/IniParsingLib.inf
   PlatformFlashAccessLib|Vlv2TbltDevicePkg/Feature/Capsule/Library/PlatformFlashAccessLib/PlatformFlashAccessLib.inf
@@ -706,6 +705,22 @@ [PcdsFixedAtBuild.common]
   #
   gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmStackSize|0x4000
 
+  #
+  # Clear unused single certificate PCD
+  #
+  gEfiSecurityPkgTokenSpaceGuid.PcdPkcs7CertBuffer|{0}
+
+  #
+  # Lock all updatable firmware devices at End of DXE
+  #
+  gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceLockEventGuid|{GUID(gEfiEndOfDxeEventGroupGuid)}
+#  gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceLockEventGuid|{GUID(gEfiEventReadyToBootGuid)}
+
+  #
+  # Set PcdFmpDeviceTestKeySha256Digest to {0} to disable test key detection
+  #
+#  gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceTestKeySha256Digest|{0}
+
 [PcdsFixedAtBuild.IA32]
 !if $(TARGET) == RELEASE
   gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x0
@@ -910,10 +925,10 @@ [PcdsDynamicExDefault.common.DEFAULT]
   gEfiVLVTokenSpaceGuid.PcdCpuSmramCpuDataAddress|0
   gEfiVLVTokenSpaceGuid.PcdCpuLockBoxSize|0
 
-!if $(CAPSULE_ENABLE) || $(RECOVERY_ENABLE)
-  gEfiSignedCapsulePkgTokenSpaceGuid.PcdEdkiiSystemFirmwareImageDescriptor|{0x0}|VOID*|0x100
-  gEfiMdeModulePkgTokenSpaceGuid.PcdSystemFmpCapsuleImageTypeIdGuid|{0x7b, 0x26, 0x96, 0x40, 0x0a, 0xda, 0xeb, 0x42, 0xb5, 0xeb, 0xfe, 0xf3, 0x1d, 0x20, 0x7c, 0xb4}
-  gEfiSignedCapsulePkgTokenSpaceGuid.PcdEdkiiSystemFirmwareFileGuid|{0xb2, 0x9e, 0x9c, 0xaf, 0xad, 0x12, 0x3e, 0x4d, 0xa4, 0xd4, 0x96, 0xf6, 0xc9, 0x96, 0x62, 0x15}
+[PcdsDynamicExDefault.X64.DEFAULT]
+!if $(RECOVERY_ENABLE)
+  gEfiSignedCapsulePkgTokenSpaceGuid.PcdEdkiiSystemFirmwareFileGuid|{GUID("AF9C9EB2-12AD-4D3E-A4D4-96F6C9966215")}|VOID*|0x10
+  gEfiMdeModulePkgTokenSpaceGuid.PcdSystemFmpCapsuleImageTypeIdGuid|{GUID("4096267b-da0a-42eb-b5eb-fef31d207cb4")}|VOID*|0x10
 !endif
 
 [Components.IA32]
@@ -937,14 +952,6 @@ [Components.IA32]
   }
   !endif
 
-!if $(CAPSULE_ENABLE) || $(RECOVERY_ENABLE)
-  # FMP image decriptor
-  Vlv2TbltDevicePkg/Feature/Capsule/SystemFirmwareDescriptor/SystemFirmwareDescriptor.inf {
-    <LibraryClasses>
-      PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
-  }
-!endif
-
   MdeModulePkg/Core/Pei/PeiMain.inf {
 !if $(TARGET) == DEBUG
     <PcdsFixedAtBuild>
@@ -1199,11 +1206,6 @@ [Components.X64]
       DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
       PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
       SerialPortLib|$(PLATFORM_PACKAGE)/Library/SerialPortLib/SerialPortLib.inf
-!if $(CAPSULE_ENABLE)
-      FmpAuthenticationLib|SecurityPkg/Library/FmpAuthenticationLibPkcs7/FmpAuthenticationLibPkcs7.inf
-!else
-      FmpAuthenticationLib|MdeModulePkg/Library/FmpAuthenticationLibNull/FmpAuthenticationLibNull.inf
-!endif
     !if $(FTPM_ENABLE) == TRUE
       Tpm2DeviceLib|Vlv2TbltDevicePkg/Library/Tpm2DeviceLibSeCDxe/Tpm2DeviceLibSeC.inf
     !else
@@ -1572,32 +1574,20 @@ [Components.X64]
     !endif
 !endif
 
-  Vlv2TbltDevicePkg/Application/FirmwareUpdate/FirmwareUpdate.inf
-
 !if $(CAPSULE_ENABLE) || $(MICOCODE_CAPSULE_ENABLE)
   MdeModulePkg/Universal/EsrtFmpDxe/EsrtFmpDxe.inf
   MdeModulePkg/Application/CapsuleApp/CapsuleApp.inf
 !endif
 
 !if $(CAPSULE_ENABLE)
-  SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareReportDxe.inf {
-    <LibraryClasses>
-      DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
-      PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
-      SerialPortLib|$(PLATFORM_PACKAGE)/Library/SerialPortLib/SerialPortLib.inf
-      FmpAuthenticationLib|SecurityPkg/Library/FmpAuthenticationLibPkcs7/FmpAuthenticationLibPkcs7.inf
-  }
-  SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareUpdateDxe.inf {
-    <LibraryClasses>
-      DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
-      PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
-      SerialPortLib|$(PLATFORM_PACKAGE)/Library/SerialPortLib/SerialPortLib.inf
-      FmpAuthenticationLib|SecurityPkg/Library/FmpAuthenticationLibPkcs7/FmpAuthenticationLibPkcs7.inf
-  }
+  !include Vlv2TbltDevicePkg/FmpMinnowMaxSystem.dsc
+  !include Vlv2TbltDevicePkg/FmpGreenSampleDevice.dsc
+  !include Vlv2TbltDevicePkg/FmpBlueSampleDevice.dsc
+  !include Vlv2TbltDevicePkg/FmpRedSampleDevice.dsc
 !endif
 
 !if $(MICOCODE_CAPSULE_ENABLE)
-  UefiCpuPkg/Feature/Capsule/MicrocodeUpdateDxe/MicrocodeUpdateDxe.inf {
+  IntelSiliconPkg/Feature/Capsule/MicrocodeUpdateDxe/MicrocodeUpdateDxe.inf {
     <LibraryClasses>
       DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
       PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
@@ -1788,8 +1778,6 @@ [BuildOptions.Common.EDKII]
 
 
 [Components.X64]
- $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/SysFwUpdateCapsuleDxe.inf
-
   $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/I2cBus.inf {
     <PcdsPatchableInModule>
       gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0xF0000043
-- 
2.14.2.windows.3



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [Patch 0/4] Vlv2TbltDevicePkg: Add FmpDevicePkg support
  2018-08-10  1:28 [Patch 0/4] Vlv2TbltDevicePkg: Add FmpDevicePkg support Michael D Kinney
                   ` (3 preceding siblings ...)
  2018-08-10  1:28 ` [Patch 4/4] Vlv2TbltDevicePkg: Update DSC/FDF to use FmpDevicePkg Michael D Kinney
@ 2018-08-10  6:25 ` Guo, Mang
  2018-08-14 14:59   ` Laszlo Ersek
  4 siblings, 1 reply; 8+ messages in thread
From: Guo, Mang @ 2018-08-10  6:25 UTC (permalink / raw)
  To: Kinney, Michael D, edk2-devel@lists.01.org; +Cc: Wei, David

Reviewed-by: Guo Mang <mang.guo@intel.com>


-----Original Message-----
From: Kinney, Michael D 
Sent: Friday, August 10, 2018 9:28 AM
To: edk2-devel@lists.01.org
Cc: Wei, David; Guo, Mang
Subject: [Patch 0/4] Vlv2TbltDevicePkg: Add FmpDevicePkg support

Update Vlv2TbltDevicePkg to build UEFI capsules for system firmare and device
firmware using the GenerateCapsule tool and use the FmpDevicePkg to implement
drivers that produce the Firmware Management Protocol to process UEFI capsules.

* Update Vlv2TbltDevicePkg specific BDS to notify when test key is detected.
* Add FmpDeviceLib instance for Minnow Max FLASH update
* Add FmpDeviceLib instance for sample devices
* Add scripts to generate UEFI Capsules for system and device firmware
* Update Vlv2TbltDevicePkg DSC/FDF to use FmpDevicePkg

Cc: David Wei <david.wei@intel.com>
Cc: Mang Guo <mang.guo@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>

Kinney, Michael D (1):
  Vlv2TbltDevicePkg/Override/Bds: Add test key notification

Michael D Kinney (3):
  Vlv2TbltDevicePkg/Feature/Capsule: Add FmpDeviceLib instances
  Vlv2TbltDevicePkg/Capsule: Add scripts to generate capsules
  Vlv2TbltDevicePkg: Update DSC/FDF to use FmpDevicePkg

 .../Capsule/GenerateCapsule/GenCapsuleAll.bat      |  35 ++
 .../GenerateCapsule/GenCapsuleMinnowMax.bat        | 139 +++++
 .../GenerateCapsule/GenCapsuleMinnowMaxRelease.bat | 139 +++++
 .../GenerateCapsule/GenCapsuleSampleColor.bat      | 145 +++++
 ...kenSpaceGuid.PcdFmpDevicePkcs7CertBufferXdr.inc |   1 +
 ...kenSpaceGuid.PcdFmpDevicePkcs7CertBufferXdr.inc |   1 +
 ...kenSpaceGuid.PcdFmpDevicePkcs7CertBufferXdr.inc |   1 +
 .../Capsule/Library/FmpDeviceLib/FmpDeviceLib.c    | 607 +++++++++++++++++++++
 .../Capsule/Library/FmpDeviceLib/FmpDeviceLib.inf  |  63 +++
 .../Library/FmpDeviceLibSample/FmpDeviceLib.c      | 429 +++++++++++++++
 .../Library/FmpDeviceLibSample/FmpDeviceLib.inf    |  51 ++
 Vlv2TbltDevicePkg/FmpBlueSampleDevice.dsc          |  61 +++
 Vlv2TbltDevicePkg/FmpCertificate.dsc               |  28 +
 Vlv2TbltDevicePkg/FmpGreenSampleDevice.dsc         |  61 +++
 Vlv2TbltDevicePkg/FmpMinnowMaxSystem.dsc           |  65 +++
 Vlv2TbltDevicePkg/FmpRedSampleDevice.dsc           |  61 +++
 .../Library/GenericBdsLib/BdsConsole.c             |  11 +
 .../Library/GenericBdsLib/GenericBdsLib.inf        |   1 +
 Vlv2TbltDevicePkg/PlatformCapsule.dsc              |   1 +
 Vlv2TbltDevicePkg/PlatformCapsule.fdf              |  23 -
 Vlv2TbltDevicePkg/PlatformCapsuleGcc.fdf           |  23 -
 Vlv2TbltDevicePkg/PlatformPkg.dec                  |   5 +
 Vlv2TbltDevicePkg/PlatformPkg.fdf                  |  61 +--
 Vlv2TbltDevicePkg/PlatformPkgConfig.dsc            |  19 +-
 Vlv2TbltDevicePkg/PlatformPkgGcc.fdf               |  61 +--
 Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc            |  66 +--
 Vlv2TbltDevicePkg/PlatformPkgIA32.dsc              |  64 +--
 Vlv2TbltDevicePkg/PlatformPkgX64.dsc               |  62 +--
 28 files changed, 2032 insertions(+), 252 deletions(-)
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.bat
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMax.bat
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMaxRelease.bat
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleSampleColor.bat
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/NewRoot.cer.gFmpDevicePkgTokenSpaceGuid.PcdFmpDevicePkcs7CertBufferXdr.inc
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/SAMPLE_DEVELOPMENT.cer.gFmpDevicePkgTokenSpaceGuid.PcdFmpDevicePkcs7CertBufferXdr.inc
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/SAMPLE_DEVELOPMENT_SAMPLE_PRODUCTION.cer.gFmpDevicePkgTokenSpaceGuid.PcdFmpDevicePkcs7CertBufferXdr.inc
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/Library/FmpDeviceLib/FmpDeviceLib.c
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/Library/FmpDeviceLib/FmpDeviceLib.inf
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/Library/FmpDeviceLibSample/FmpDeviceLib.c
 create mode 100644 Vlv2TbltDevicePkg/Feature/Capsule/Library/FmpDeviceLibSample/FmpDeviceLib.inf
 create mode 100644 Vlv2TbltDevicePkg/FmpBlueSampleDevice.dsc
 create mode 100644 Vlv2TbltDevicePkg/FmpCertificate.dsc
 create mode 100644 Vlv2TbltDevicePkg/FmpGreenSampleDevice.dsc
 create mode 100644 Vlv2TbltDevicePkg/FmpMinnowMaxSystem.dsc
 create mode 100644 Vlv2TbltDevicePkg/FmpRedSampleDevice.dsc

-- 
2.14.2.windows.3



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Patch 0/4] Vlv2TbltDevicePkg: Add FmpDevicePkg support
  2018-08-10  6:25 ` [Patch 0/4] Vlv2TbltDevicePkg: Add FmpDevicePkg support Guo, Mang
@ 2018-08-14 14:59   ` Laszlo Ersek
  2018-08-14 18:32     ` Kinney, Michael D
  0 siblings, 1 reply; 8+ messages in thread
From: Laszlo Ersek @ 2018-08-14 14:59 UTC (permalink / raw)
  To: Guo, Mang, Kinney, Michael D, edk2-devel@lists.01.org
  Cc: Wei, David, Leif Lindholm (Linaro address)

Hi,

On 08/10/18 08:25, Guo, Mang wrote:
> Reviewed-by: Guo Mang <mang.guo@intel.com>

please consider the diffstat on this patch set:

>  28 files changed, 2032 insertions(+), 252 deletions(-)

May I ask why this patch set has been committed during the quiet period,
before the upcoming stable tag? See "[edk2] EDK II Stable Tag release
edk2-stable201808 and quiet period starting today":

https://lists.01.org/pipermail/edk2-devel/2018-August/028210.html

On 08/08/18 16:16, Kinney, Michael D wrote:
> I recommend we target 8/15/2018 and start a quiet period
> on edk2/master starting today.  This means critical bug
> fixes only on edk2/master.  New features and large changes
> should be held until the edk2-stable201808 tag is created.

Based on the diffstat, this series is not a "critical bugfix" (the blurb
bears the subject "Vlv2TbltDevicePkg: Add FmpDevicePkg support").

The quiet period / stable tags don't make much sense if we don't honor
them.

Laszlo


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Patch 0/4] Vlv2TbltDevicePkg: Add FmpDevicePkg support
  2018-08-14 14:59   ` Laszlo Ersek
@ 2018-08-14 18:32     ` Kinney, Michael D
  0 siblings, 0 replies; 8+ messages in thread
From: Kinney, Michael D @ 2018-08-14 18:32 UTC (permalink / raw)
  To: Laszlo Ersek, Guo, Mang, edk2-devel@lists.01.org,
	Kinney, Michael D
  Cc: Wei, David, Leif Lindholm (Linaro address)

Hi Laszlo,

I should have entered a Bugzilla for this item so I 
could clearly document why this is required before
the stable tag and sent email to edk2-devel to inform
everyone that this Bugzilla should be considered for
the stable tag release to give the community a chance
to vote if it should be allowed or not. 

One feature that has been added for this stable tag
is the FmpDevicePkg and the GenerateCapsule tool.
These work together to provide a simpler method to
generate and process UEFI capsules for firmware updates.

I am using the platform in the Vlv2TbltDevicePkg to
demonstrate the use of this feature.  I am adding
Wiki pages on this feature that will reference this
platform with functional examples.

I had hoped I could get this content in before the
start of the quiet period, but I missed the window.

Thanks,

Mike

> -----Original Message-----
> From: Laszlo Ersek [mailto:lersek@redhat.com]
> Sent: Tuesday, August 14, 2018 7:59 AM
> To: Guo, Mang <mang.guo@intel.com>; Kinney, Michael D
> <michael.d.kinney@intel.com>; edk2-devel@lists.01.org
> Cc: Wei, David <david.wei@intel.com>; Leif Lindholm
> (Linaro address) <leif.lindholm@linaro.org>
> Subject: Re: [edk2] [Patch 0/4] Vlv2TbltDevicePkg: Add
> FmpDevicePkg support
> 
> Hi,
> 
> On 08/10/18 08:25, Guo, Mang wrote:
> > Reviewed-by: Guo Mang <mang.guo@intel.com>
> 
> please consider the diffstat on this patch set:
> 
> >  28 files changed, 2032 insertions(+), 252
> deletions(-)
> 
> May I ask why this patch set has been committed during
> the quiet period,
> before the upcoming stable tag? See "[edk2] EDK II
> Stable Tag release
> edk2-stable201808 and quiet period starting today":
> 
> https://lists.01.org/pipermail/edk2-devel/2018-
> August/028210.html
> 
> On 08/08/18 16:16, Kinney, Michael D wrote:
> > I recommend we target 8/15/2018 and start a quiet
> period
> > on edk2/master starting today.  This means critical
> bug
> > fixes only on edk2/master.  New features and large
> changes
> > should be held until the edk2-stable201808 tag is
> created.
> 
> Based on the diffstat, this series is not a "critical
> bugfix" (the blurb
> bears the subject "Vlv2TbltDevicePkg: Add FmpDevicePkg
> support").
> 
> The quiet period / stable tags don't make much sense if
> we don't honor
> them.
> 
> Laszlo

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-08-14 18:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-10  1:28 [Patch 0/4] Vlv2TbltDevicePkg: Add FmpDevicePkg support Michael D Kinney
2018-08-10  1:28 ` [Patch 1/4] Vlv2TbltDevicePkg/Override/Bds: Add test key notification Michael D Kinney
2018-08-10  1:28 ` [Patch 2/4] Vlv2TbltDevicePkg/Feature/Capsule: Add FmpDeviceLib instances Michael D Kinney
2018-08-10  1:28 ` [Patch 3/4] Vlv2TbltDevicePkg/Capsule: Add scripts to generate capsules Michael D Kinney
2018-08-10  1:28 ` [Patch 4/4] Vlv2TbltDevicePkg: Update DSC/FDF to use FmpDevicePkg Michael D Kinney
2018-08-10  6:25 ` [Patch 0/4] Vlv2TbltDevicePkg: Add FmpDevicePkg support Guo, Mang
2018-08-14 14:59   ` Laszlo Ersek
2018-08-14 18:32     ` Kinney, Michael D

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox