]> git.proxmox.com Git - mirror_edk2.git/blobdiff - FmpDevicePkg/FmpDevicePkg.dsc
FmpDevicePkg/FmpDxe: Add PcdFmpDeviceStorageAccessEnable
[mirror_edk2.git] / FmpDevicePkg / FmpDevicePkg.dsc
index 4e2bd8de3dcc1827f2e8c3cccb6ff6fcaa74c4e9..bf283b93ea9fbe5741c409f2b7728d74f8eb4f65 100644 (file)
   DEFINE SYSTEM_FMP_ESRT_GUID   = B461B3BD-E62A-4A71-841C-50BA4E500267\r
   DEFINE DEVICE_FMP_ESRT_GUID   = 226034C4-8B67-4536-8653-D6EE7CE5A316\r
 \r
+  #\r
+  # TRUE  - Build FmpDxe module for with storage access enabled\r
+  # FALSE - Build FmpDxe module for with storage access disabled\r
+  #\r
+  DEFINE DEVICE_FMP_STORAGE_ACCESS_ENABLE = TRUE\r
+\r
 [LibraryClasses]\r
   UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf\r
   UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf\r
       # FILE_GUID is used as ESRT GUID\r
       #\r
       FILE_GUID = $(DEVICE_FMP_ESRT_GUID)\r
+    <PcdsFeatureFlag>\r
+      gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceStorageAccessEnable|$(DEVICE_FMP_STORAGE_ACCESS_ENABLE)\r
     <PcdsFixedAtBuild>\r
+!if $(DEVICE_FMP_STORAGE_ACCESS_ENABLE) == FALSE\r
+      #\r
+      # Disable test key detection\r
+      #\r
+      gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceTestKeySha256Digest|{0}\r
+!endif\r
       #\r
       # Unicode name string that is used to populate FMP Image Descriptor for this capsule update module\r
       #\r
+!if $(DEVICE_FMP_STORAGE_ACCESS_ENABLE) == TRUE\r
       gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceImageIdName|L"Sample Firmware Device"\r
+!else\r
+      gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceImageIdName|L"Sample Firmware Device No Storage Access"\r
+!endif\r
       #\r
       # Certificates used to authenticate capsule update image\r
       #\r