]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkPkg/Include/Framework/PeiCis.h
Synchronize code with specs.
[mirror_edk2.git] / IntelFrameworkPkg / Include / Framework / PeiCis.h
index da09a8ac7b007602b0eb1f621eb2e1661d63b58e..ad03c04165b92d768280664458a010c50a36e6a7 100644 (file)
@@ -10,8 +10,8 @@
   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
 \r
   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
 \r
-  @par Revision Reference:\r
-  Version 1.0.\r
+  @par Revision Reference: \r
+  PeiCis Version 0.91.\r
 \r
 **/\r
 \r
 \r
 **/\r
 \r
@@ -19,6 +19,9 @@
 #define __PEICIS_H__\r
 \r
 #include <PiPei.h>\r
 #define __PEICIS_H__\r
 \r
 #include <PiPei.h>\r
+#include <Ppi/PciCfg.h>\r
+\r
+typedef struct _FRAMEWORK_EFI_PEI_SERVICES FRAMEWORK_EFI_PEI_SERVICES;\r
 \r
 /**\r
   The PEI Dispatcher will invoke each PEIM one time.  During this pass, the PEI \r
 \r
 /**\r
   The PEI Dispatcher will invoke each PEIM one time.  During this pass, the PEI \r
 typedef\r
 EFI_STATUS\r
 (EFIAPI *EFI_PEIM_ENTRY_POINT)(\r
 typedef\r
 EFI_STATUS\r
 (EFIAPI *EFI_PEIM_ENTRY_POINT)(\r
-  IN EFI_FFS_FILE_HEADER       *FfsHeader,\r
-  IN EFI_PEI_SERVICES          **PeiServices\r
+  IN EFI_FFS_FILE_HEADER            *FfsHeader,\r
+  IN EFI_PEI_SERVICES               **PeiServices\r
   );\r
   \r
   );\r
   \r
-#endif  
\ No newline at end of file
+/**\r
+  The purpose of the service is to abstract the capability of the PEI \r
+  Foundation to discover instances of firmware volumes in the system. \r
+  Given the input file pointer, this service searches for the next \r
+  matching file in the Firmware File System (FFS) volume.\r
+\r
+  @param  PeiServices      An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
+  @param  Instance         This instance of the firmware volume to find. The value 0 is the Boot Firmware Volume (BFV).\r
+  @param  FwVolHeader      Pointer to the firmware volume header of the volume to return.\r
+\r
+  @retval EFI_SUCCESS           The volume was found.\r
+  @retval EFI_NOT_FOUND         The volume was not found.\r
+  @retval EFI_INVALID_PARAMETER FwVolHeader is NULL\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_PEI_FFS_FIND_NEXT_VOLUME)(\r
+  IN FRAMEWORK_EFI_PEI_SERVICES     **PeiServices,\r
+  IN UINTN                          Instance,\r
+  IN OUT EFI_FIRMWARE_VOLUME_HEADER **FwVolHeader\r
+  );\r
+    \r
+/**\r
+  The purpose of the service is to abstract the capability of the PEI \r
+  Foundation to discover instances of firmware files in the system. \r
+  Given the input file pointer, this service searches for the next matching \r
+  file in the Firmware File System (FFS) volume.\r
+\r
+  @param  PeiServices      An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
+  @param  SearchType       A filter to find files only of this type.\r
+  @param  FwVolHeader      Pointer to the firmware volume header of the volume to search.This parameter \r
+                           must point to a valid FFS volume.\r
+  @param  FileHeader       Pointer to the current file from which to begin searching.This pointer will be \r
+                           updated upon return to reflect the file found.\r
+\r
+  @retval EFI_SUCCESS      The file was found.\r
+  @retval EFI_NOT_FOUND    The file was not found.\r
+  @retval EFI_NOT_FOUND    The header checksum was not zero.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_PEI_FFS_FIND_NEXT_FILE)(\r
+  IN FRAMEWORK_EFI_PEI_SERVICES     **PeiServices,\r
+  IN EFI_FV_FILETYPE                SearchType,\r
+  IN EFI_FIRMWARE_VOLUME_HEADER     *FwVolHeader,\r
+  IN OUT EFI_FFS_FILE_HEADER        **FileHeader\r
+  );\r
+\r
+/**\r
+  Given the input file pointer, this service searches for the next \r
+  matching file in the Firmware File System (FFS) volume. \r
+\r
+  @param  PeiServices      An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
+  @param  SectionType      The value of the section type to find.\r
+  @param  FfsFileHeader    A pointer to the file header that contains the set of sections to be searched.\r
+  @param  SectionData      A pointer to the discovered section, if successful.\r
+\r
+  @retval EFI_SUCCESS      The section was found.\r
+  @retval EFI_NOT_FOUND    The section was not found.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_PEI_FFS_FIND_SECTION_DATA)(\r
+  IN FRAMEWORK_EFI_PEI_SERVICES     **PeiServices,\r
+  IN EFI_SECTION_TYPE               SectionType,\r
+  IN EFI_FFS_FILE_HEADER            *FfsFileHeader,\r
+  IN OUT VOID                       **SectionData\r
+  );\r
+        \r
+struct _FRAMEWORK_EFI_PEI_SERVICES {\r
+  EFI_TABLE_HEADER                  Hdr;\r
+  //\r
+  // PPI Functions\r
+  //\r
+  EFI_PEI_INSTALL_PPI               InstallPpi;\r
+  EFI_PEI_REINSTALL_PPI             ReInstallPpi;\r
+  EFI_PEI_LOCATE_PPI                LocatePpi;\r
+  EFI_PEI_NOTIFY_PPI                NotifyPpi;\r
+  //\r
+  // Boot Mode Functions\r
+  //\r
+  EFI_PEI_GET_BOOT_MODE             GetBootMode;\r
+  EFI_PEI_SET_BOOT_MODE             SetBootMode;\r
+  //\r
+  // HOB Functions\r
+  //\r
+  EFI_PEI_GET_HOB_LIST              GetHobList;\r
+  EFI_PEI_CREATE_HOB                CreateHob;\r
+  //\r
+  // Firmware Volume Functions\r
+  //\r
+  EFI_PEI_FFS_FIND_NEXT_VOLUME      FfsFindNextVolume;\r
+  EFI_PEI_FFS_FIND_NEXT_FILE        FfsFindNextFile;\r
+  EFI_PEI_FFS_FIND_SECTION_DATA     FfsFindSectionData;\r
+  //\r
+  // PEI Memory Functions\r
+  //\r
+  EFI_PEI_INSTALL_PEI_MEMORY        InstallPeiMemory;\r
+  EFI_PEI_ALLOCATE_PAGES            AllocatePages;\r
+  EFI_PEI_ALLOCATE_POOL             AllocatePool;\r
+  EFI_PEI_COPY_MEM                  CopyMem;\r
+  EFI_PEI_SET_MEM                   SetMem;\r
+  //\r
+  // Status Code\r
+  //\r
+  EFI_PEI_REPORT_STATUS_CODE        ReportStatusCode;\r
+  //\r
+  // Reset\r
+  //\r
+  EFI_PEI_RESET_SYSTEM              ResetSystem;\r
+  //\r
+  // (the following interfaces are installed by publishing PEIM)\r
+  //\r
+  // I/O Abstractions\r
+  //\r
+  EFI_PEI_CPU_IO_PPI                *CpuIo;\r
+  EFI_PEI_PCI_CFG_PPI               *PciCfg;\r
+};\r
+\r
+typedef struct {\r
+  UINTN                             BootFirmwareVolume;\r
+  UINTN                             SizeOfCacheAsRam;\r
+  EFI_PEI_PPI_DESCRIPTOR            *DispatchTable;\r
+} EFI_PEI_STARTUP_DESCRIPTOR;\r
+\r
+#endif  \r
+\r