]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/Pei/FwVol/FwVol.c
To make backward compatiblity, if can not find corresponding the handle of FV then...
[mirror_edk2.git] / MdeModulePkg / Core / Pei / FwVol / FwVol.c
index b5f2812a0962ebe75db9a1a9c8732ada02d43648..eb20f5131b39bc385f43b9912c42d9fedad620ef 100644 (file)
@@ -601,6 +601,15 @@ PeiFfsFindNextFile (
   \r
   CoreFvHandle = FvHandleToCoreHandle (FvHandle);\r
   \r
+  //\r
+  // To make backward compatiblity, if can not find corresponding the handle of FV\r
+  // then treat FV as build-in FFS2 format and memory mapped FV that FV handle is pointed\r
+  // to the address of first byte of FV.\r
+  //\r
+  if ((CoreFvHandle == NULL) && FeaturePcdGet (PcdFrameworkCompatibilitySupport)) {\r
+    return FindFileEx (FvHandle, NULL, SearchType, FileHandle, NULL);\r
+  } \r
+  \r
   if ((CoreFvHandle == NULL) || CoreFvHandle->FvPpi == NULL) {\r
     return EFI_NOT_FOUND;\r
   }\r