]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Ppi/FirmwareVolume.h
MdePkg/ProcessorBind: add defines for page allocation granularity
[mirror_edk2.git] / MdePkg / Include / Ppi / FirmwareVolume.h
index 4cb22649d28436a9f9cd8946d5552ccaae4268e9..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 - 2007, 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
@@ -11,8 +11,7 @@
   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
 \r
   @par Revision Reference:\r
-  This PPI is defined in PI.\r
-  Version 1.00\r
+  This PPI is from PI Version 1.0 errata.\r
 \r
 **/\r
 \r
@@ -122,7 +121,7 @@ EFI_STATUS
 (EFIAPI *EFI_PEI_FV_FIND_FILE_NAME)(\r
   IN  CONST  EFI_PEI_FIRMWARE_VOLUME_PPI *This,\r
   IN  CONST  EFI_GUID                    *FileName,\r
-  IN  EFI_PEI_FV_HANDLE                  FvHandle,\r
+  IN  EFI_PEI_FV_HANDLE                  *FvHandle,\r
   OUT EFI_PEI_FILE_HANDLE                *FileHandle\r
 );\r
 \r
@@ -154,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
@@ -204,34 +230,63 @@ 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
 struct _EFI_PEI_FIRMWARE_VOLUME_PPI {\r
-  ///\r
-  /// Process a firmware volume and create a volume handle.\r
-  ///\r
   EFI_PEI_FV_PROCESS_FV       ProcessVolume;\r
-  ///\r
-  /// Find all files of a specific type.\r
-  ///\r
   EFI_PEI_FV_FIND_FILE_TYPE   FindFileByType;\r
-  ///\r
-  /// Find the file with a specific name.\r
-  ///\r
   EFI_PEI_FV_FIND_FILE_NAME   FindFileByName;\r
-  ///\r
-  /// Return the information about a specific file.\r
-  ///\r
   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
-  /// Return the firmware volume attributes.\r
+  /// Signature is used to keep backward-compatibility, set to {'P','F','V','P'}.\r
   ///\r
-  EFI_PEI_FV_GET_INFO         GetVolumeInfo;\r
+  UINT32                      Signature;\r
   ///\r
-  /// Find all sections of a specific type.\r
+  /// Revision for further extension.\r
   ///\r
-  EFI_PEI_FV_FIND_SECTION     FindSectionByType;\r
+  UINT32                      Revision;\r
 };\r
 \r
 extern EFI_GUID gEfiPeiFirmwareVolumePpiGuid;\r