]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Ppi/FirmwareVolume.h
1. Enable use-cases in PEI using SecurityPPI co-equal to the use-cases in DXE using...
[mirror_edk2.git] / MdePkg / Include / Ppi / FirmwareVolume.h
index 81c739027f9a6f01514bcf325999618d0621aeb2..d8998fad17fe502f5d97624133dbc7fbc63d2baf 100644 (file)
@@ -1,8 +1,8 @@
 /** @file\r
   This file provides functions for accessing a memory-mapped firmware volume of a specific format.\r
 \r
-  Copyright (c) 2006 - 2008, Intel Corporation                                                         \r
-  All rights reserved. This program and the accompanying materials                          \r
+  Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
+  This program and the accompanying materials                          \r
   are licensed and made available under the terms and conditions of the BSD License         \r
   which accompanies this distribution.  The full text of the license may be found at        \r
   http://opensource.org/licenses/bsd-license.php                                            \r
@@ -153,6 +153,33 @@ 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\r
+  file, including its file name, type, attributes, starting\r
+  address, size and authentication status. \r
+\r
+  @param This                     Points to this instance of the\r
+                                  EFI_PEI_FIRMWARE_VOLUME_PPI.\r
+  @param FileHandle               Handle of the file.\r
+  @param FileInfo                 Upon exit, points to the file's\r
+                                  information.\r
+\r
+  @retval EFI_SUCCESS             File information returned.\r
+  @retval EFI_INVALID_PARAMETER   If FileHandle does not\r
+                                  represent a valid file.\r
+  @retval EFI_INVALID_PARAMETER   If FileInfo is NULL.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_PEI_FV_GET_FILE_INFO2)(\r
+  IN  CONST EFI_PEI_FIRMWARE_VOLUME_PPI   *This, \r
+  IN  EFI_PEI_FILE_HANDLE                 FileHandle,\r
+  OUT EFI_FV_FILE_INFO2                   *FileInfo\r
+);\r
+\r
 /**\r
   This function returns information about the firmware volume.\r
   \r
@@ -203,6 +230,43 @@ EFI_STATUS
   OUT VOID                                 **SectionData\r
 );\r
 \r
+/**\r
+  Find the next matching section in the firmware file.\r
+\r
+  This service enables PEI modules to discover sections\r
+  of a given instance and type within a valid file.\r
+\r
+  @param This                   Points to this instance of the\r
+                                EFI_PEI_FIRMWARE_VOLUME_PPI.\r
+  @param SearchType             A filter to find only sections of this\r
+                                type.\r
+  @param SearchInstance         A filter to find the specific instance\r
+                                of sections.\r
+  @param FileHandle             Handle of firmware file in which to\r
+                                search.\r
+  @param SectionData            Updated upon return to point to the\r
+                                section found.\r
+  @param AuthenticationStatus   Updated upon return to point to the\r
+                                authentication status for this section.\r
+\r
+  @retval EFI_SUCCESS     Section was found.\r
+  @retval EFI_NOT_FOUND   Section of the specified type was not\r
+                          found. SectionData contains NULL.\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_PEI_FV_FIND_SECTION2)(\r
+  IN  CONST EFI_PEI_FIRMWARE_VOLUME_PPI    *This,\r
+  IN  EFI_SECTION_TYPE                     SearchType,\r
+  IN  UINTN                                SearchInstance,\r
+  IN  EFI_PEI_FILE_HANDLE                  FileHandle,\r
+  OUT VOID                                 **SectionData,\r
+  OUT UINT32                               *AuthenticationStatus\r
+);\r
+\r
+#define EFI_PEI_FIRMWARE_VOLUME_PPI_SIGNATURE SIGNATURE_32 ('P', 'F', 'V', 'P')\r
+#define EFI_PEI_FIRMWARE_VOLUME_PPI_REVISION 0x00010030\r
+\r
 ///\r
 /// This PPI provides functions for accessing a memory-mapped firmware volume of a specific format.\r
 ///\r
@@ -213,6 +277,16 @@ struct _EFI_PEI_FIRMWARE_VOLUME_PPI {
   EFI_PEI_FV_GET_FILE_INFO    GetFileInfo;\r
   EFI_PEI_FV_GET_INFO         GetVolumeInfo;\r
   EFI_PEI_FV_FIND_SECTION     FindSectionByType;\r
+  EFI_PEI_FV_GET_FILE_INFO2   GetFileInfo2;\r
+  EFI_PEI_FV_FIND_SECTION2    FindSectionByType2;\r
+  ///\r
+  /// Signature is used to keep backward-compatibility, set to {'P','F','V','P'}.\r
+  ///\r
+  UINT32                      Signature;\r
+  ///\r
+  /// Revision for further extension.\r
+  ///\r
+  UINT32                      Revision;\r
 };\r
 \r
 extern EFI_GUID gEfiPeiFirmwareVolumePpiGuid;\r