FmpDevicePkg/FmpDxe: Add PcdFmpDeviceStorageAccessEnable

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1525

Add PCD PcdFmpDeviceStorageAccessEnable.  If this PCD is
TRUE, then the Firmware Management Protocol supports access
to the firmware storage device.  This is the default setting.
If FALSE, then Firmware Management Protocol services that
access the firmware storage device return EFI_UNSUPPORTED
except GetImageInfo().  Setting this value to FALSE produces
the smallest possible FmpDxe driver that still advertises the
updatable firmware component in the ESRT.

Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Eric Jin <eric.jin@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
Eric Jin
2019-07-26 15:45:19 +08:00
committed by Liming Gao
parent 278c3d48a7
commit 11d354945c
6 changed files with 54 additions and 0 deletions

View File

@@ -29,6 +29,12 @@
DEFINE SYSTEM_FMP_ESRT_GUID = B461B3BD-E62A-4A71-841C-50BA4E500267
DEFINE DEVICE_FMP_ESRT_GUID = 226034C4-8B67-4536-8653-D6EE7CE5A316
#
# TRUE - Build FmpDxe module for with storage access enabled
# FALSE - Build FmpDxe module for with storage access disabled
#
DEFINE DEVICE_FMP_STORAGE_ACCESS_ENABLE = TRUE
[LibraryClasses]
UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
@@ -118,11 +124,23 @@
# FILE_GUID is used as ESRT GUID
#
FILE_GUID = $(DEVICE_FMP_ESRT_GUID)
<PcdsFeatureFlag>
gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceStorageAccessEnable|$(DEVICE_FMP_STORAGE_ACCESS_ENABLE)
<PcdsFixedAtBuild>
!if $(DEVICE_FMP_STORAGE_ACCESS_ENABLE) == FALSE
#
# Disable test key detection
#
gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceTestKeySha256Digest|{0}
!endif
#
# Unicode name string that is used to populate FMP Image Descriptor for this capsule update module
#
!if $(DEVICE_FMP_STORAGE_ACCESS_ENABLE) == TRUE
gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceImageIdName|L"Sample Firmware Device"
!else
gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceImageIdName|L"Sample Firmware Device No Storage Access"
!endif
#
# Certificates used to authenticate capsule update image
#