]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Protocol/FirmwareVolume2.h
Reviewed the code comments in the Include/Protocol directory for typos, grammar issue...
[mirror_edk2.git] / MdePkg / Include / Protocol / FirmwareVolume2.h
index fd07c95f55a93466ada38ac56f284972d4f05aa1..7e5775d63b992a65018abf72c63c7349c13d1130 100644 (file)
@@ -28,9 +28,9 @@
 typedef struct _EFI_FIRMWARE_VOLUME2_PROTOCOL EFI_FIRMWARE_VOLUME2_PROTOCOL;\r
 \r
 \r
-//\r
-// EFI_FV_ATTRIBUTES\r
-//\r
+///\r
+/// EFI_FV_ATTRIBUTES\r
+///\r
 typedef UINT64  EFI_FV_ATTRIBUTES;\r
 \r
 //\r
@@ -85,7 +85,8 @@ typedef UINT64  EFI_FV_ATTRIBUTES;
 #define EFI_FV2_ALIGNMENT_2G            0x00000000001F0000ULL\r
 \r
 /**\r
-  \r
+  Returns the attributes and current settings of the firmware volume.\r
+\r
   Because of constraints imposed by the underlying firmware\r
   storage, an instance of the Firmware Volume Protocol may not\r
   be to able to support all possible variations of this\r
@@ -116,6 +117,8 @@ EFI_STATUS
 \r
 \r
 /**\r
+  Modifies the current settings of the firmware volume according to the input parameter.\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
@@ -209,11 +212,13 @@ EFI_STATUS
 \r
 \r
 /**\r
+  Retrieves a file and/or file information from the firmware volume.\r
+\r
   ReadFile() is used to retrieve any file from a firmware volume\r
   during the DXE phase. The actual binary encoding of the file in\r
   the firmware volume media may be in any arbitrary format as long\r
-  as it does the following: ?It is accessed using the Firmware\r
-  Volume Protocol. ?The image that is returned follows the image\r
+  as it does the following: It is accessed using the Firmware\r
+  Volume Protocol. The image that is returned follows the image\r
   format defined in Code Definitions: PI Firmware File Format.\r
   If the input value of Buffer==NULL, it indicates the caller is\r
   requesting only that the type, attributes, and size of the\r
@@ -290,7 +295,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
@@ -308,12 +313,12 @@ EFI_STATUS
 \r
 \r
 /**\r
+  Locates the requested section within a file and returns it in a buffer.\r
+\r
   ReadSection() is used to retrieve a specific section from a file\r
   within a firmware volume. The section returned is determined\r
   using a depth-first, left-to-right search algorithm through all\r
-  sections found in the specified file. See\r
-   ????Firmware File Sections???? on page 9 for more details about\r
-  sections. The output buffer is specified by a double indirection\r
+  sections found in the specified file. The output buffer is specified by a double indirection\r
   of the Buffer parameter. The input value of Buffer is used to\r
   determine if the output buffer is caller allocated or is\r
   dynamically allocated by ReadSection(). If the input value of\r
@@ -413,9 +418,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
@@ -424,14 +429,31 @@ typedef UINT32 EFI_FV_WRITE_POLICY;
 // EFI_FV_WRITE_FILE_DATA\r
 //\r
 typedef struct {\r
+  ///\r
+  /// Pointer to a GUID, which is the file name to be written.\r
+  ///\r
   EFI_GUID                *NameGuid;\r
+  ///\r
+  /// Indicates the type of file to be written.\r
+  ///\r
   EFI_FV_FILETYPE         Type;\r
+  ///\r
+  /// Indicates the attributes for the file to be written.\r
+  ///\r
   EFI_FV_FILE_ATTRIBUTES  FileAttributes;\r
+  ///\r
+  /// Pointer to a buffer containing the file to be written.\r
+  ///\r
   VOID                    *Buffer;\r
+  ///\r
+  /// Indicates the size of the file image contained in Buffer.\r
+  ///\r
   UINT32                  BufferSize;\r
 } EFI_FV_WRITE_FILE_DATA;\r
 \r
 /**\r
+  Locates the requested section within a file and returns it in a buffer.\r
+\r
   WriteFile() is used to write one or more files to a firmware\r
   volume. Each file to be written is described by an\r
   EFI_FV_WRITE_FILE_DATA structure. The caller must ensure that\r
@@ -506,6 +528,9 @@ EFI_STATUS
 \r
 \r
 /**\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
   the desired file is located or the function returns\r
@@ -589,6 +614,8 @@ EFI_STATUS
 );\r
 \r
 /**\r
+  Return information about a firmware volume.\r
+\r
   The GetInfo() function returns information of type\r
   InformationType for the requested firmware volume. If the volume\r
   does not support the requested information type, then\r
@@ -644,6 +671,7 @@ EFI_STATUS
 \r
 \r
 /**\r
+  Sets information about a firmware volume.\r
 \r
   The SetInfo() function sets information of type InformationType\r
   on the requested firmware volume.\r
@@ -692,49 +720,19 @@ EFI_STATUS
 );\r
 \r
 \r
-/**\r
-  @par Protocol Description:\r
-  The Firmware Volume Protocol contains the file-level\r
-  abstraction to the firmware volume as well as some firmware\r
-  volume attribute reporting and configuration services. The\r
-  Firmware Volume Protocol is the interface used by all parts of\r
-  DXE that are not directly involved with managing the firmware\r
-  volume itself. This abstraction allows many varied types of\r
-  firmware volume implementations. A firmware volume may be a\r
-  flash device or it may be a file in the UEFI system partition,\r
-  for example. This level of firmware volume implementation\r
-  detail is not visible to the consumers of the Firmware Volume\r
-  Protocol.\r
-\r
-  @param  GetVolumeAttributes   Retrieves volume capabilities\r
-                                and current settings. \r
-\r
-  @param  SetVolumeAttributes   Modifies the current settings of\r
-                                the firmware volume.\r
-\r
-  @param  ReadFile              Reads an entire file from the firmware\r
-                                volume. \r
-\r
-  @param  ReadSection           Reads a single section from a file into\r
-                                a buffer.\r
-\r
-  @param  WriteFile             Writes an entire file into the firmware\r
-                                volume. \r
-\r
-  @param  GetNextFile           Provides service to allow searching the\r
-                                firmware volume.\r
-\r
-  @param  KeySize               Data field that indicates the size in bytes\r
-                                of the Key input buffer for the\r
-                                GetNextFile() API.\r
-\r
-  @param  ParentHandle          Handle of the parent firmware volume.\r
-\r
-  @param  GetInfo               Gets the requested file or volume\r
-                                information. \r
-\r
-  @param  SetInfo               Sets the requested file information.\r
-**/\r
+///\r
+/// The Firmware Volume Protocol contains the file-level\r
+/// abstraction to the firmware volume as well as some firmware\r
+/// volume attribute reporting and configuration services. The\r
+/// Firmware Volume Protocol is the interface used by all parts of\r
+/// DXE that are not directly involved with managing the firmware\r
+/// volume itself. This abstraction allows many varied types of\r
+/// firmware volume implementations. A firmware volume may be a\r
+/// flash device or it may be a file in the UEFI system partition,\r
+/// for example. This level of firmware volume implementation\r
+/// detail is not visible to the consumers of the Firmware Volume\r
+/// Protocol.\r
+///\r
 struct _EFI_FIRMWARE_VOLUME2_PROTOCOL {\r
   EFI_FV_GET_ATTRIBUTES   GetVolumeAttributes;\r
   EFI_FV_SET_ATTRIBUTES   SetVolumeAttributes;\r
@@ -742,7 +740,17 @@ 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
+  /// Data field that indicates the size in bytes\r
+  /// of the Key input buffer for the\r
+  /// GetNextFile() API.  \r
+  ///\r
   UINT32                  KeySize;\r
+  \r
+  ///\r
+  /// Handle of the parent firmware volume.\r
+  ///\r
   EFI_HANDLE              ParentHandle;\r
   EFI_FV_GET_INFO         GetInfo;\r
   EFI_FV_SET_INFO         SetInfo;\r