]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/Pei/FwVol/FwVol.c
MdeModulePkg PeiCore: Improve comment semantics
[mirror_edk2.git] / MdeModulePkg / Core / Pei / FwVol / FwVol.c
index f4642c47c13ad65eb2722ba5f1b0221973cc09d4..b3661146f29c8acb1a4e47f1b6471ef60bfe612d 100644 (file)
@@ -13,12 +13,12 @@ EFI_PEI_NOTIFY_DESCRIPTOR mNotifyOnFvInfoList[] = {
   {\r
     EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK,\r
     &gEfiPeiFirmwareVolumeInfoPpiGuid,\r
-    FirmwareVolmeInfoPpiNotifyCallback\r
+    FirmwareVolumeInfoPpiNotifyCallback\r
   },\r
   {\r
     (EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),\r
     &gEfiPeiFirmwareVolumeInfo2PpiGuid,\r
-    FirmwareVolmeInfoPpiNotifyCallback\r
+    FirmwareVolumeInfoPpiNotifyCallback\r
   }\r
 };\r
 \r
@@ -447,7 +447,7 @@ FindFileEx (
 }\r
 \r
 /**\r
-  Initialize PeiCore Fv List.\r
+  Initialize PeiCore FV List.\r
 \r
   @param PrivateData     - Pointer to PEI_CORE_INSTANCE.\r
   @param SecCoreData     - Pointer to EFI_SEC_PEI_HAND_OFF.\r
@@ -520,7 +520,7 @@ PeiInitializeFv (
 \r
   //\r
   // Post a call-back for the FvInfoPPI and FvInfo2PPI services to expose\r
-  // additional Fvs to PeiCore.\r
+  // additional FVs to PeiCore.\r
   //\r
   Status = PeiServicesNotifyPpi (mNotifyOnFvInfoList);\r
   ASSERT_EFI_ERROR (Status);\r
@@ -528,7 +528,7 @@ PeiInitializeFv (
 }\r
 \r
 /**\r
-  Process Firmware Volum Information once FvInfoPPI or FvInfo2PPI install.\r
+  Process Firmware Volume Information once FvInfoPPI or FvInfo2PPI install.\r
   The FV Info will be registered into PeiCore private data structure.\r
   And search the inside FV image, if found, the new FV INFO(2) PPI will be installed.\r
 \r
@@ -537,12 +537,12 @@ PeiInitializeFv (
   @param Ppi               Address of the PPI that was installed.\r
 \r
   @retval EFI_SUCCESS    The FV Info is registered into PeiCore private data structure.\r
-  @return if not EFI_SUCESS, fail to verify FV.\r
+  @return if not EFI_SUCCESS, fail to verify FV.\r
 \r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
-FirmwareVolmeInfoPpiNotifyCallback (\r
+FirmwareVolumeInfoPpiNotifyCallback (\r
   IN EFI_PEI_SERVICES              **PeiServices,\r
   IN EFI_PEI_NOTIFY_DESCRIPTOR     *NotifyDescriptor,\r
   IN VOID                          *Ppi\r
@@ -593,7 +593,7 @@ FirmwareVolmeInfoPpiNotifyCallback (
   }\r
 \r
   //\r
-  // Locate the corresponding FV_PPI according to founded FV's format guid\r
+  // Locate the corresponding FV_PPI according to the format GUID of the FV found\r
   //\r
   Status = PeiServicesLocatePpi (\r
              &FvInfo2Ppi.FvFormat,\r
@@ -620,7 +620,7 @@ FirmwareVolmeInfoPpiNotifyCallback (
           PrivateData->Fv[FvIndex].AuthenticationStatus = FvInfo2Ppi.AuthenticationStatus;\r
           DEBUG ((EFI_D_INFO, "Update AuthenticationStatus of the %dth FV to 0x%x!\n", FvIndex, FvInfo2Ppi.AuthenticationStatus));\r
         }\r
-        DEBUG ((EFI_D_INFO, "The Fv %p has already been processed!\n", FvInfo2Ppi.FvInfo));\r
+        DEBUG ((DEBUG_INFO, "The FV %p has already been processed!\n", FvInfo2Ppi.FvInfo));\r
         return EFI_SUCCESS;\r
       }\r
     }\r
@@ -661,7 +661,7 @@ FirmwareVolmeInfoPpiNotifyCallback (
     PrivateData->FvCount ++;\r
 \r
     //\r
-    // Scan and process the new discoveried FV for EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE\r
+    // Scan and process the new discovered FV for EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE\r
     //\r
     FileHandle = NULL;\r
     do {\r
@@ -1359,11 +1359,11 @@ GetFvUsedSize (
 }\r
 \r
 /**\r
-  Get Fv image(s) from the FV type file, then install FV INFO(2) ppi, Build FV(2, 3) hob.\r
+  Get FV image(s) from the FV type file, then install FV INFO(2) PPI, Build FV(2, 3) HOB.\r
 \r
   @param PrivateData          PeiCore's private data structure\r
-  @param ParentFvCoreHandle   Pointer of EFI_CORE_FV_HANDLE to parent Fv image that contain this Fv image.\r
-  @param ParentFvFileHandle   File handle of a Fv type file that contain this Fv image.\r
+  @param ParentFvCoreHandle   Pointer of EFI_CORE_FV_HANDLE to parent FV image that contain this FV image.\r
+  @param ParentFvFileHandle   File handle of a FV type file that contain this FV image.\r
 \r
   @retval EFI_NOT_FOUND         FV image can't be found.\r
   @retval EFI_SUCCESS           Successfully to process it.\r
@@ -1533,7 +1533,7 @@ ProcessFvFile (
       );\r
 \r
     //\r
-    // Inform the extracted FvImage to Fv HOB consumer phase, i.e. DXE phase\r
+    // Expose the extracted FvImage to the FV HOB consumer phase, i.e. DXE phase\r
     //\r
     BuildFvHob (\r
       (EFI_PHYSICAL_ADDRESS) (UINTN) FvHeader,\r
@@ -1619,7 +1619,7 @@ PeiFfsFvPpiProcessVolume (
 \r
   //\r
   // The build-in EFI_PEI_FIRMWARE_VOLUME_PPI for FFS2/FFS3 support memory-mapped\r
-  // FV image and the handle is pointed to Fv image's buffer.\r
+  // FV image and the handle is pointed to FV image's buffer.\r
   //\r
   *FvHandle = (EFI_PEI_FV_HANDLE) Buffer;\r
 \r
@@ -1915,7 +1915,7 @@ PeiFfsFvPpiGetVolumeInfo (
   CopyMem (&FwVolHeader, FvHandle, sizeof (EFI_FIRMWARE_VOLUME_HEADER));\r
 \r
   //\r
-  // Check Fv Image Signature\r
+  // Check FV Image Signature\r
   //\r
   if (FwVolHeader.Signature != EFI_FVH_SIGNATURE) {\r
     return EFI_INVALID_PARAMETER;\r
@@ -2087,12 +2087,13 @@ FvHandleToCoreHandle (
 }\r
 \r
 /**\r
-  Get instance of PEI_CORE_FV_HANDLE for next volume according to given index.\r
+  Gets a PEI_CORE_FV_HANDLE instance for the next volume according to the given index.\r
 \r
-  This routine also will install FvInfo ppi for FV hob in PI ways.\r
+  This routine also will install an instance of the FvInfo PPI for the FV HOB\r
+  as defined in the PI specification.\r
 \r
   @param Private    Pointer of PEI_CORE_INSTANCE\r
-  @param Instance   The index of FV want to be searched.\r
+  @param Instance   Index of the FV to search\r
 \r
   @return Instance of PEI_CORE_FV_HANDLE.\r
 **/\r
@@ -2185,13 +2186,14 @@ PeiReinitializeFv (
 }\r
 \r
 /**\r
-  Report the information for a new discoveried FV in unknown third-party format.\r
+  Report the information for a newly discovered FV in an unknown format.\r
 \r
-  If the EFI_PEI_FIRMWARE_VOLUME_PPI has not been installed for third-party FV format, but\r
-  the FV in this format has been discoveried, then this FV's information will be cached into\r
-  PEI_CORE_INSTANCE's UnknownFvInfo array.\r
-  Also a notification would be installed for unknown third-party FV format guid, if EFI_PEI_FIRMWARE_VOLUME_PPI\r
-  is installed later by platform's PEIM, the original unknown third-party FV will be processed by\r
+  If the EFI_PEI_FIRMWARE_VOLUME_PPI has not been installed for a third-party FV format, but\r
+  the FV has been discovered, then the information of this FV will be cached into PEI_CORE_INSTANCE's\r
+  UnknownFvInfo array.\r
+\r
+  Also a notification would be installed for unknown FV format GUID, if EFI_PEI_FIRMWARE_VOLUME_PPI\r
+  is installed later by platform's PEIM, the original unknown FV will be processed by\r
   using new installed EFI_PEI_FIRMWARE_VOLUME_PPI.\r
 \r
   @param PrivateData  Point to instance of PEI_CORE_INSTANCE\r
@@ -2242,13 +2244,13 @@ AddUnknownFormatFvInfo (
 }\r
 \r
 /**\r
-  Find the FV information according to third-party FV format guid.\r
+  Find the FV information according to third-party FV format GUID.\r
 \r
-  This routine also will remove the FV information found by given FV format guid from\r
+  This routine also will remove the FV information found by given FV format GUID from\r
   PrivateData->UnknownFvInfo[].\r
 \r
   @param PrivateData      Point to instance of PEI_CORE_INSTANCE\r
-  @param Format           Point to given FV format guid\r
+  @param Format           Point to given FV format GUID\r
   @param FvInfo           On return, the pointer of FV information buffer\r
   @param FvInfoSize       On return, the size of FV information buffer.\r
   @param AuthenticationStatus On return, the authentication status of FV information buffer.\r
@@ -2298,7 +2300,7 @@ FindUnknownFormatFvInfo (
   Notification callback function for EFI_PEI_FIRMWARE_VOLUME_PPI.\r
 \r
   When a EFI_PEI_FIRMWARE_VOLUME_PPI is installed to support new FV format, this\r
-  routine is called to process all discoveried FVs in this format.\r
+  routine is called to process all discovered FVs in this format.\r
 \r
   @param PeiServices       An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation\r
   @param NotifyDescriptor  Address of the notification descriptor data structure.\r
@@ -2352,7 +2354,7 @@ ThirdPartyFvPpiNotifyCallback (
     IsProcessed = FALSE;\r
     for (FvIndex = 0; FvIndex < PrivateData->FvCount; FvIndex ++) {\r
       if (PrivateData->Fv[FvIndex].FvHandle == FvHandle) {\r
-        DEBUG ((EFI_D_INFO, "The Fv %p has already been processed!\n", FvInfo));\r
+        DEBUG ((DEBUG_INFO, "The FV %p has already been processed!\n", FvInfo));\r
         IsProcessed = TRUE;\r
         break;\r
       }\r
@@ -2398,7 +2400,7 @@ ThirdPartyFvPpiNotifyCallback (
     PrivateData->FvCount ++;\r
 \r
     //\r
-    // Scan and process the new discoveried FV for EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE\r
+    // Scan and process the new discovered FV for EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE\r
     //\r
     FileHandle = NULL;\r
     do {\r