]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Protocol/FirmwareVolume2.h
MdePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdePkg / Include / Protocol / FirmwareVolume2.h
index 360acbf5e7eefafbcbde6b4b7d99b4d6ce65b372..07923246094cdf29a2ea2859ee9793ae624b1e77 100644 (file)
@@ -1,18 +1,12 @@
 /** @file\r
-  The Firmware Volume Protocol provides file-level access to the firmware volume. \r
-  Each firmware volume driver must produce an instance of the \r
+  The Firmware Volume Protocol provides file-level access to the firmware volume.\r
+  Each firmware volume driver must produce an instance of the\r
   Firmware Volume Protocol if the firmware volume is to be visible to\r
   the system during the DXE phase. The Firmware Volume Protocol also provides\r
   mechanisms for determining and modifying some attributes of the firmware volume.\r
 \r
-  Copyright (c) 2006 - 2008, 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
-\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
+  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
   @par Revision Reference: PI\r
   Version 1.00.\r
@@ -98,7 +92,7 @@ typedef UINT64  EFI_FV_ATTRIBUTES;
   undefined.\r
 \r
   @param  This          Indicates the EFI_FIRMWARE_VOLUME2_PROTOCOL instance.\r
-  \r
+\r
   @param  FvAttributes  Pointer to an EFI_FV_ATTRIBUTES in which\r
                         the attributes and current settings are\r
                         returned.\r
@@ -118,7 +112,7 @@ EFI_STATUS
 \r
 /**\r
   Modifies the current settings of the firmware volume according to the input parameter.\r
-  \r
+\r
   The SetVolumeAttributes() function is used to set configurable\r
   firmware volume attributes. Only EFI_FV_READ_STATUS,\r
   EFI_FV_WRITE_STATUS, and EFI_FV_LOCK_STATUS may be modified, and\r
@@ -136,7 +130,7 @@ EFI_STATUS
   TPL_NOTIFY is undefined.\r
 \r
   @param  This          Indicates the EFI_FIRMWARE_VOLUME2_PROTOCOL instance.\r
-  \r
+\r
   @param  FvAttributes  On input, FvAttributes is a pointer to\r
                         an EFI_FV_ATTRIBUTES containing the\r
                         desired firmware volume settings. On\r
@@ -145,7 +139,7 @@ EFI_STATUS
                         unsuccessful return, FvAttributes is not\r
                         modified and the firmware volume\r
                         settings are not changed.\r
-  \r
+\r
   @retval EFI_SUCCESS           The requested firmware volume attributes\r
                                 were set and the resulting\r
                                 EFI_FV_ATTRIBUTES is returned in\r
@@ -254,13 +248,13 @@ EFI_STATUS
   undefined.\r
 \r
   @param  This                  Indicates the EFI_FIRMWARE_VOLUME2_PROTOCOL instance.\r
-  \r
+\r
   @param  NameGuid              Pointer to an EFI_GUID, which is the file\r
                                 name. All firmware file names are EFI_GUIDs.\r
                                 A single firmware volume must not have two\r
                                 valid files with the same file name\r
                                 EFI_GUID.\r
-  \r
+\r
   @param  Buffer                Pointer to a pointer to a buffer in which the\r
                                 file contents are returned, not including the\r
                                 file header.\r
@@ -268,19 +262,19 @@ EFI_STATUS
   @param  BufferSize            Pointer to a caller-allocated UINTN. It\r
                                 indicates the size of the memory\r
                                 represented by Buffer.\r
-  \r
+\r
   @param  FoundType             Pointer to a caller-allocated EFI_FV_FILETYPE.\r
-  \r
+\r
   @param  FileAttributes        Pointer to a  caller-allocated\r
                                 EFI_FV_FILE_ATTRIBUTES.\r
-  \r
+\r
   @param  AuthenticationStatus  Pointer to a caller-allocated\r
                                 UINT32 in which the\r
                                 authentication status is\r
                                 returned.\r
-  \r
+\r
   @retval EFI_SUCCESS                 The call completed successfully.\r
-  \r
+\r
   @retval EFI_WARN_BUFFER_TOO_SMALL   The buffer is too small to\r
                                       contain the requested\r
                                       output. The buffer is\r
@@ -295,7 +289,7 @@ EFI_STATUS
                                       attempting to access the firmware volume.\r
 \r
   @retval EFI_ACCESS_DENIED           The firmware volume is configured to\r
-                                      isallow reads.\r
+                                      disallow reads.\r
 \r
 **/\r
 typedef\r
@@ -342,56 +336,56 @@ EFI_STATUS
   undefined.\r
 \r
   @param  This                Indicates the EFI_FIRMWARE_VOLUME2_PROTOCOL instance.\r
\r
+\r
   @param NameGuid             Pointer to an EFI_GUID, which indicates the\r
                               file name from which the requested section\r
                               will be read.\r
-  \r
+\r
   @param SectionType          Indicates the section type to return.\r
                               SectionType in conjunction with\r
                               SectionInstance indicates which section to\r
                               return.\r
-  \r
+\r
   @param SectionInstance      Indicates which instance of sections\r
                               with a type of SectionType to return.\r
                               SectionType in conjunction with\r
                               SectionInstance indicates which\r
                               section to return. SectionInstance is\r
                               zero based.\r
-  \r
+\r
   @param Buffer               Pointer to a pointer to a buffer in which the\r
                               section contents are returned, not including\r
                               the section header.\r
-  \r
+\r
   @param BufferSize           Pointer to a caller-allocated UINTN. It\r
                               indicates the size of the memory\r
                               represented by Buffer.\r
-  \r
+\r
   @param AuthenticationStatus Pointer to a caller-allocated\r
                               UINT32 in which the authentication\r
                               status is returned.\r
-  \r
-  \r
+\r
+\r
   @retval EFI_SUCCESS   The call completed successfully.\r
-  \r
+\r
   @retval EFI_WARN_BUFFER_TOO_SMALL   The caller-allocated\r
                                       buffer is too small to\r
                                       contain the requested\r
                                       output. The buffer is\r
                                       filled and the output is\r
                                       truncated.\r
-  \r
+\r
   @retval EFI_OUT_OF_RESOURCES  An allocation failure occurred.\r
-  \r
+\r
   @retval EFI_NOT_FOUND   The requested file was not found in\r
                           the firmware volume. EFI_NOT_FOUND The\r
                           requested section was not found in the\r
                           specified file.\r
-  \r
+\r
   @retval EFI_DEVICE_ERROR  A hardware error occurred when\r
                             attempting to access the firmware\r
                             volume.\r
-  \r
+\r
   @retval EFI_ACCESS_DENIED The firmware volume is configured to\r
                             disallow reads. EFI_PROTOCOL_ERROR\r
                             The requested section was not found,\r
@@ -418,9 +412,9 @@ EFI_STATUS
   OUT       UINT32                        *AuthenticationStatus\r
 );\r
 \r
-//\r
-// EFI_FV_WRITE_POLICY\r
-//\r
+///\r
+/// EFI_FV_WRITE_POLICY, two policies (unreliable write and reliable write) are defined.\r
+///\r
 typedef UINT32 EFI_FV_WRITE_POLICY;\r
 #define EFI_FV_UNRELIABLE_WRITE   0x00000000\r
 #define EFI_FV_RELIABLE_WRITE     0x00000001\r
@@ -472,7 +466,7 @@ typedef struct {
   Architectural Elements 84 August 21, 2006 Version 1.0\r
   WriteFile() is callable only from TPL_NOTIFY and below.\r
   Behavior of WriteFile() at any EFI_TPL above TPL_NOTIFY is\r
-  undefined. \r
+  undefined.\r
 \r
   @param This           Indicates the EFI_FIRMWARE_VOLUME2_PROTOCOL instance.\r
 \r
@@ -482,31 +476,31 @@ typedef struct {
                         write in the event of a power failure or\r
                         other system failure during the write\r
                         operation.\r
\r
+\r
   @param FileData       Pointer to an array of\r
                         EFI_FV_WRITE_FILE_DATA. Each element of\r
                         FileData[] represents a file to be written.\r
 \r
 \r
   @retval EFI_SUCCESS             The write completed successfully.\r
-  \r
+\r
   @retval EFI_OUT_OF_RESOURCES    The firmware volume does not\r
                                   have enough free space to\r
                                   storefile(s).\r
-  \r
+\r
   @retval EFI_DEVICE_ERROR        A hardware error occurred when\r
                                   attempting to access the firmware volume.\r
-  \r
+\r
   @retval EFI_WRITE_PROTECTED     The firmware volume is\r
                                   configured to disallow writes.\r
-  \r
+\r
   @retval EFI_NOT_FOUND           A delete was requested, but the\r
                                   requested file was not found in the\r
                                   firmware volume.\r
-  \r
+\r
   @retval EFI_INVALID_PARAMETER   A delete was requested with a\r
                                   multiple file write.\r
-  \r
+\r
   @retval EFI_INVALID_PARAMETER   An unsupported WritePolicy was\r
                                   requested.\r
 \r
@@ -515,10 +509,10 @@ typedef struct {
 \r
   @retval EFI_INVALID_PARAMETER   A file system specific error\r
                                   has occurred.\r
-  \r
+\r
 **/\r
 typedef\r
-EFI_STATUS \r
+EFI_STATUS\r
 (EFIAPI * EFI_FV_WRITE_FILE)(\r
   IN CONST  EFI_FIRMWARE_VOLUME2_PROTOCOL *This,\r
   IN        UINT32                        NumberOfFiles,\r
@@ -528,8 +522,8 @@ EFI_STATUS
 \r
 \r
 /**\r
-       Retrieves information about the next file in the firmware volume store \r
-       that matches the search criteria.\r
+  Retrieves information about the next file in the firmware volume store\r
+  that matches the search criteria.\r
 \r
   GetNextFile() is the interface that is used to search a firmware\r
   volume for a particular file. It is called successively until\r
@@ -547,7 +541,7 @@ EFI_STATUS
   implementation specific and no semantic content is implied.\r
   GetNextFile() is callable only from TPL_NOTIFY and below.\r
   Behavior of GetNextFile() at any EFI_TPL above TPL_NOTIFY is\r
-  undefined. \r
+  undefined.\r
 \r
   @param This       Indicates the EFI_FIRMWARE_VOLUME2_PROTOCOL instance.\r
 \r
@@ -600,7 +594,7 @@ EFI_STATUS
   @retval EFI_ACCESS_DENIED The firmware volume is configured to\r
                             disallow reads.\r
 \r
-   \r
+\r
 **/\r
 typedef\r
 EFI_STATUS\r
@@ -629,29 +623,29 @@ EFI_STATUS
   @param This             A pointer to the EFI_FIRMWARE_VOLUME2_PROTOCOL\r
                           instance that is the file handle the requested\r
                           information is for.\r
-  \r
+\r
   @param InformationType  The type identifier for the\r
                           information being requested.\r
-  \r
+\r
   @param BufferSize       On input, the size of Buffer. On output,\r
                           the amount of data returned in Buffer. In\r
                           both cases, the size is measured in bytes.\r
-  \r
+\r
   @param Buffer           A pointer to the data buffer to return. The\r
                           buffer's type is indicated by InformationType.\r
-  \r
-  \r
+\r
+\r
   @retval EFI_SUCCESS           The information was retrieved.\r
-  \r
+\r
   @retval EFI_UNSUPPORTED       The InformationType is not known.\r
-  \r
+\r
   @retval EFI_NO_MEDIA          The device has no medium.\r
-  \r
+\r
   @retval EFI_DEVICE_ERROR      The device reported an error.\r
-  \r
+\r
   @retval EFI_VOLUME_CORRUPTED  The file system structures are\r
                                 corrupted.\r
-  \r
+\r
   @retval EFI_BUFFER_TOO_SMALL  The BufferSize is too small to\r
                                 read the current directory\r
                                 entry. BufferSize has been\r
@@ -740,14 +734,14 @@ struct _EFI_FIRMWARE_VOLUME2_PROTOCOL {
   EFI_FV_READ_SECTION     ReadSection;\r
   EFI_FV_WRITE_FILE       WriteFile;\r
   EFI_FV_GET_NEXT_FILE    GetNextFile;\r
-  \r
+\r
   ///\r
   /// Data field that indicates the size in bytes\r
   /// of the Key input buffer for the\r
-  /// GetNextFile() API.  \r
+  /// GetNextFile() API.\r
   ///\r
   UINT32                  KeySize;\r
-  \r
+\r
   ///\r
   /// Handle of the parent firmware volume.\r
   ///\r