--- /dev/null
+/** @file\r
+ Define PPI to shadow Firmware Volume from flash to Permanent Memory.\r
+\r
+Copyright (c) 2023, Intel Corporation. All rights reserved.<BR>\r
+\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
+\r
+**/\r
+\r
+#ifndef PEI_FIRMWARE_VOLUME_SHADOW_PPI_H_\r
+#define PEI_FIRMWARE_VOLUME_SHADOW_PPI_H_\r
+\r
+//\r
+// Firmware Volume Shadow PPI GUID value\r
+//\r
+#define EDKII_FIRMWARE_VOLUME_SHADOW_PPI_GUID \\r
+ { \\r
+ 0x7dfe756c, 0xed8d, 0x4d77, { 0x9e, 0xc4, 0x39, 0x9a, 0x8a, 0x81, 0x51, 0x16 } \\r
+ }\r
+\r
+/**\r
+ Copy FV to Destination. Length of copy is FV length from FV Header.\r
+\r
+ @param[in] FirmwareVolumeBase Base address of FV to shadow. Length of FV\r
+ is in FV Header.\r
+ @param[in] Destination Pointer to the Buffer in system memory to\r
+ shadow FV.\r
+ @param[in] DestinationLength Size of Destination buffer in bytes.\r
+\r
+ @retval EFI_SUCCESS Shadow complete\r
+ @retval EFI_INVALID_PARAMETER Destination is NULL\r
+ @retval EFI_INVALID_PARAMETER DestinationLength = 0.\r
+ @retval EFI_INVALID_PARAMETER FV does not have valid FV Header.\r
+ @retval EFI_INVALID_PARAMETER FV overlaps Destination.\r
+ @retval EFI_INVALID_PARAMETER Destination + DestinationLength rolls over 4GB\r
+ for 32-bit or 64-bit rollover.\r
+ @retval EFI_BUFFER_TOO_SMALL DestinationLength less than FV length from FV\r
+ Header.\r
+ @retval EFI_UNSUPPORTED FirmwareVolumeBase to FVBase + FVLength does\r
+ not support shadow. Caller should fallback to\r
+ CopyMem().\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EDKII_PEI_FIRMWARE_VOLUME_SHADOW)(\r
+ IN EFI_PHYSICAL_ADDRESS FirmwareVolumeBase,\r
+ IN VOID *Destination,\r
+ IN UINTN DestinationLength\r
+ );\r
+\r
+///\r
+/// This PPI provides a service to shadow a FV from one location to another\r
+///\r
+typedef struct {\r
+ EDKII_PEI_FIRMWARE_VOLUME_SHADOW FirmwareVolumeShadow;\r
+} EDKII_PEI_FIRMWARE_VOLUME_SHADOW_PPI;\r
+\r
+extern EFI_GUID gEdkiiPeiFirmwareVolumeShadowPpiGuid;\r
+\r
+#endif\r
gBootDiscoveryPolicyMgrFormsetGuid = { 0x5b6f7107, 0xbb3c, 0x4660, { 0x92, 0xcd, 0x54, 0x26, 0x90, 0x28, 0x0b, 0xbd } }\r
\r
[Ppis]\r
+ ## Include/Ppi/FirmwareVolumeShadowPpi.h\r
+ gEdkiiPeiFirmwareVolumeShadowPpiGuid = { 0x7dfe756c, 0xed8d, 0x4d77, {0x9e, 0xc4, 0x39, 0x9a, 0x8a, 0x81, 0x51, 0x16 } }\r
+\r
## Include/Ppi/AtaController.h\r
gPeiAtaControllerPpiGuid = { 0xa45e60d1, 0xc719, 0x44aa, { 0xb0, 0x7a, 0xaa, 0x77, 0x7f, 0x85, 0x90, 0x6d }}\r
\r