]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/Pei/PeiMain.h
Enable PeiCore to dispatch the encapsulated fv images with depex expression. This...
[mirror_edk2.git] / MdeModulePkg / Core / Pei / PeiMain.h
index 61641b37e72821c17742390ac43174b78116a900..84d187ed97e409890a2a3f46a75fae6385936711 100644 (file)
@@ -53,6 +53,7 @@ Revision History
 #include <IndustryStandard/PeImage.h>\r
 #include <Library/PeiServicesTablePointerLib.h>\r
 #include <Library/MemoryAllocationLib.h>\r
+#include <Library/PeiPiLib.h>\r
 #include <Guid/FirmwareFileSystem2.h>\r
 #include <Guid/AprioriFileName.h>\r
 \r
@@ -98,6 +99,15 @@ typedef struct {
   BOOLEAN                             ScanFv;\r
 } PEI_CORE_FV_HANDLE;\r
 \r
+#define CACHE_SETION_MAX_NUMBER       0x10\r
+typedef struct {\r
+  EFI_COMMON_SECTION_HEADER*          Section[CACHE_SETION_MAX_NUMBER];\r
+  VOID*                               SectionData[CACHE_SETION_MAX_NUMBER];\r
+  UINTN                               SectionSize[CACHE_SETION_MAX_NUMBER];\r
+  UINTN                               AllSectionCount;\r
+  UINTN                               SectionIndex;\r
+} CACHE_SECTION_DATA;\r
+\r
 //\r
 // Pei Core private data structure instance\r
 //\r
@@ -130,6 +140,7 @@ typedef struct{
   UINTN                              SizeOfCacheAsRam;\r
   VOID                               *MaxTopOfCarHeap;\r
   EFI_PEI_PPI_DESCRIPTOR             *XipLoadFile;\r
+  CACHE_SECTION_DATA                 CacheSection;\r
 } PEI_CORE_INSTANCE;\r
 \r
 //\r
@@ -1379,4 +1390,23 @@ Returns:
 --*/      \r
 ;\r
 \r
+/**\r
+  Get Fv image from the FV type file, then install FV INFO ppi, Build FV hob.\r
+\r
+       @param PeiServices          Pointer to the PEI Core Services Table.\r
+       @param FileHandle               File handle of a Fv type file.\r
+  @param AuthenticationState  Pointer to attestation authentication state of image.\r
+\r
+  \r
+  @retval EFI_NOT_FOUND                                FV image can't be found.\r
+  @retval EFI_SUCCESS                                          Successfully to process it.\r
+\r
+**/\r
+EFI_STATUS\r
+ProcessFvFile (\r
+  IN  EFI_PEI_SERVICES      **PeiServices,\r
+  IN  EFI_PEI_FILE_HANDLE   FvFileHandle,\r
+  OUT UINT32                *AuthenticationState\r
+  );\r
+\r
 #endif\r