]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Ppi/FirmwareVolume.h
MdePkg: Clean up source files
[mirror_edk2.git] / MdePkg / Include / Ppi / FirmwareVolume.h
index be42ac096fdfd18fe695b717dd53b713579afa8a..e38480701c2c53cbb16bf65de917be0c8695db5d 100644 (file)
@@ -1,18 +1,17 @@
 /** @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
-  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
+  Copyright (c) 2006 - 2018, 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
 \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
+  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
-  This PPI is defined in PI.\r
-  Version 1.00\r
+  This PPI is from PI Version 1.0 errata.\r
 \r
 **/\r
 \r
@@ -23,7 +22,7 @@
 /// The GUID for this PPI is the same as the firmware volume format GUID.\r
 /// The FV format can be EFI_FIRMWARE_FILE_SYSTEM2_GUID or the GUID for a user-defined\r
 /// format. The EFI_FIRMWARE_FILE_SYSTEM2_GUID is the PI Firmware Volume format.\r
-/// \r
+///\r
 typedef struct _EFI_PEI_FIRMWARE_VOLUME_PPI   EFI_PEI_FIRMWARE_VOLUME_PPI;\r
 \r
 \r
@@ -37,15 +36,15 @@ typedef struct _EFI_PEI_FIRMWARE_VOLUME_PPI   EFI_PEI_FIRMWARE_VOLUME_PPI;
   buffer which contains the necessary information for creating\r
   the firmware volume handle. Normally, these values are derived\r
   from the EFI_FIRMWARE_VOLUME_INFO_PPI.\r
-  \r
-  \r
+\r
+\r
   @param This                   Points to this instance of the\r
                                 EFI_PEI_FIRMWARE_VOLUME_PPI.\r
   @param Buffer                 Points to the start of the buffer.\r
   @param BufferSize             Size of the buffer.\r
   @param FvHandle               Points to the returned firmware volume\r
                                 handle. The firmware volume handle must\r
-                                be unique within the system. \r
+                                be unique within the system.\r
 \r
   @retval EFI_SUCCESS           Firmware volume handle created.\r
   @retval EFI_VOLUME_CORRUPTED  Volume was corrupt.\r
@@ -63,7 +62,7 @@ EFI_STATUS
 /**\r
   Finds the next file of the specified type.\r
 \r
-  This service enables PEI modules to discover additional firmware files. \r
+  This service enables PEI modules to discover additional firmware files.\r
   The FileHandle must be unique within the system.\r
 \r
   @param This           Points to this instance of the\r
@@ -81,20 +80,20 @@ EFI_STATUS
   @retval EFI_SUCCESS   The file was found.\r
   @retval EFI_NOT_FOUND The file was not found. FileHandle contains NULL.\r
 \r
-**/ \r
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_PEI_FV_FIND_FILE_TYPE)( \r
-  IN     CONST EFI_PEI_FIRMWARE_VOLUME_PPI   *This, \r
-  IN     EFI_FV_FILETYPE                     SearchType, \r
+(EFIAPI *EFI_PEI_FV_FIND_FILE_TYPE)(\r
+  IN     CONST EFI_PEI_FIRMWARE_VOLUME_PPI   *This,\r
+  IN     EFI_FV_FILETYPE                     SearchType,\r
   IN     EFI_PEI_FV_HANDLE                   FvHandle,\r
-  IN OUT EFI_PEI_FILE_HANDLE                 *FileHandle \r
+  IN OUT EFI_PEI_FILE_HANDLE                 *FileHandle\r
 );\r
 \r
 \r
 /**\r
-  Find a file within a volume by its name. \r
-  \r
+  Find a file within a volume by its name.\r
+\r
   This service searches for files with a specific name, within\r
   either the specified firmware volume or all firmware volumes.\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
@@ -132,8 +131,8 @@ EFI_STATUS
 \r
   This function returns information about a specific\r
   file, including its file name, type, attributes, starting\r
-  address and size. \r
-   \r
+  address and size.\r
+\r
   @param This                     Points to this instance of the\r
                                   EFI_PEI_FIRMWARE_VOLUME_PPI.\r
   @param FileHandle               Handle of the file.\r
@@ -144,19 +143,46 @@ EFI_STATUS
   @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
+\r
+**/\r
 typedef\r
 EFI_STATUS\r
 (EFIAPI *EFI_PEI_FV_GET_FILE_INFO)(\r
-  IN  CONST EFI_PEI_FIRMWARE_VOLUME_PPI   *This, \r
-  IN  EFI_PEI_FILE_HANDLE                 FileHandle, \r
+  IN  CONST EFI_PEI_FIRMWARE_VOLUME_PPI   *This,\r
+  IN  EFI_PEI_FILE_HANDLE                 FileHandle,\r
   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
+\r
   @param This                     Points to this instance of the\r
                                   EFI_PEI_FIRMWARE_VOLUME_PPI.\r
   @param FvHandle                 Handle to the firmware handle.\r
@@ -167,21 +193,21 @@ EFI_STATUS
   @retval EFI_INVALID_PARAMETER   FvHandle does not indicate a valid\r
                                   firmware volume or VolumeInfo is NULL.\r
 \r
-**/ \r
+**/\r
 typedef\r
 EFI_STATUS\r
 (EFIAPI *EFI_PEI_FV_GET_INFO)(\r
-  IN  CONST  EFI_PEI_FIRMWARE_VOLUME_PPI   *This, \r
-  IN  EFI_PEI_FV_HANDLE                    FvHandle, \r
+  IN  CONST  EFI_PEI_FIRMWARE_VOLUME_PPI   *This,\r
+  IN  EFI_PEI_FV_HANDLE                    FvHandle,\r
   OUT EFI_FV_INFO                          *VolumeInfo\r
 );\r
 \r
 /**\r
   Find the next matching section in the firmware file.\r
-  \r
+\r
   This service enables PEI modules to discover sections\r
   of a given type within a valid file.\r
-  \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
@@ -190,7 +216,7 @@ EFI_STATUS
                           search.\r
   @param SectionData      Updated upon  return to point to the\r
                           section found.\r
-  \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
@@ -204,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
@@ -214,8 +277,18 @@ 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
 \r
-#endif \r
+#endif\r