]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkCompatibilityPkg/Compatibility/Fv2OnFvThunk/Fv2OnFvThunk.c
Update code to match EDKII coding style.
[mirror_edk2.git] / EdkCompatibilityPkg / Compatibility / Fv2OnFvThunk / Fv2OnFvThunk.c
index 5c6fd2a9e70f7f0d4fd3847b064ce9ccff54bd51..ff109bf4237b2c929585669f5c06a07eab319ebf 100644 (file)
@@ -1,4 +1,4 @@
-/**\r
+/** @file\r
 Module produce FV2 on top of FV.\r
 \r
 UEFI PI specification supersedes Inte's Framework Specification.\r
@@ -9,7 +9,7 @@ these two conditions are true:
 1) Framework module producing FV is present\r
 2) And the rest of modules on the platform consume FV2\r
 \r
-Copyright (c) 2006 - 2008 Intel Corporation. <BR>\r
+Copyright (c) 2006 - 2010, Intel Corporation. <BR>\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
@@ -164,8 +164,8 @@ Fv2SetVolumeAttributes (
   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
@@ -238,7 +238,7 @@ Fv2SetVolumeAttributes (
 \r
   @retval EFI_OUT_OF_RESOURCES  An allocation failure occurred.\r
 \r
-  @retavl EFI_NOT_FOUND   Name was not found in the firmware\r
+  @retval EFI_NOT_FOUND   Name was not found in the firmware\r
                           volume.\r
 \r
   @retval EFI_DEVICE_ERROR  A hardware error occurred when\r
@@ -265,11 +265,10 @@ Fv2ReadFile (
   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
-  of the Buffer parameter. The input value of Buffer is used to\r
-  determine if the output buffer is caller allocated or is\r
+  sections found in the specified file. The output buffer is \r
+  specified by a double indirection of the Buffer parameter. \r
+  The input value of Buffer is used to determine \r
+  if the output buffer is caller allocated or is\r
   dynamically allocated by ReadSection(). If the input value of\r
   Buffer!=NULL, it indicates that the output buffer is caller\r
   allocated. In this case, the input value of *BufferSize\r
@@ -392,10 +391,10 @@ Fv2ReadSection (
   undefined. Type EFI_TPL is defined in RaiseTPL() in the UEFI 2.0\r
   specification.\r
 \r
-  @param This Indicates the EFI_FIRMWARE_VOLUME2_PROTOCOL\r
-              instance. NumberOfFiles Indicates the number of\r
-              elements in the array pointed to by FileData.\r
+  @param This           Indicates the EFI_FIRMWARE_VOLUME2_PROTOCOL instance. \r
 \r
+  @param NumberOfFiles  Indicates the number of elements in the \r
+                        array pointed to by FileData.\r
 \r
   @param WritePolicy  Indicates the level of reliability for the\r
                       write in the event of a power failure or\r
@@ -467,7 +466,9 @@ Fv2WriteFile (
 \r
 \r
   @param This Indicates the EFI_FIRMWARE_VOLUME2_PROTOCOL\r
-              instance. Key Pointer to a caller-allocated buffer\r
+              instance. \r
+\r
+  @param Key  Pointer to a caller-allocated buffer\r
               that contains implementation-specific data that is\r
               used to track where to begin the search for the\r
               next file. The size of the buffer must be at least\r
@@ -674,7 +675,15 @@ FIRMWARE_VOLUME2_PRIVATE_DATA gFirmwareVolume2PrivateDataTemplate = {
 //\r
 // Module globals\r
 //\r
+/**\r
+  This notification function is invoked when an instance of the\r
+  EFI_FIRMWARE_VOLUME_PROTOCOL is produced. It installs another instance of the\r
+  EFI_FIRMWARE_VOLUME2_PROTOCOL on the same handle.\r
+\r
+  @param  Event                 The event that occured\r
+  @param  Context               Context of event. Not used in this nofication function.\r
 \r
+**/\r
 VOID\r
 EFIAPI\r
 Fv2NotificationEvent (\r
@@ -958,7 +967,7 @@ Fv2SetVolumeAttributes (
   EFI_STATUS                     Status;\r
   UINTN                          Shift;\r
 \r
-  if (*FvAttributes & (EFI_FV2_READ_LOCK_STATUS | EFI_FV2_WRITE_LOCK_STATUS)) {\r
+  if ((*FvAttributes & (EFI_FV2_READ_LOCK_STATUS | EFI_FV2_WRITE_LOCK_STATUS)) != 0) {\r
     //\r
     // Framework FV protocol does not support EFI_FV2_READ_LOCK_* | EFI_FV2_WRITE_LOCK_*\r
     //\r
@@ -990,8 +999,8 @@ Fv2SetVolumeAttributes (
   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
@@ -1064,7 +1073,7 @@ Fv2SetVolumeAttributes (
 \r
   @retval EFI_OUT_OF_RESOURCES  An allocation failure occurred.\r
 \r
-  @retavl EFI_NOT_FOUND   Name was not found in the firmware\r
+  @retval EFI_NOT_FOUND   Name was not found in the firmware\r
                           volume.\r
 \r
   @retval EFI_DEVICE_ERROR  A hardware error occurred when\r
@@ -1108,11 +1117,9 @@ Fv2ReadFile (
   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
-  of the Buffer parameter. The input value of Buffer is used to\r
-  determine if the output buffer is caller allocated or is\r
+  sections found in the specified file.The output buffer is specified \r
+  by a double indirection of the Buffer parameter. The input value of Buffer \r
+  is used to determine if the output buffer is caller allocated or is\r
   dynamically allocated by ReadSection(). If the input value of\r
   Buffer!=NULL, it indicates that the output buffer is caller\r
   allocated. In this case, the input value of *BufferSize\r
@@ -1252,9 +1259,10 @@ Fv2ReadSection (
   undefined. Type EFI_TPL is defined in RaiseTPL() in the UEFI 2.0\r
   specification.\r
 \r
-  @param This Indicates the EFI_FIRMWARE_VOLUME2_PROTOCOL\r
-              instance. NumberOfFiles Indicates the number of\r
-              elements in the array pointed to by FileData.\r
+  @param This           Indicates the EFI_FIRMWARE_VOLUME2_PROTOCOL instance. \r
+\r
+  @param NumberOfFiles  Indicates the number of\r
+                        elements in the array pointed to by FileData.\r
 \r
 \r
   @param WritePolicy  Indicates the level of reliability for the\r
@@ -1341,7 +1349,9 @@ Fv2WriteFile (
 \r
 \r
   @param This Indicates the EFI_FIRMWARE_VOLUME2_PROTOCOL\r
-              instance. Key Pointer to a caller-allocated buffer\r
+              instance. \r
+\r
+  @param Key  Pointer to a caller-allocated buffer\r
               that contains implementation-specific data that is\r
               used to track where to begin the search for the\r
               next file. The size of the buffer must be at least\r