]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/Pei/FwVol/FwVol.c
MdeModulePkg: Clean up source files
[mirror_edk2.git] / MdeModulePkg / Core / Pei / FwVol / FwVol.c
index 4150b338b211847a17cf2d2968a11b11e1e46976..65c485549718430eb50253adfe52d4790cd4fc20 100644 (file)
@@ -1,15 +1,15 @@
 /** @file\r
   Pei Core Firmware File System service routines.\r
 /** @file\r
   Pei Core Firmware File System service routines.\r
-  \r
+\r
 Copyright (c) 2015 HP Development Company, L.P.\r
 Copyright (c) 2015 HP Development Company, L.P.\r
-Copyright (c) 2006 - 2017, 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
+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
 \r
 **/\r
 \r
 \r
 **/\r
 \r
@@ -19,12 +19,12 @@ EFI_PEI_NOTIFY_DESCRIPTOR mNotifyOnFvInfoList[] = {
   {\r
     EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK,\r
     &gEfiPeiFirmwareVolumeInfoPpiGuid,\r
   {\r
     EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK,\r
     &gEfiPeiFirmwareVolumeInfoPpiGuid,\r
-    FirmwareVolmeInfoPpiNotifyCallback \r
+    FirmwareVolmeInfoPpiNotifyCallback\r
   },\r
   {\r
     (EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),\r
     &gEfiPeiFirmwareVolumeInfo2PpiGuid,\r
   },\r
   {\r
     (EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),\r
     &gEfiPeiFirmwareVolumeInfo2PpiGuid,\r
-    FirmwareVolmeInfoPpiNotifyCallback \r
+    FirmwareVolmeInfoPpiNotifyCallback\r
   }\r
 };\r
 \r
   }\r
 };\r
 \r
@@ -61,7 +61,7 @@ PEI_FW_VOL_INSTANCE mPeiFfs3FwVol = {
     EFI_PEI_FIRMWARE_VOLUME_PPI_REVISION\r
   }\r
 };\r
     EFI_PEI_FIRMWARE_VOLUME_PPI_REVISION\r
   }\r
 };\r
-            \r
+\r
 EFI_PEI_PPI_DESCRIPTOR  mPeiFfs2FvPpiList = {\r
   (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),\r
   &gEfiFirmwareFileSystem2Guid,\r
 EFI_PEI_PPI_DESCRIPTOR  mPeiFfs2FvPpiList = {\r
   (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),\r
   &gEfiFirmwareFileSystem2Guid,\r
@@ -136,7 +136,7 @@ FfsAttributes2FvFileAttributes (
                          in the Attributes field.\r
   @param FfsHeader       Pointer to FFS File Header.\r
 \r
                          in the Attributes field.\r
   @param FfsHeader       Pointer to FFS File Header.\r
 \r
-  @retval EFI_FFS_FILE_STATE File state is set by the highest none zero bit \r
+  @retval EFI_FFS_FILE_STATE File state is set by the highest none zero bit\r
                              in the header State field.\r
 **/\r
 EFI_FFS_FILE_STATE\r
                              in the header State field.\r
 **/\r
 EFI_FFS_FILE_STATE\r
@@ -153,7 +153,7 @@ GetFileState(
   if (ErasePolarity != 0) {\r
     FileState = (EFI_FFS_FILE_STATE)~FileState;\r
   }\r
   if (ErasePolarity != 0) {\r
     FileState = (EFI_FFS_FILE_STATE)~FileState;\r
   }\r
-  \r
+\r
   //\r
   // Get file state set by its highest none zero bit.\r
   //\r
   //\r
   // Get file state set by its highest none zero bit.\r
   //\r
@@ -163,7 +163,7 @@ GetFileState(
   }\r
 \r
   return HighestBit;\r
   }\r
 \r
   return HighestBit;\r
-} \r
+}\r
 \r
 /**\r
   Calculates the checksum of the header of a file.\r
 \r
 /**\r
   Calculates the checksum of the header of a file.\r
@@ -206,7 +206,7 @@ CalculateHeaderChecksum (
   Find FV handler according to FileHandle in that FV.\r
 \r
   @param FileHandle      Handle of file image\r
   Find FV handler according to FileHandle in that FV.\r
 \r
   @param FileHandle      Handle of file image\r
-  \r
+\r
   @return Pointer to instance of PEI_CORE_FV_HANDLE.\r
 **/\r
 PEI_CORE_FV_HANDLE*\r
   @return Pointer to instance of PEI_CORE_FV_HANDLE.\r
 **/\r
 PEI_CORE_FV_HANDLE*\r
@@ -221,10 +221,10 @@ FileHandleToVolume (
 \r
   PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS (GetPeiServicesTablePointer ());\r
   BestIndex   = PrivateData->FvCount;\r
 \r
   PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS (GetPeiServicesTablePointer ());\r
   BestIndex   = PrivateData->FvCount;\r
-  \r
+\r
   //\r
   // Find the best matched FV image that includes this FileHandle.\r
   //\r
   // Find the best matched FV image that includes this FileHandle.\r
-  // FV may include the child FV, and they are in the same continuous space. \r
+  // FV may include the child FV, and they are in the same continuous space.\r
   // If FileHandle is from the child FV, the updated logic can find its matched FV.\r
   //\r
   for (Index = 0; Index < PrivateData->FvCount; Index++) {\r
   // If FileHandle is from the child FV, the updated logic can find its matched FV.\r
   //\r
   for (Index = 0; Index < PrivateData->FvCount; Index++) {\r
@@ -253,8 +253,8 @@ FileHandleToVolume (
   FFS volume as defined by SearchType. The search starts from FileHeader inside\r
   the Firmware Volume defined by FwVolHeader.\r
   If SearchType is EFI_FV_FILETYPE_ALL, the first FFS file will return without check its file type.\r
   FFS volume as defined by SearchType. The search starts from FileHeader inside\r
   the Firmware Volume defined by FwVolHeader.\r
   If SearchType is EFI_FV_FILETYPE_ALL, the first FFS file will return without check its file type.\r
-  If SearchType is PEI_CORE_INTERNAL_FFS_FILE_DISPATCH_TYPE, \r
-  the first PEIM, or COMBINED PEIM or FV file type FFS file will return.  \r
+  If SearchType is PEI_CORE_INTERNAL_FFS_FILE_DISPATCH_TYPE,\r
+  the first PEIM, or COMBINED PEIM or FV file type FFS file will return.\r
 \r
   @param FvHandle        Pointer to the FV header of the volume to search\r
   @param FileName        File name\r
 \r
   @param FvHandle        Pointer to the FV header of the volume to search\r
   @param FileName        File name\r
@@ -288,7 +288,7 @@ FindFileEx (
   UINT8                                 FileState;\r
   UINT8                                 DataCheckSum;\r
   BOOLEAN                               IsFfs3Fv;\r
   UINT8                                 FileState;\r
   UINT8                                 DataCheckSum;\r
   BOOLEAN                               IsFfs3Fv;\r
-  \r
+\r
   //\r
   // Convert the handle of FV to FV header for memory-mapped firmware volume\r
   //\r
   //\r
   // Convert the handle of FV to FV header for memory-mapped firmware volume\r
   //\r
@@ -303,7 +303,7 @@ FindFileEx (
   } else {\r
     ErasePolarity = 0;\r
   }\r
   } else {\r
     ErasePolarity = 0;\r
   }\r
-  \r
+\r
   //\r
   // If FileHeader is not specified (NULL) or FileName is not NULL,\r
   // start with the first file in the firmware volume.  Otherwise,\r
   //\r
   // If FileHeader is not specified (NULL) or FileName is not NULL,\r
   // start with the first file in the firmware volume.  Otherwise,\r
@@ -336,13 +336,13 @@ FindFileEx (
     FileOccupiedSize = GET_OCCUPIED_SIZE (FileLength, 8);\r
     FfsFileHeader = (EFI_FFS_FILE_HEADER *)((UINT8 *)*FileHeader + FileOccupiedSize);\r
   }\r
     FileOccupiedSize = GET_OCCUPIED_SIZE (FileLength, 8);\r
     FfsFileHeader = (EFI_FFS_FILE_HEADER *)((UINT8 *)*FileHeader + FileOccupiedSize);\r
   }\r
-  \r
+\r
   FileOffset = (UINT32) ((UINT8 *)FfsFileHeader - (UINT8 *)FwVolHeader);\r
   ASSERT (FileOffset <= 0xFFFFFFFF);\r
 \r
   while (FileOffset < (FvLength - sizeof (EFI_FFS_FILE_HEADER))) {\r
     //\r
   FileOffset = (UINT32) ((UINT8 *)FfsFileHeader - (UINT8 *)FwVolHeader);\r
   ASSERT (FileOffset <= 0xFFFFFFFF);\r
 \r
   while (FileOffset < (FvLength - sizeof (EFI_FFS_FILE_HEADER))) {\r
     //\r
-    // Get FileState which is the highest bit of the State \r
+    // Get FileState which is the highest bit of the State\r
     //\r
     FileState = GetFileState (ErasePolarity, FfsFileHeader);\r
     switch (FileState) {\r
     //\r
     FileState = GetFileState (ErasePolarity, FfsFileHeader);\r
     switch (FileState) {\r
@@ -360,7 +360,7 @@ FindFileEx (
         FfsFileHeader =  (EFI_FFS_FILE_HEADER *) ((UINT8 *) FfsFileHeader + sizeof (EFI_FFS_FILE_HEADER));\r
       }\r
       break;\r
         FfsFileHeader =  (EFI_FFS_FILE_HEADER *) ((UINT8 *) FfsFileHeader + sizeof (EFI_FFS_FILE_HEADER));\r
       }\r
       break;\r
-        \r
+\r
     case EFI_FILE_DATA_VALID:\r
     case EFI_FILE_MARKED_FOR_UPDATE:\r
       if (CalculateHeaderChecksum (FfsFileHeader) != 0) {\r
     case EFI_FILE_DATA_VALID:\r
     case EFI_FILE_MARKED_FOR_UPDATE:\r
       if (CalculateHeaderChecksum (FfsFileHeader) != 0) {\r
@@ -404,29 +404,29 @@ FindFileEx (
           return EFI_SUCCESS;\r
         }\r
       } else if (SearchType == PEI_CORE_INTERNAL_FFS_FILE_DISPATCH_TYPE) {\r
           return EFI_SUCCESS;\r
         }\r
       } else if (SearchType == PEI_CORE_INTERNAL_FFS_FILE_DISPATCH_TYPE) {\r
-        if ((FfsFileHeader->Type == EFI_FV_FILETYPE_PEIM) || \r
+        if ((FfsFileHeader->Type == EFI_FV_FILETYPE_PEIM) ||\r
             (FfsFileHeader->Type == EFI_FV_FILETYPE_COMBINED_PEIM_DRIVER) ||\r
             (FfsFileHeader->Type == EFI_FV_FILETYPE_COMBINED_PEIM_DRIVER) ||\r
-            (FfsFileHeader->Type == EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE)) { \r
-          \r
+            (FfsFileHeader->Type == EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE)) {\r
+\r
           *FileHeader = FfsFileHeader;\r
           return EFI_SUCCESS;\r
         } else if (AprioriFile != NULL) {\r
           if (FfsFileHeader->Type == EFI_FV_FILETYPE_FREEFORM) {\r
             if (CompareGuid (&FfsFileHeader->Name, &gPeiAprioriFileNameGuid)) {\r
               *AprioriFile = FfsFileHeader;\r
           *FileHeader = FfsFileHeader;\r
           return EFI_SUCCESS;\r
         } else if (AprioriFile != NULL) {\r
           if (FfsFileHeader->Type == EFI_FV_FILETYPE_FREEFORM) {\r
             if (CompareGuid (&FfsFileHeader->Name, &gPeiAprioriFileNameGuid)) {\r
               *AprioriFile = FfsFileHeader;\r
-            }           \r
-          } \r
+            }\r
+          }\r
         }\r
         }\r
-      } else if (((SearchType == FfsFileHeader->Type) || (SearchType == EFI_FV_FILETYPE_ALL)) && \r
-                 (FfsFileHeader->Type != EFI_FV_FILETYPE_FFS_PAD)) { \r
+      } else if (((SearchType == FfsFileHeader->Type) || (SearchType == EFI_FV_FILETYPE_ALL)) &&\r
+                 (FfsFileHeader->Type != EFI_FV_FILETYPE_FFS_PAD)) {\r
         *FileHeader = FfsFileHeader;\r
         return EFI_SUCCESS;\r
       }\r
 \r
         *FileHeader = FfsFileHeader;\r
         return EFI_SUCCESS;\r
       }\r
 \r
-      FileOffset    += FileOccupiedSize; \r
+      FileOffset    += FileOccupiedSize;\r
       FfsFileHeader =  (EFI_FFS_FILE_HEADER *)((UINT8 *)FfsFileHeader + FileOccupiedSize);\r
       break;\r
       FfsFileHeader =  (EFI_FFS_FILE_HEADER *)((UINT8 *)FfsFileHeader + FileOccupiedSize);\r
       break;\r
-    \r
+\r
     case EFI_FILE_DELETED:\r
       if (IS_FFS_FILE2 (FfsFileHeader)) {\r
         if (!IsFfs3Fv) {\r
     case EFI_FILE_DELETED:\r
       if (IS_FFS_FILE2 (FfsFileHeader)) {\r
         if (!IsFfs3Fv) {\r
@@ -445,11 +445,11 @@ FindFileEx (
     default:\r
       *FileHeader = NULL;\r
       return EFI_NOT_FOUND;\r
     default:\r
       *FileHeader = NULL;\r
       return EFI_NOT_FOUND;\r
-    } \r
+    }\r
   }\r
   }\r
-  \r
+\r
   *FileHeader = NULL;\r
   *FileHeader = NULL;\r
-  return EFI_NOT_FOUND;  \r
+  return EFI_NOT_FOUND;\r
 }\r
 \r
 /**\r
 }\r
 \r
 /**\r
@@ -458,7 +458,7 @@ FindFileEx (
   @param PrivateData     - Pointer to PEI_CORE_INSTANCE.\r
   @param SecCoreData     - Pointer to EFI_SEC_PEI_HAND_OFF.\r
 **/\r
   @param PrivateData     - Pointer to PEI_CORE_INSTANCE.\r
   @param SecCoreData     - Pointer to EFI_SEC_PEI_HAND_OFF.\r
 **/\r
-VOID \r
+VOID\r
 PeiInitializeFv (\r
   IN  PEI_CORE_INSTANCE           *PrivateData,\r
   IN CONST EFI_SEC_PEI_HAND_OFF   *SecCoreData\r
 PeiInitializeFv (\r
   IN  PEI_CORE_INSTANCE           *PrivateData,\r
   IN CONST EFI_SEC_PEI_HAND_OFF   *SecCoreData\r
@@ -468,7 +468,7 @@ PeiInitializeFv (
   EFI_PEI_FIRMWARE_VOLUME_PPI   *FvPpi;\r
   EFI_PEI_FV_HANDLE             FvHandle;\r
   EFI_FIRMWARE_VOLUME_HEADER    *BfvHeader;\r
   EFI_PEI_FIRMWARE_VOLUME_PPI   *FvPpi;\r
   EFI_PEI_FV_HANDLE             FvHandle;\r
   EFI_FIRMWARE_VOLUME_HEADER    *BfvHeader;\r
-  \r
+\r
   //\r
   // Install FV_PPI for FFS2 file system.\r
   //\r
   //\r
   // Install FV_PPI for FFS2 file system.\r
   //\r
@@ -480,7 +480,7 @@ PeiInitializeFv (
   PeiServicesInstallPpi (&mPeiFfs3FvPpiList);\r
 \r
   BfvHeader = (EFI_FIRMWARE_VOLUME_HEADER *)SecCoreData->BootFirmwareVolumeBase;\r
   PeiServicesInstallPpi (&mPeiFfs3FvPpiList);\r
 \r
   BfvHeader = (EFI_FIRMWARE_VOLUME_HEADER *)SecCoreData->BootFirmwareVolumeBase;\r
-  \r
+\r
   //\r
   // The FV_PPI in BFV's format should be installed.\r
   //\r
   //\r
   // The FV_PPI in BFV's format should be installed.\r
   //\r
@@ -491,7 +491,7 @@ PeiInitializeFv (
              (VOID**)&FvPpi\r
              );\r
   ASSERT_EFI_ERROR (Status);\r
              (VOID**)&FvPpi\r
              );\r
   ASSERT_EFI_ERROR (Status);\r
-    \r
+\r
   //\r
   // Get handle of BFV\r
   //\r
   //\r
   // Get handle of BFV\r
   //\r
@@ -511,15 +511,15 @@ PeiInitializeFv (
   PrivateData->Fv[PrivateData->FvCount].FvHandle = FvHandle;\r
   PrivateData->Fv[PrivateData->FvCount].AuthenticationStatus = 0;\r
   DEBUG ((\r
   PrivateData->Fv[PrivateData->FvCount].FvHandle = FvHandle;\r
   PrivateData->Fv[PrivateData->FvCount].AuthenticationStatus = 0;\r
   DEBUG ((\r
-    EFI_D_INFO, \r
-    "The %dth FV start address is 0x%11p, size is 0x%08x, handle is 0x%p\n", \r
-    (UINT32) PrivateData->FvCount, \r
-    (VOID *) BfvHeader, \r
+    EFI_D_INFO,\r
+    "The %dth FV start address is 0x%11p, size is 0x%08x, handle is 0x%p\n",\r
+    (UINT32) PrivateData->FvCount,\r
+    (VOID *) BfvHeader,\r
     (UINT32) BfvHeader->FvLength,\r
     FvHandle\r
     (UINT32) BfvHeader->FvLength,\r
     FvHandle\r
-    ));    \r
+    ));\r
   PrivateData->FvCount ++;\r
   PrivateData->FvCount ++;\r
-                            \r
+\r
   //\r
   // Post a call-back for the FvInfoPPI and FvInfo2PPI services to expose\r
   // additional Fvs to PeiCore.\r
   //\r
   // Post a call-back for the FvInfoPPI and FvInfo2PPI services to expose\r
   // additional Fvs to PeiCore.\r
@@ -528,7 +528,7 @@ PeiInitializeFv (
   ASSERT_EFI_ERROR (Status);\r
 \r
 }\r
   ASSERT_EFI_ERROR (Status);\r
 \r
 }\r
-  \r
+\r
 /**\r
   Process Firmware Volum Information once FvInfoPPI or FvInfo2PPI install.\r
   The FV Info will be registered into PeiCore private data structure.\r
 /**\r
   Process Firmware Volum Information once FvInfoPPI or FvInfo2PPI install.\r
   The FV Info will be registered into PeiCore private data structure.\r
@@ -619,7 +619,7 @@ FirmwareVolmeInfoPpiNotifyCallback (
       if (PrivateData->Fv[FvIndex].FvHandle == FvHandle) {\r
         if (IsFvInfo2 && (FvInfo2Ppi.AuthenticationStatus != PrivateData->Fv[FvIndex].AuthenticationStatus)) {\r
           PrivateData->Fv[FvIndex].AuthenticationStatus = FvInfo2Ppi.AuthenticationStatus;\r
       if (PrivateData->Fv[FvIndex].FvHandle == FvHandle) {\r
         if (IsFvInfo2 && (FvInfo2Ppi.AuthenticationStatus != PrivateData->Fv[FvIndex].AuthenticationStatus)) {\r
           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
+          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
         return EFI_SUCCESS;\r
         }\r
         DEBUG ((EFI_D_INFO, "The Fv %p has already been processed!\n", FvInfo2Ppi.FvInfo));\r
         return EFI_SUCCESS;\r
@@ -641,17 +641,17 @@ FirmwareVolmeInfoPpiNotifyCallback (
     PrivateData->Fv[PrivateData->FvCount].AuthenticationStatus = FvInfo2Ppi.AuthenticationStatus;\r
     CurFvCount = PrivateData->FvCount;\r
     DEBUG ((\r
     PrivateData->Fv[PrivateData->FvCount].AuthenticationStatus = FvInfo2Ppi.AuthenticationStatus;\r
     CurFvCount = PrivateData->FvCount;\r
     DEBUG ((\r
-      EFI_D_INFO, \r
-      "The %dth FV start address is 0x%11p, size is 0x%08x, handle is 0x%p\n", \r
+      EFI_D_INFO,\r
+      "The %dth FV start address is 0x%11p, size is 0x%08x, handle is 0x%p\n",\r
       (UINT32) CurFvCount,\r
       (UINT32) CurFvCount,\r
-      (VOID *) FvInfo2Ppi.FvInfo, \r
+      (VOID *) FvInfo2Ppi.FvInfo,\r
       FvInfo2Ppi.FvInfoSize,\r
       FvHandle\r
       FvInfo2Ppi.FvInfoSize,\r
       FvHandle\r
-      ));    \r
+      ));\r
     PrivateData->FvCount ++;\r
 \r
     //\r
     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 discoveried FV for EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE\r
     //\r
     FileHandle = NULL;\r
     do {\r
     //\r
     FileHandle = NULL;\r
     do {\r
@@ -676,17 +676,17 @@ FirmwareVolmeInfoPpiNotifyCallback (
             continue;\r
           }\r
         }\r
             continue;\r
           }\r
         }\r
-        \r
+\r
         DEBUG ((EFI_D_INFO, "Found firmware volume Image File %p in FV[%d] %p\n", FileHandle, CurFvCount, FvHandle));\r
         ProcessFvFile (PrivateData, &PrivateData->Fv[CurFvCount], FileHandle);\r
       }\r
     } while (FileHandle != NULL);\r
   } else {\r
     DEBUG ((EFI_D_ERROR, "Fail to process FV %p because no corresponding EFI_FIRMWARE_VOLUME_PPI is found!\n", FvInfo2Ppi.FvInfo));\r
         DEBUG ((EFI_D_INFO, "Found firmware volume Image File %p in FV[%d] %p\n", FileHandle, CurFvCount, FvHandle));\r
         ProcessFvFile (PrivateData, &PrivateData->Fv[CurFvCount], FileHandle);\r
       }\r
     } while (FileHandle != NULL);\r
   } else {\r
     DEBUG ((EFI_D_ERROR, "Fail to process FV %p because no corresponding EFI_FIRMWARE_VOLUME_PPI is found!\n", FvInfo2Ppi.FvInfo));\r
-    \r
+\r
     AddUnknownFormatFvInfo (PrivateData, &FvInfo2Ppi);\r
   }\r
     AddUnknownFormatFvInfo (PrivateData, &FvInfo2Ppi);\r
   }\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
@@ -699,7 +699,7 @@ FirmwareVolmeInfoPpiNotifyCallback (
 \r
   @return TRUE      The GuidedSectionGuid could be identified, and the pointer to\r
                     the Guided Section Extraction Ppi will be returned to *GuidedSectionExtraction.\r
 \r
   @return TRUE      The GuidedSectionGuid could be identified, and the pointer to\r
                     the Guided Section Extraction Ppi will be returned to *GuidedSectionExtraction.\r
-  @return FALSE     The GuidedSectionGuid could not be identified, or \r
+  @return FALSE     The GuidedSectionGuid could not be identified, or\r
                     the Guided Section Extraction Ppi has not been installed yet.\r
 \r
 **/\r
                     the Guided Section Extraction Ppi has not been installed yet.\r
 \r
 **/\r
@@ -740,10 +740,10 @@ VerifyGuidedSectionGuid (
 }\r
 \r
 /**\r
 }\r
 \r
 /**\r
-  Go through the file to search SectionType section. \r
-  Search within encapsulation sections (compression and GUIDed) recursively, \r
+  Go through the file to search SectionType section.\r
+  Search within encapsulation sections (compression and GUIDed) recursively,\r
   until the match section is found.\r
   until the match section is found.\r
-  \r
+\r
   @param PeiServices       An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
   @param SectionType       Filter to find only section of this type.\r
   @param SectionInstance   Pointer to the filter to find the specific instance of section.\r
   @param PeiServices       An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
   @param SectionType       Filter to find only section of this type.\r
   @param SectionInstance   Pointer to the filter to find the specific instance of section.\r
@@ -862,8 +862,8 @@ ProcessSection (
                      PeiServices,\r
                      SectionType,\r
                      SectionInstance,\r
                      PeiServices,\r
                      SectionType,\r
                      SectionInstance,\r
-                     PpiOutput, \r
-                     PpiOutputSize, \r
+                     PpiOutput,\r
+                     PpiOutputSize,\r
                      &TempOutputBuffer,\r
                      &TempAuthenticationStatus,\r
                      IsFfs3Fv\r
                      &TempOutputBuffer,\r
                      &TempAuthenticationStatus,\r
                      IsFfs3Fv\r
@@ -946,8 +946,8 @@ ProcessSection (
                      PeiServices,\r
                      SectionType,\r
                      SectionInstance,\r
                      PeiServices,\r
                      SectionType,\r
                      SectionInstance,\r
-                     PpiOutput, \r
-                     PpiOutputSize, \r
+                     PpiOutput,\r
+                     PpiOutputSize,\r
                      &TempOutputBuffer,\r
                      &TempAuthenticationStatus,\r
                      IsFfs3Fv\r
                      &TempOutputBuffer,\r
                      &TempAuthenticationStatus,\r
                      IsFfs3Fv\r
@@ -975,7 +975,7 @@ ProcessSection (
     ParsedLength += SectionLength;\r
     Section = (EFI_COMMON_SECTION_HEADER *)((UINT8 *)Section + SectionLength);\r
   }\r
     ParsedLength += SectionLength;\r
     Section = (EFI_COMMON_SECTION_HEADER *)((UINT8 *)Section + SectionLength);\r
   }\r
-  \r
+\r
   return EFI_NOT_FOUND;\r
 }\r
 \r
   return EFI_NOT_FOUND;\r
 }\r
 \r
@@ -1003,12 +1003,12 @@ PeiFfsFindSectionData (
   )\r
 {\r
   PEI_CORE_FV_HANDLE           *CoreFvHandle;\r
   )\r
 {\r
   PEI_CORE_FV_HANDLE           *CoreFvHandle;\r
-  \r
+\r
   CoreFvHandle = FileHandleToVolume (FileHandle);\r
   if ((CoreFvHandle == NULL) || (CoreFvHandle->FvPpi == NULL)) {\r
     return EFI_NOT_FOUND;\r
   }\r
   CoreFvHandle = FileHandleToVolume (FileHandle);\r
   if ((CoreFvHandle == NULL) || (CoreFvHandle->FvPpi == NULL)) {\r
     return EFI_NOT_FOUND;\r
   }\r
-  \r
+\r
   return CoreFvHandle->FvPpi->FindSectionByType (CoreFvHandle->FvPpi, SectionType, FileHandle, SectionData);\r
 }\r
 \r
   return CoreFvHandle->FvPpi->FindSectionByType (CoreFvHandle->FvPpi, SectionType, FileHandle, SectionData);\r
 }\r
 \r
@@ -1038,7 +1038,7 @@ PeiFfsFindSectionData3 (
   )\r
 {\r
   PEI_CORE_FV_HANDLE           *CoreFvHandle;\r
   )\r
 {\r
   PEI_CORE_FV_HANDLE           *CoreFvHandle;\r
-  \r
+\r
   CoreFvHandle = FileHandleToVolume (FileHandle);\r
   if ((CoreFvHandle == NULL) || (CoreFvHandle->FvPpi == NULL)) {\r
     return EFI_NOT_FOUND;\r
   CoreFvHandle = FileHandleToVolume (FileHandle);\r
   if ((CoreFvHandle == NULL) || (CoreFvHandle->FvPpi == NULL)) {\r
     return EFI_NOT_FOUND;\r
@@ -1081,9 +1081,9 @@ PeiFfsFindNextFile (
   )\r
 {\r
   PEI_CORE_FV_HANDLE      *CoreFvHandle;\r
   )\r
 {\r
   PEI_CORE_FV_HANDLE      *CoreFvHandle;\r
-  \r
+\r
   CoreFvHandle = FvHandleToCoreHandle (FvHandle);\r
   CoreFvHandle = FvHandleToCoreHandle (FvHandle);\r
-  \r
+\r
   //\r
   // To make backward compatiblity, if can not find corresponding the handle of FV\r
   // then treat FV as build-in FFS2/FFS3 format and memory mapped FV that FV handle is pointed\r
   //\r
   // To make backward compatiblity, if can not find corresponding the handle of FV\r
   // then treat FV as build-in FFS2/FFS3 format and memory mapped FV that FV handle is pointed\r
@@ -1091,12 +1091,12 @@ PeiFfsFindNextFile (
   //\r
   if ((CoreFvHandle == NULL) && FeaturePcdGet (PcdFrameworkCompatibilitySupport)) {\r
     return FindFileEx (FvHandle, NULL, SearchType, FileHandle, NULL);\r
   //\r
   if ((CoreFvHandle == NULL) && FeaturePcdGet (PcdFrameworkCompatibilitySupport)) {\r
     return FindFileEx (FvHandle, NULL, SearchType, FileHandle, NULL);\r
-  } \r
-  \r
+  }\r
+\r
   if ((CoreFvHandle == NULL) || CoreFvHandle->FvPpi == NULL) {\r
     return EFI_NOT_FOUND;\r
   }\r
   if ((CoreFvHandle == NULL) || CoreFvHandle->FvPpi == NULL) {\r
     return EFI_NOT_FOUND;\r
   }\r
-  \r
+\r
   return CoreFvHandle->FvPpi->FindFileByType (CoreFvHandle->FvPpi, SearchType, FvHandle, FileHandle);\r
 }\r
 \r
   return CoreFvHandle->FvPpi->FindFileByType (CoreFvHandle->FvPpi, SearchType, FvHandle, FileHandle);\r
 }\r
 \r
@@ -1114,7 +1114,7 @@ PeiFfsFindNextFile (
   @retval EFI_SUCCESS            The volume was found.\r
 \r
 **/\r
   @retval EFI_SUCCESS            The volume was found.\r
 \r
 **/\r
-EFI_STATUS \r
+EFI_STATUS\r
 EFIAPI\r
 PeiFfsFindNextVolume (\r
   IN CONST EFI_PEI_SERVICES         **PeiServices,\r
 EFIAPI\r
 PeiFfsFindNextVolume (\r
   IN CONST EFI_PEI_SERVICES         **PeiServices,\r
@@ -1124,21 +1124,21 @@ PeiFfsFindNextVolume (
 {\r
   PEI_CORE_INSTANCE  *Private;\r
   PEI_CORE_FV_HANDLE *CoreFvHandle;\r
 {\r
   PEI_CORE_INSTANCE  *Private;\r
   PEI_CORE_FV_HANDLE *CoreFvHandle;\r
-  \r
+\r
   if (VolumeHandle == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
   if (VolumeHandle == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   Private = PEI_CORE_INSTANCE_FROM_PS_THIS (PeiServices);\r
   Private = PEI_CORE_INSTANCE_FROM_PS_THIS (PeiServices);\r
-  \r
+\r
   CoreFvHandle = FindNextCoreFvHandle (Private, Instance);\r
   if (CoreFvHandle == NULL) {\r
     *VolumeHandle = NULL;\r
     return EFI_NOT_FOUND;\r
   }\r
   CoreFvHandle = FindNextCoreFvHandle (Private, Instance);\r
   if (CoreFvHandle == NULL) {\r
     *VolumeHandle = NULL;\r
     return EFI_NOT_FOUND;\r
   }\r
-  \r
+\r
   *VolumeHandle = CoreFvHandle->FvHandle;\r
   *VolumeHandle = CoreFvHandle->FvHandle;\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
@@ -1148,7 +1148,7 @@ PeiFfsFindNextVolume (
 \r
   @param FileName        A pointer to the name of the file to find within the firmware volume.\r
   @param VolumeHandle    The firmware volume to search\r
 \r
   @param FileName        A pointer to the name of the file to find within the firmware volume.\r
   @param VolumeHandle    The firmware volume to search\r
-  @param FileHandle      Upon exit, points to the found file's handle \r
+  @param FileHandle      Upon exit, points to the found file's handle\r
                          or NULL if it could not be found.\r
 \r
   @retval EFI_SUCCESS            File was found.\r
                          or NULL if it could not be found.\r
 \r
   @retval EFI_SUCCESS            File was found.\r
@@ -1157,7 +1157,7 @@ PeiFfsFindNextVolume (
 \r
 **/\r
 EFI_STATUS\r
 \r
 **/\r
 EFI_STATUS\r
-EFIAPI \r
+EFIAPI\r
 PeiFfsFindFileByName (\r
   IN  CONST EFI_GUID        *FileName,\r
   IN  EFI_PEI_FV_HANDLE     VolumeHandle,\r
 PeiFfsFindFileByName (\r
   IN  CONST EFI_GUID        *FileName,\r
   IN  EFI_PEI_FV_HANDLE     VolumeHandle,\r
@@ -1165,16 +1165,16 @@ PeiFfsFindFileByName (
   )\r
 {\r
   PEI_CORE_FV_HANDLE            *CoreFvHandle;\r
   )\r
 {\r
   PEI_CORE_FV_HANDLE            *CoreFvHandle;\r
-  \r
+\r
   if ((VolumeHandle == NULL) || (FileName == NULL) || (FileHandle == NULL)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
   if ((VolumeHandle == NULL) || (FileName == NULL) || (FileHandle == NULL)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   CoreFvHandle = FvHandleToCoreHandle (VolumeHandle);\r
   if ((CoreFvHandle == NULL) || (CoreFvHandle->FvPpi == NULL)) {\r
     return EFI_NOT_FOUND;\r
   }\r
   CoreFvHandle = FvHandleToCoreHandle (VolumeHandle);\r
   if ((CoreFvHandle == NULL) || (CoreFvHandle->FvPpi == NULL)) {\r
     return EFI_NOT_FOUND;\r
   }\r
-  \r
+\r
   return CoreFvHandle->FvPpi->FindFileByName (CoreFvHandle->FvPpi, FileName, &VolumeHandle, FileHandle);\r
 }\r
 \r
   return CoreFvHandle->FvPpi->FindFileByName (CoreFvHandle->FvPpi, FileName, &VolumeHandle, FileHandle);\r
 }\r
 \r
@@ -1190,14 +1190,14 @@ PeiFfsFindFileByName (
 \r
 **/\r
 EFI_STATUS\r
 \r
 **/\r
 EFI_STATUS\r
-EFIAPI \r
+EFIAPI\r
 PeiFfsGetFileInfo (\r
   IN EFI_PEI_FILE_HANDLE  FileHandle,\r
   OUT EFI_FV_FILE_INFO    *FileInfo\r
   )\r
 {\r
   PEI_CORE_FV_HANDLE          *CoreFvHandle;\r
 PeiFfsGetFileInfo (\r
   IN EFI_PEI_FILE_HANDLE  FileHandle,\r
   OUT EFI_FV_FILE_INFO    *FileInfo\r
   )\r
 {\r
   PEI_CORE_FV_HANDLE          *CoreFvHandle;\r
-  \r
+\r
   if ((FileHandle == NULL) || (FileInfo == NULL)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
   if ((FileHandle == NULL) || (FileInfo == NULL)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
@@ -1225,14 +1225,14 @@ PeiFfsGetFileInfo (
 \r
 **/\r
 EFI_STATUS\r
 \r
 **/\r
 EFI_STATUS\r
-EFIAPI \r
+EFIAPI\r
 PeiFfsGetFileInfo2 (\r
   IN EFI_PEI_FILE_HANDLE  FileHandle,\r
   OUT EFI_FV_FILE_INFO2   *FileInfo\r
   )\r
 {\r
   PEI_CORE_FV_HANDLE          *CoreFvHandle;\r
 PeiFfsGetFileInfo2 (\r
   IN EFI_PEI_FILE_HANDLE  FileHandle,\r
   OUT EFI_FV_FILE_INFO2   *FileInfo\r
   )\r
 {\r
   PEI_CORE_FV_HANDLE          *CoreFvHandle;\r
-  \r
+\r
   if ((FileHandle == NULL) || (FileInfo == NULL)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
   if ((FileHandle == NULL) || (FileInfo == NULL)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
@@ -1274,24 +1274,24 @@ PeiFfsGetFileInfo2 (
 \r
 **/\r
 EFI_STATUS\r
 \r
 **/\r
 EFI_STATUS\r
-EFIAPI \r
+EFIAPI\r
 PeiFfsGetVolumeInfo (\r
   IN EFI_PEI_FV_HANDLE  VolumeHandle,\r
   OUT EFI_FV_INFO       *VolumeInfo\r
   )\r
 {\r
   PEI_CORE_FV_HANDLE                     *CoreHandle;\r
 PeiFfsGetVolumeInfo (\r
   IN EFI_PEI_FV_HANDLE  VolumeHandle,\r
   OUT EFI_FV_INFO       *VolumeInfo\r
   )\r
 {\r
   PEI_CORE_FV_HANDLE                     *CoreHandle;\r
-  \r
+\r
   if ((VolumeInfo == NULL) || (VolumeHandle == NULL)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
   if ((VolumeInfo == NULL) || (VolumeHandle == NULL)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   CoreHandle = FvHandleToCoreHandle (VolumeHandle);\r
   CoreHandle = FvHandleToCoreHandle (VolumeHandle);\r
-  \r
+\r
   if ((CoreHandle == NULL) || (CoreHandle->FvPpi == NULL)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
   if ((CoreHandle == NULL) || (CoreHandle->FvPpi == NULL)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   return CoreHandle->FvPpi->GetVolumeInfo (CoreHandle->FvPpi, VolumeHandle, VolumeInfo);\r
 }\r
 \r
   return CoreHandle->FvPpi->GetVolumeInfo (CoreHandle->FvPpi, VolumeHandle, VolumeInfo);\r
 }\r
 \r
@@ -1369,7 +1369,7 @@ GetFvUsedSize (
   @retval EFI_OUT_OF_RESOURCES  Can not allocate page when aligning FV image\r
   @retval EFI_SECURITY_VIOLATION Image is illegal\r
   @retval Others                Can not find EFI_SECTION_FIRMWARE_VOLUME_IMAGE section\r
   @retval EFI_OUT_OF_RESOURCES  Can not allocate page when aligning FV image\r
   @retval EFI_SECURITY_VIOLATION Image is illegal\r
   @retval Others                Can not find EFI_SECTION_FIRMWARE_VOLUME_IMAGE section\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 ProcessFvFile (\r
 **/\r
 EFI_STATUS\r
 ProcessFvFile (\r
@@ -1410,7 +1410,7 @@ ProcessFvFile (
 \r
   ParentFvHandle = ParentFvCoreHandle->FvHandle;\r
   ParentFvPpi    = ParentFvCoreHandle->FvPpi;\r
 \r
   ParentFvHandle = ParentFvCoreHandle->FvHandle;\r
   ParentFvPpi    = ParentFvCoreHandle->FvPpi;\r
-  \r
+\r
   //\r
   // Find FvImage in FvFile\r
   //\r
   //\r
   // Find FvImage in FvFile\r
   //\r
@@ -1492,10 +1492,10 @@ ProcessFvFile (
 \r
   Status = ParentFvPpi->GetVolumeInfo (ParentFvPpi, ParentFvHandle, &ParentFvImageInfo);\r
   ASSERT_EFI_ERROR (Status);\r
 \r
   Status = ParentFvPpi->GetVolumeInfo (ParentFvPpi, ParentFvHandle, &ParentFvImageInfo);\r
   ASSERT_EFI_ERROR (Status);\r
-  \r
+\r
   Status = ParentFvPpi->GetFileInfo (ParentFvPpi, ParentFvFileHandle, &FileInfo);\r
   ASSERT_EFI_ERROR (Status);\r
   Status = ParentFvPpi->GetFileInfo (ParentFvPpi, ParentFvFileHandle, &FileInfo);\r
   ASSERT_EFI_ERROR (Status);\r
-  \r
+\r
   //\r
   // Install FvInfo(2) Ppi\r
   // NOTE: FvInfo2 must be installed before FvInfo so that recursive processing of encapsulated\r
   //\r
   // Install FvInfo(2) Ppi\r
   // NOTE: FvInfo2 must be installed before FvInfo so that recursive processing of encapsulated\r
@@ -1562,15 +1562,15 @@ ProcessFvFile (
   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
   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
   @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
 \r
   @retval EFI_SUCCESS           Firmware volume handle created.\r
   @retval EFI_VOLUME_CORRUPTED  Volume was corrupt.\r
@@ -1586,19 +1586,19 @@ PeiFfsFvPpiProcessVolume (
   )\r
 {\r
   EFI_STATUS          Status;\r
   )\r
 {\r
   EFI_STATUS          Status;\r
-  \r
+\r
   ASSERT (FvHandle != NULL);\r
   ASSERT (FvHandle != NULL);\r
-  \r
+\r
   if (Buffer == NULL) {\r
     return EFI_VOLUME_CORRUPTED;\r
   }\r
   if (Buffer == NULL) {\r
     return EFI_VOLUME_CORRUPTED;\r
   }\r
-  \r
+\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
   //\r
   *FvHandle = (EFI_PEI_FV_HANDLE) Buffer;\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
   //\r
   *FvHandle = (EFI_PEI_FV_HANDLE) Buffer;\r
-  \r
+\r
   //\r
   // Do verify for given FV buffer.\r
   //\r
   //\r
   // Do verify for given FV buffer.\r
   //\r
@@ -1609,12 +1609,12 @@ PeiFfsFvPpiProcessVolume (
   }\r
 \r
   return EFI_SUCCESS;\r
   }\r
 \r
   return EFI_SUCCESS;\r
-}  \r
+}\r
 \r
 /**\r
   Finds the next file of the specified type.\r
 \r
 \r
 /**\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
   The FileHandle must be unique within the system.\r
 \r
   @param This           Points to this instance of the\r
@@ -1641,13 +1641,13 @@ PeiFfsFvPpiFindFileByType (
   IN        EFI_PEI_FV_HANDLE           FvHandle,\r
   IN OUT    EFI_PEI_FILE_HANDLE         *FileHandle\r
   )\r
   IN        EFI_PEI_FV_HANDLE           FvHandle,\r
   IN OUT    EFI_PEI_FILE_HANDLE         *FileHandle\r
   )\r
-{ \r
+{\r
   return FindFileEx (FvHandle, NULL, SearchType, FileHandle, NULL);\r
 }\r
 \r
 /**\r
   return FindFileEx (FvHandle, NULL, SearchType, FileHandle, NULL);\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
   This service searches for files with a specific name, within\r
   either the specified firmware volume or all firmware volumes.\r
 \r
@@ -1676,28 +1676,28 @@ PeiFfsFvPpiFindFileByName (
   IN  CONST  EFI_PEI_FIRMWARE_VOLUME_PPI *This,\r
   IN  CONST  EFI_GUID                    *FileName,\r
   IN  EFI_PEI_FV_HANDLE                  *FvHandle,\r
   IN  CONST  EFI_PEI_FIRMWARE_VOLUME_PPI *This,\r
   IN  CONST  EFI_GUID                    *FileName,\r
   IN  EFI_PEI_FV_HANDLE                  *FvHandle,\r
-  OUT EFI_PEI_FILE_HANDLE                *FileHandle  \r
+  OUT EFI_PEI_FILE_HANDLE                *FileHandle\r
   )\r
 {\r
   EFI_STATUS        Status;\r
   PEI_CORE_INSTANCE *PrivateData;\r
   UINTN             Index;\r
   )\r
 {\r
   EFI_STATUS        Status;\r
   PEI_CORE_INSTANCE *PrivateData;\r
   UINTN             Index;\r
-  \r
+\r
   if ((FvHandle == NULL) || (FileName == NULL) || (FileHandle == NULL)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
   if ((FvHandle == NULL) || (FileName == NULL) || (FileHandle == NULL)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   if (*FvHandle != NULL) {\r
     Status = FindFileEx (*FvHandle, FileName, 0, FileHandle, NULL);\r
     if (Status == EFI_NOT_FOUND) {\r
       *FileHandle = NULL;\r
     }\r
   if (*FvHandle != NULL) {\r
     Status = FindFileEx (*FvHandle, FileName, 0, FileHandle, NULL);\r
     if (Status == EFI_NOT_FOUND) {\r
       *FileHandle = NULL;\r
     }\r
-  } else {   \r
+  } else {\r
     //\r
     // If *FvHandle = NULL, so search all FV for given filename\r
     //\r
     Status = EFI_NOT_FOUND;\r
     //\r
     // If *FvHandle = NULL, so search all FV for given filename\r
     //\r
     Status = EFI_NOT_FOUND;\r
-    \r
+\r
     PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS (GetPeiServicesTablePointer());\r
     for (Index = 0; Index < PrivateData->FvCount; Index ++) {\r
       //\r
     PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS (GetPeiServicesTablePointer());\r
     for (Index = 0; Index < PrivateData->FvCount; Index ++) {\r
       //\r
@@ -1712,17 +1712,17 @@ PeiFfsFvPpiFindFileByName (
       }\r
     }\r
   }\r
       }\r
     }\r
   }\r
-  \r
-  return Status;  \r
-}  \r
+\r
+  return Status;\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
 \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 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
   @param This                     Points to this instance of the\r
                                   EFI_PEI_FIRMWARE_VOLUME_PPI.\r
   @param FileHandle               Handle of the file.\r
@@ -1733,13 +1733,13 @@ PeiFfsFvPpiFindFileByName (
   @retval EFI_INVALID_PARAMETER   If FileHandle does not\r
                                   represent a valid file.\r
   @retval EFI_INVALID_PARAMETER   If FileInfo is NULL.\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
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PeiFfsFvPpiGetFileInfo (\r
 EFI_STATUS\r
 EFIAPI\r
 PeiFfsFvPpiGetFileInfo (\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
   OUT       EFI_FV_FILE_INFO              *FileInfo\r
   )\r
 {\r
@@ -1770,14 +1770,14 @@ PeiFfsFvPpiGetFileInfo (
   }\r
 \r
   //\r
   }\r
 \r
   //\r
-  // Get FileState which is the highest bit of the State \r
+  // Get FileState which is the highest bit of the State\r
   //\r
   FileState = GetFileState (ErasePolarity, (EFI_FFS_FILE_HEADER*)FileHandle);\r
 \r
   switch (FileState) {\r
     case EFI_FILE_DATA_VALID:\r
     case EFI_FILE_MARKED_FOR_UPDATE:\r
   //\r
   FileState = GetFileState (ErasePolarity, (EFI_FFS_FILE_HEADER*)FileHandle);\r
 \r
   switch (FileState) {\r
     case EFI_FILE_DATA_VALID:\r
     case EFI_FILE_MARKED_FOR_UPDATE:\r
-      break;  \r
+      break;\r
     default:\r
       return EFI_INVALID_PARAMETER;\r
     }\r
     default:\r
       return EFI_INVALID_PARAMETER;\r
     }\r
@@ -1826,8 +1826,8 @@ PeiFfsFvPpiGetFileInfo (
 EFI_STATUS\r
 EFIAPI\r
 PeiFfsFvPpiGetFileInfo2 (\r
 EFI_STATUS\r
 EFIAPI\r
 PeiFfsFvPpiGetFileInfo2 (\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_INFO2             *FileInfo\r
   )\r
 {\r
   OUT       EFI_FV_FILE_INFO2             *FileInfo\r
   )\r
 {\r
@@ -1856,7 +1856,7 @@ PeiFfsFvPpiGetFileInfo2 (
 \r
 /**\r
   This function returns information about the firmware volume.\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
   @param This                     Points to this instance of the\r
                                   EFI_PEI_FIRMWARE_VOLUME_PPI.\r
   @param FvHandle                 Handle to the firmware handle.\r
@@ -1867,12 +1867,12 @@ PeiFfsFvPpiGetFileInfo2 (
   @retval EFI_INVALID_PARAMETER   FvHandle does not indicate a valid\r
                                   firmware volume or VolumeInfo is NULL.\r
 \r
   @retval EFI_INVALID_PARAMETER   FvHandle does not indicate a valid\r
                                   firmware volume or VolumeInfo is NULL.\r
 \r
-**/   \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PeiFfsFvPpiGetVolumeInfo (\r
 EFI_STATUS\r
 EFIAPI\r
 PeiFfsFvPpiGetVolumeInfo (\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
   OUT EFI_FV_INFO                          *VolumeInfo\r
   )\r
 {\r
@@ -1882,10 +1882,10 @@ PeiFfsFvPpiGetVolumeInfo (
   if ((VolumeInfo == NULL) || (FvHandle == NULL)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
   if ((VolumeInfo == NULL) || (FvHandle == NULL)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   //\r
   //\r
-  // VolumeHandle may not align at 8 byte, \r
-  // but FvLength is UINT64 type, which requires FvHeader align at least 8 byte. \r
+  // VolumeHandle may not align at 8 byte,\r
+  // but FvLength is UINT64 type, which requires FvHeader align at least 8 byte.\r
   // So, Copy FvHeader into the local FvHeader structure.\r
   //\r
   CopyMem (&FwVolHeader, FvHandle, sizeof (EFI_FIRMWARE_VOLUME_HEADER));\r
   // So, Copy FvHeader into the local FvHeader structure.\r
   //\r
   CopyMem (&FwVolHeader, FvHandle, sizeof (EFI_FIRMWARE_VOLUME_HEADER));\r
@@ -1907,16 +1907,16 @@ PeiFfsFvPpiGetVolumeInfo (
     FwVolExHeaderInfo = (EFI_FIRMWARE_VOLUME_EXT_HEADER*)(((UINT8 *)FvHandle) + FwVolHeader.ExtHeaderOffset);\r
     CopyMem (&VolumeInfo->FvName, &FwVolExHeaderInfo->FvName, sizeof(EFI_GUID));\r
   }\r
     FwVolExHeaderInfo = (EFI_FIRMWARE_VOLUME_EXT_HEADER*)(((UINT8 *)FvHandle) + FwVolHeader.ExtHeaderOffset);\r
     CopyMem (&VolumeInfo->FvName, &FwVolExHeaderInfo->FvName, sizeof(EFI_GUID));\r
   }\r
-  \r
-  return EFI_SUCCESS;  \r
-}    \r
+\r
+  return EFI_SUCCESS;\r
+}\r
 \r
 /**\r
   Find the next matching section in the firmware file.\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
   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
   @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
@@ -1925,7 +1925,7 @@ PeiFfsFvPpiGetVolumeInfo (
                           search.\r
   @param SectionData      Updated upon return to point to the\r
                           section found.\r
                           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
   @retval EFI_SUCCESS     Section was found.\r
   @retval EFI_NOT_FOUND   Section of the specified type was not\r
                           found. SectionData contains NULL.\r
@@ -2021,8 +2021,8 @@ PeiFfsFvPpiFindSectionByType2 (
              GetPeiServicesTablePointer (),\r
              SearchType,\r
              &Instance,\r
              GetPeiServicesTablePointer (),\r
              SearchType,\r
              &Instance,\r
-             Section, \r
-             FileSize, \r
+             Section,\r
+             FileSize,\r
              SectionData,\r
              &ExtractedAuthenticationStatus,\r
              FwVolInstance->IsFfs3Fv\r
              SectionData,\r
              &ExtractedAuthenticationStatus,\r
              FwVolInstance->IsFfs3Fv\r
@@ -2038,11 +2038,11 @@ PeiFfsFvPpiFindSectionByType2 (
 \r
 /**\r
   Convert the handle of FV to pointer of corresponding PEI_CORE_FV_HANDLE.\r
 \r
 /**\r
   Convert the handle of FV to pointer of corresponding PEI_CORE_FV_HANDLE.\r
-  \r
+\r
   @param FvHandle   The handle of a FV.\r
   @param FvHandle   The handle of a FV.\r
-  \r
+\r
   @retval NULL if can not find.\r
   @retval NULL if can not find.\r
-  @return Pointer of corresponding PEI_CORE_FV_HANDLE. \r
+  @return Pointer of corresponding PEI_CORE_FV_HANDLE.\r
 **/\r
 PEI_CORE_FV_HANDLE *\r
 FvHandleToCoreHandle (\r
 **/\r
 PEI_CORE_FV_HANDLE *\r
 FvHandleToCoreHandle (\r
@@ -2051,25 +2051,25 @@ FvHandleToCoreHandle (
 {\r
   UINTN             Index;\r
   PEI_CORE_INSTANCE *PrivateData;\r
 {\r
   UINTN             Index;\r
   PEI_CORE_INSTANCE *PrivateData;\r
-  \r
-  PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS (GetPeiServicesTablePointer());  \r
+\r
+  PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS (GetPeiServicesTablePointer());\r
   for (Index = 0; Index < PrivateData->FvCount; Index ++) {\r
     if (FvHandle == PrivateData->Fv[Index].FvHandle) {\r
       return &PrivateData->Fv[Index];\r
     }\r
   }\r
   for (Index = 0; Index < PrivateData->FvCount; Index ++) {\r
     if (FvHandle == PrivateData->Fv[Index].FvHandle) {\r
       return &PrivateData->Fv[Index];\r
     }\r
   }\r
-  \r
+\r
   return NULL;\r
   return NULL;\r
-}  \r
+}\r
 \r
 /**\r
   Get instance of PEI_CORE_FV_HANDLE for next volume according to given index.\r
 \r
 /**\r
   Get instance of PEI_CORE_FV_HANDLE for next volume according to given index.\r
-  \r
+\r
   This routine also will install FvInfo ppi for FV hob in PI ways.\r
   This routine also will install FvInfo ppi for FV hob in PI ways.\r
-  \r
+\r
   @param Private    Pointer of PEI_CORE_INSTANCE\r
   @param Instance   The index of FV want to be searched.\r
   @param Private    Pointer of PEI_CORE_INSTANCE\r
   @param Instance   The index of FV want to be searched.\r
-  \r
+\r
   @return Instance of PEI_CORE_FV_HANDLE.\r
 **/\r
 PEI_CORE_FV_HANDLE *\r
   @return Instance of PEI_CORE_FV_HANDLE.\r
 **/\r
 PEI_CORE_FV_HANDLE *\r
@@ -2081,7 +2081,7 @@ FindNextCoreFvHandle (
   UINTN                    Index;\r
   BOOLEAN                  Match;\r
   EFI_HOB_FIRMWARE_VOLUME  *FvHob;\r
   UINTN                    Index;\r
   BOOLEAN                  Match;\r
   EFI_HOB_FIRMWARE_VOLUME  *FvHob;\r
-  \r
+\r
   //\r
   // Handle Framework FvHob and Install FvInfo Ppi for it.\r
   //\r
   //\r
   // Handle Framework FvHob and Install FvInfo Ppi for it.\r
   //\r
@@ -2101,7 +2101,7 @@ FindNextCoreFvHandle (
           break;\r
         }\r
       }\r
           break;\r
         }\r
       }\r
-      \r
+\r
       //\r
       // Search whether FvHob has been cached into PeiCore's Unknown FV database.\r
       // If found, no need install new FvInfoPpi for it.\r
       //\r
       // Search whether FvHob has been cached into PeiCore's Unknown FV database.\r
       // If found, no need install new FvInfoPpi for it.\r
@@ -2129,8 +2129,8 @@ FindNextCoreFvHandle (
           NULL\r
           );\r
       }\r
           NULL\r
           );\r
       }\r
-      \r
-      FvHob = (EFI_HOB_FIRMWARE_VOLUME *)GetNextHob (EFI_HOB_TYPE_FV, (VOID *)((UINTN)FvHob + FvHob->Header.HobLength)); \r
+\r
+      FvHob = (EFI_HOB_FIRMWARE_VOLUME *)GetNextHob (EFI_HOB_TYPE_FV, (VOID *)((UINTN)FvHob + FvHob->Header.HobLength));\r
     }\r
   }\r
 \r
     }\r
   }\r
 \r
@@ -2140,16 +2140,16 @@ FindNextCoreFvHandle (
   }\r
 \r
   return &Private->Fv[Instance];\r
   }\r
 \r
   return &Private->Fv[Instance];\r
-}  \r
+}\r
 \r
 /**\r
   After PeiCore image is shadowed into permanent memory, all build-in FvPpi should\r
 \r
 /**\r
   After PeiCore image is shadowed into permanent memory, all build-in FvPpi should\r
-  be re-installed with the instance in permanent memory and all cached FvPpi pointers in \r
+  be re-installed with the instance in permanent memory and all cached FvPpi pointers in\r
   PrivateData->Fv[] array should be fixed up to be pointed to the one in permanent\r
   memory.\r
   PrivateData->Fv[] array should be fixed up to be pointed to the one in permanent\r
   memory.\r
-  \r
+\r
   @param PrivateData   Pointer to PEI_CORE_INSTANCE.\r
   @param PrivateData   Pointer to PEI_CORE_INSTANCE.\r
-**/  \r
+**/\r
 VOID\r
 PeiReinitializeFv (\r
   IN  PEI_CORE_INSTANCE           *PrivateData\r
 VOID\r
 PeiReinitializeFv (\r
   IN  PEI_CORE_INSTANCE           *PrivateData\r
@@ -2219,17 +2219,17 @@ PeiReinitializeFv (
 \r
 /**\r
   Report the information for a new discoveried FV in unknown third-party format.\r
 \r
 /**\r
   Report the information for a new discoveried FV in unknown third-party format.\r
-  \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
   using new installed EFI_PEI_FIRMWARE_VOLUME_PPI.\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
   using new installed EFI_PEI_FIRMWARE_VOLUME_PPI.\r
-  \r
+\r
   @param PrivateData  Point to instance of PEI_CORE_INSTANCE\r
   @param FvInfo2Ppi   Point to FvInfo2 PPI.\r
   @param PrivateData  Point to instance of PEI_CORE_INSTANCE\r
   @param FvInfo2Ppi   Point to FvInfo2 PPI.\r
-  \r
+\r
   @retval EFI_OUT_OF_RESOURCES  The FV info array in PEI_CORE_INSTANCE has no more spaces.\r
   @retval EFI_SUCCESS           Success to add the information for unknown FV.\r
 **/\r
   @retval EFI_OUT_OF_RESOURCES  The FV info array in PEI_CORE_INSTANCE has no more spaces.\r
   @retval EFI_SUCCESS           Success to add the information for unknown FV.\r
 **/\r
@@ -2240,14 +2240,14 @@ AddUnknownFormatFvInfo (
   )\r
 {\r
   PEI_CORE_UNKNOW_FORMAT_FV_INFO    *NewUnknownFv;\r
   )\r
 {\r
   PEI_CORE_UNKNOW_FORMAT_FV_INFO    *NewUnknownFv;\r
-  \r
+\r
   if (PrivateData->UnknownFvInfoCount + 1 >= PcdGet32 (PcdPeiCoreMaxFvSupported)) {\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
   if (PrivateData->UnknownFvInfoCount + 1 >= PcdGet32 (PcdPeiCoreMaxFvSupported)) {\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
-  \r
+\r
   NewUnknownFv = &PrivateData->UnknownFvInfo[PrivateData->UnknownFvInfoCount];\r
   PrivateData->UnknownFvInfoCount ++;\r
   NewUnknownFv = &PrivateData->UnknownFvInfo[PrivateData->UnknownFvInfoCount];\r
   PrivateData->UnknownFvInfoCount ++;\r
-  \r
+\r
   CopyGuid (&NewUnknownFv->FvFormat, &FvInfo2Ppi->FvFormat);\r
   NewUnknownFv->FvInfo     = FvInfo2Ppi->FvInfo;\r
   NewUnknownFv->FvInfoSize = FvInfo2Ppi->FvInfoSize;\r
   CopyGuid (&NewUnknownFv->FvFormat, &FvInfo2Ppi->FvFormat);\r
   NewUnknownFv->FvInfo     = FvInfo2Ppi->FvInfo;\r
   NewUnknownFv->FvInfoSize = FvInfo2Ppi->FvInfoSize;\r
@@ -2255,23 +2255,23 @@ AddUnknownFormatFvInfo (
   NewUnknownFv->NotifyDescriptor.Flags  = (EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST);\r
   NewUnknownFv->NotifyDescriptor.Guid   = &NewUnknownFv->FvFormat;\r
   NewUnknownFv->NotifyDescriptor.Notify = ThirdPartyFvPpiNotifyCallback;\r
   NewUnknownFv->NotifyDescriptor.Flags  = (EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST);\r
   NewUnknownFv->NotifyDescriptor.Guid   = &NewUnknownFv->FvFormat;\r
   NewUnknownFv->NotifyDescriptor.Notify = ThirdPartyFvPpiNotifyCallback;\r
-  \r
+\r
   PeiServicesNotifyPpi (&NewUnknownFv->NotifyDescriptor);\r
   return EFI_SUCCESS;\r
 }\r
 \r
 /**\r
   Find the FV information according to third-party FV format guid.\r
   PeiServicesNotifyPpi (&NewUnknownFv->NotifyDescriptor);\r
   return EFI_SUCCESS;\r
 }\r
 \r
 /**\r
   Find the FV information according to third-party FV format guid.\r
-  \r
+\r
   This routine also will remove the FV information found by given FV format guid from\r
   PrivateData->UnknownFvInfo[].\r
   This routine also will remove the FV information found by given FV format guid from\r
   PrivateData->UnknownFvInfo[].\r
-  \r
+\r
   @param PrivateData      Point to instance of PEI_CORE_INSTANCE\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
   @param PrivateData      Point to instance of PEI_CORE_INSTANCE\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
-  \r
+\r
   @retval EFI_NOT_FOUND  The FV is not found for new installed EFI_PEI_FIRMWARE_VOLUME_PPI\r
   @retval EFI_SUCCESS    Success to find a FV which could be processed by new installed EFI_PEI_FIRMWARE_VOLUME_PPI.\r
 **/\r
   @retval EFI_NOT_FOUND  The FV is not found for new installed EFI_PEI_FIRMWARE_VOLUME_PPI\r
   @retval EFI_SUCCESS    Success to find a FV which could be processed by new installed EFI_PEI_FIRMWARE_VOLUME_PPI.\r
 **/\r
@@ -2293,15 +2293,15 @@ FindUnknownFormatFvInfo (
       break;\r
     }\r
   }\r
       break;\r
     }\r
   }\r
-  \r
+\r
   if (Index == PrivateData->UnknownFvInfoCount) {\r
     return EFI_NOT_FOUND;\r
   }\r
   if (Index == PrivateData->UnknownFvInfoCount) {\r
     return EFI_NOT_FOUND;\r
   }\r
-  \r
+\r
   *FvInfo     = PrivateData->UnknownFvInfo[Index].FvInfo;\r
   *FvInfoSize = PrivateData->UnknownFvInfo[Index].FvInfoSize;\r
   *AuthenticationStatus = PrivateData->UnknownFvInfo[Index].AuthenticationStatus;\r
   *FvInfo     = PrivateData->UnknownFvInfo[Index].FvInfo;\r
   *FvInfoSize = PrivateData->UnknownFvInfo[Index].FvInfoSize;\r
   *AuthenticationStatus = PrivateData->UnknownFvInfo[Index].AuthenticationStatus;\r
-  \r
+\r
   //\r
   // Remove an entry from UnknownFvInfo array.\r
   //\r
   //\r
   // Remove an entry from UnknownFvInfo array.\r
   //\r
@@ -2311,18 +2311,18 @@ FindUnknownFormatFvInfo (
   }\r
   PrivateData->UnknownFvInfoCount --;\r
   return EFI_SUCCESS;\r
   }\r
   PrivateData->UnknownFvInfoCount --;\r
   return EFI_SUCCESS;\r
-}  \r
+}\r
 \r
 /**\r
   Notification callback function for EFI_PEI_FIRMWARE_VOLUME_PPI.\r
 \r
 /**\r
   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
+\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 discoveried FVs in this format.\r
-  \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
   @param Ppi               Address of the PPI that was installed.\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
   @param Ppi               Address of the PPI that was installed.\r
-  \r
+\r
   @retval EFI_SUCCESS  The notification callback is processed correctly.\r
 **/\r
 EFI_STATUS\r
   @retval EFI_SUCCESS  The notification callback is processed correctly.\r
 **/\r
 EFI_STATUS\r
@@ -2343,18 +2343,18 @@ ThirdPartyFvPpiNotifyCallback (
   BOOLEAN                      IsProcessed;\r
   UINTN                        FvIndex;\r
   EFI_PEI_FILE_HANDLE          FileHandle;\r
   BOOLEAN                      IsProcessed;\r
   UINTN                        FvIndex;\r
   EFI_PEI_FILE_HANDLE          FileHandle;\r
-  VOID                         *DepexData;  \r
+  VOID                         *DepexData;\r
   UINTN                        CurFvCount;\r
 \r
   PrivateData  = PEI_CORE_INSTANCE_FROM_PS_THIS (PeiServices);\r
   FvPpi = (EFI_PEI_FIRMWARE_VOLUME_PPI*) Ppi;\r
   UINTN                        CurFvCount;\r
 \r
   PrivateData  = PEI_CORE_INSTANCE_FROM_PS_THIS (PeiServices);\r
   FvPpi = (EFI_PEI_FIRMWARE_VOLUME_PPI*) Ppi;\r
-  \r
+\r
   do {\r
     Status = FindUnknownFormatFvInfo (PrivateData, NotifyDescriptor->Guid, &FvInfo, &FvInfoSize, &AuthenticationStatus);\r
     if (EFI_ERROR (Status)) {\r
       return EFI_SUCCESS;\r
     }\r
   do {\r
     Status = FindUnknownFormatFvInfo (PrivateData, NotifyDescriptor->Guid, &FvInfo, &FvInfoSize, &AuthenticationStatus);\r
     if (EFI_ERROR (Status)) {\r
       return EFI_SUCCESS;\r
     }\r
-    \r
+\r
     //\r
     // Process new found FV and get FV handle.\r
     //\r
     //\r
     // Process new found FV and get FV handle.\r
     //\r
@@ -2375,17 +2375,17 @@ ThirdPartyFvPpiNotifyCallback (
         break;\r
       }\r
     }\r
         break;\r
       }\r
     }\r
-  \r
+\r
     if (IsProcessed) {\r
       continue;\r
     }\r
     if (IsProcessed) {\r
       continue;\r
     }\r
-    \r
+\r
     if (PrivateData->FvCount >= PcdGet32 (PcdPeiCoreMaxFvSupported)) {\r
       DEBUG ((EFI_D_ERROR, "The number of Fv Images (%d) exceed the max supported FVs (%d) in Pei", PrivateData->FvCount + 1, PcdGet32 (PcdPeiCoreMaxFvSupported)));\r
       DEBUG ((EFI_D_ERROR, "PcdPeiCoreMaxFvSupported value need be reconfigurated in DSC"));\r
       ASSERT (FALSE);\r
     }\r
     if (PrivateData->FvCount >= PcdGet32 (PcdPeiCoreMaxFvSupported)) {\r
       DEBUG ((EFI_D_ERROR, "The number of Fv Images (%d) exceed the max supported FVs (%d) in Pei", PrivateData->FvCount + 1, PcdGet32 (PcdPeiCoreMaxFvSupported)));\r
       DEBUG ((EFI_D_ERROR, "PcdPeiCoreMaxFvSupported value need be reconfigurated in DSC"));\r
       ASSERT (FALSE);\r
     }\r
-        \r
+\r
     //\r
     // Update internal PEI_CORE_FV array.\r
     //\r
     //\r
     // Update internal PEI_CORE_FV array.\r
     //\r
@@ -2395,17 +2395,17 @@ ThirdPartyFvPpiNotifyCallback (
     PrivateData->Fv[PrivateData->FvCount].AuthenticationStatus = AuthenticationStatus;\r
     CurFvCount = PrivateData->FvCount;\r
     DEBUG ((\r
     PrivateData->Fv[PrivateData->FvCount].AuthenticationStatus = AuthenticationStatus;\r
     CurFvCount = PrivateData->FvCount;\r
     DEBUG ((\r
-      EFI_D_INFO, \r
-      "The %dth FV start address is 0x%11p, size is 0x%08x, handle is 0x%p\n", \r
+      EFI_D_INFO,\r
+      "The %dth FV start address is 0x%11p, size is 0x%08x, handle is 0x%p\n",\r
       (UINT32) CurFvCount,\r
       (UINT32) CurFvCount,\r
-      (VOID *) FvInfo, \r
+      (VOID *) FvInfo,\r
       FvInfoSize,\r
       FvHandle\r
       FvInfoSize,\r
       FvHandle\r
-      ));    \r
+      ));\r
     PrivateData->FvCount ++;\r
 \r
     //\r
     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 discoveried FV for EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE\r
     //\r
     FileHandle = NULL;\r
     do {\r
     //\r
     FileHandle = NULL;\r
     do {\r
@@ -2430,7 +2430,7 @@ ThirdPartyFvPpiNotifyCallback (
             continue;\r
           }\r
         }\r
             continue;\r
           }\r
         }\r
-        \r
+\r
         DEBUG ((EFI_D_INFO, "Found firmware volume Image File %p in FV[%d] %p\n", FileHandle, CurFvCount, FvHandle));\r
         ProcessFvFile (PrivateData, &PrivateData->Fv[CurFvCount], FileHandle);\r
       }\r
         DEBUG ((EFI_D_INFO, "Found firmware volume Image File %p in FV[%d] %p\n", FileHandle, CurFvCount, FvHandle));\r
         ProcessFvFile (PrivateData, &PrivateData->Fv[CurFvCount], FileHandle);\r
       }\r