]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Pi/PiPeiCis.h
1. Enable use-cases in PEI using SecurityPPI co-equal to the use-cases in DXE using...
[mirror_edk2.git] / MdePkg / Include / Pi / PiPeiCis.h
index be01b870c4c58ae2efa30d4ddfcc17c01c652049..f2da20a2367b906042cf9c60b7f35ee533f2015a 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   PI PEI master include file. This file should match the PI spec.\r
 \r
-Copyright (c) 2006 - 2010, Intel Corporation.  All rights reserved<BR>\r
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials are licensed and made available under \r
 the terms and conditions of the BSD License that accompanies this distribution.  \r
 The full text of the license may be found at\r
@@ -12,7 +12,7 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
 \r
   @par Revision Reference:\r
-  PI Version 1.0.\r
+  PI Version 1.2.\r
 \r
 **/\r
 \r
@@ -395,6 +395,38 @@ EFI_STATUS
   OUT VOID                             **SectionData\r
   );\r
 \r
+/**\r
+  Searches for the next matching section within the specified file.\r
+\r
+  This service enables PEI modules to discover the section of a given type within a valid file.\r
+  This service will search within encapsulation sections (compression and GUIDed) as well. It will\r
+  search inside of a GUIDed section or a compressed section, but may not, for example, search a\r
+  GUIDed section inside a GUIDes section.\r
+  This service will not search within compression sections or GUIDed sections that require\r
+  extraction if memory is not present.\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  SectionInstance       Section instance to find.\r
+  @param  FileHandle            Handle of the firmware file to search.\r
+  @param  SectionData           A pointer to the discovered section, if successful.\r
+  @param  AuthenticationStatus  A pointer to the authentication status for this section.\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_DATA3)(\r
+  IN CONST EFI_PEI_SERVICES            **PeiServices,\r
+  IN EFI_SECTION_TYPE                  SectionType,\r
+  IN UINTN                             SectionInstance,\r
+  IN EFI_PEI_FILE_HANDLE               FileHandle,\r
+  OUT VOID                             **SectionData,\r
+  OUT UINT32                           *AuthenticationStatus\r
+  );\r
+\r
 /**\r
   This function registers the found memory configuration with the PEI Foundation.\r
 \r
@@ -608,6 +640,38 @@ typedef struct {
   UINT32                  BufferSize;\r
 } EFI_FV_FILE_INFO;\r
 \r
+///\r
+/// The information with authentication status of the FV file.\r
+///\r
+typedef struct {\r
+  ///\r
+  /// Name of the file.\r
+  ///\r
+  EFI_GUID                FileName;\r
+  ///\r
+  /// File type.\r
+  ///\r
+  EFI_FV_FILETYPE         FileType;\r
+  ///\r
+  /// Attributes of the file.\r
+  ///\r
+  EFI_FV_FILE_ATTRIBUTES  FileAttributes;\r
+  ///\r
+  /// Points to the file's data (not the header).\r
+  /// Not valid if EFI_FV_FILE_ATTRIB_MEMORY_MAPPED\r
+  /// is zero.\r
+  ///\r
+  VOID                    *Buffer;\r
+  ///\r
+  /// Size of the file's data.\r
+  ///\r
+  UINT32                  BufferSize;\r
+  ///\r
+  /// Authentication status for this file.\r
+  ///\r
+  UINT32                  AuthenticationStatus;\r
+} EFI_FV_FILE_INFO2;\r
+\r
 /**\r
   Returns information about a specific file.\r
 \r
@@ -633,6 +697,30 @@ EFI_STATUS
   OUT EFI_FV_FILE_INFO            *FileInfo\r
   );\r
 \r
+/**\r
+  Returns information about a specific file.\r
+\r
+  This function returns information about a specific file,\r
+  including its file name, type, attributes, starting address, size and authentication status.\r
+  If the firmware volume is not memory mapped, then the Buffer member will be NULL.\r
+\r
+  @param FileHandle   The handle of the file.\r
+  @param FileInfo     Upon exit, points to the file's\r
+                      information.\r
+\r
+  @retval EFI_SUCCESS             File information was returned.\r
+  @retval EFI_INVALID_PARAMETER   FileHandle does not\r
+                                  represent a valid file.\r
+  @retval EFI_INVALID_PARAMETER   FileInfo is NULL.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_PEI_FFS_GET_FILE_INFO2)(\r
+  IN  EFI_PEI_FILE_HANDLE         FileHandle,\r
+  OUT EFI_FV_FILE_INFO2           *FileInfo\r
+  );\r
+\r
 ///\r
 /// The information of the FV volume.\r
 ///\r
@@ -720,7 +808,7 @@ EFI_STATUS
 // PEI Specification Revision information\r
 //\r
 #define PEI_SPECIFICATION_MAJOR_REVISION  1\r
-#define PEI_SPECIFICATION_MINOR_REVISION  10\r
+#define PEI_SPECIFICATION_MINOR_REVISION  20\r
 ///\r
 /// Specification inconsistency here: \r
 /// In the PI1.0 spec, PEI_SERVICES_SIGNATURE is defined as 0x5652455320494550. But \r
@@ -813,6 +901,8 @@ struct _EFI_PEI_SERVICES {
   EFI_PEI_FFS_GET_FILE_INFO       FfsGetFileInfo;\r
   EFI_PEI_FFS_GET_VOLUME_INFO     FfsGetVolumeInfo;\r
   EFI_PEI_REGISTER_FOR_SHADOW     RegisterForShadow;\r
+  EFI_PEI_FFS_FIND_SECTION_DATA3  FindSectionData3;\r
+  EFI_PEI_FFS_GET_FILE_INFO2      FfsGetFileInfo2;\r
 };\r
 \r
 \r