]> git.proxmox.com Git - mirror_edk2.git/commitdiff
FatPkg/FatPei: Use PcdRecoveryFileName PCD.
authorJiewen Yao <jiewen.yao@intel.com>
Sat, 8 Oct 2016 01:55:59 +0000 (09:55 +0800)
committerJiewen Yao <jiewen.yao@intel.com>
Wed, 12 Oct 2016 01:15:25 +0000 (09:15 +0800)
This PCD is used to indicated the recovery file name.
The previous name - FvMain.Fv is hardcoded in FatPei.
It does not make sense to force the name.

Now a platform may use any recovery file name.

Tested-by: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
FatPkg/FatPei/FatLiteApi.c
FatPkg/FatPei/FatLitePeim.h
FatPkg/FatPei/FatPei.inf

index d96774e4a25c4960b752aec5ee4605236d493c27..e3026571320bf1f1ce2f38c5d29c51d401dd11af 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   FAT recovery PEIM entry point, Ppi Functions and FAT Api functions.\r
 \r
-Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r
 \r
 This program and the accompanying materials are licensed and made available\r
 under the terms and conditions of the BSD License which accompanies this\r
@@ -370,7 +370,7 @@ GetNumberRecoveryCapsules (
   //\r
   RecoveryCapsuleCount = 0;\r
   for (Index = 0; Index < PrivateData->VolumeCount; Index++) {\r
-    Status = FindRecoveryFile (PrivateData, Index, PEI_FAT_RECOVERY_CAPSULE_WITHOUT_NT_EMULATOR, &Handle);\r
+    Status = FindRecoveryFile (PrivateData, Index, (CHAR16 *)PcdGetPtr(PcdRecoveryFileName), &Handle);\r
     if (EFI_ERROR (Status)) {\r
       continue;\r
     }\r
@@ -452,7 +452,7 @@ GetRecoveryCapsuleInfo (
   //\r
   RecoveryCapsuleCount = 0;\r
   for (Index = 0; Index < PrivateData->VolumeCount; Index++) {\r
-    Status = FindRecoveryFile (PrivateData, Index, PEI_FAT_RECOVERY_CAPSULE_WITHOUT_NT_EMULATOR, &Handle);\r
+    Status = FindRecoveryFile (PrivateData, Index, (CHAR16 *)PcdGetPtr(PcdRecoveryFileName), &Handle);\r
 \r
     if (EFI_ERROR (Status)) {\r
       continue;\r
@@ -576,7 +576,7 @@ LoadRecoveryCapsule (
   //\r
   RecoveryCapsuleCount = 0;\r
   for (Index = 0; Index < PrivateData->VolumeCount; Index++) {\r
-    Status = FindRecoveryFile (PrivateData, Index, PEI_FAT_RECOVERY_CAPSULE_WITHOUT_NT_EMULATOR, &Handle);\r
+    Status = FindRecoveryFile (PrivateData, Index, (CHAR16 *)PcdGetPtr(PcdRecoveryFileName), &Handle);\r
     if (EFI_ERROR (Status)) {\r
       continue;\r
     }\r
index e838390de4db24929b91ca9b9c100420f58eee79..d343d88f7e60392c946ef8d4d196c42cfbdd309c 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Data structures for FAT recovery PEIM\r
 \r
-Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r
 \r
 This program and the accompanying materials are licensed and made available\r
 under the terms and conditions of the BSD License which accompanies this\r
@@ -37,8 +37,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 //\r
 // Definitions\r
 //\r
-#define PEI_FAT_RECOVERY_CAPSULE_WITH_NT_EMULATOR     L"fv0001.fv"\r
-#define PEI_FAT_RECOVERY_CAPSULE_WITHOUT_NT_EMULATOR  L"fvmain.fv"\r
 \r
 #define PEI_FAT_CACHE_SIZE                            4\r
 #define PEI_FAT_MAX_BLOCK_SIZE                        8192\r
index 0304b00609d246e6b9a8ee81c0f4cbda1651ef90..1409e28e4f51ee1b67c57089d9016ef02f8c12fb 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 #    Lite Fat driver only used in Pei Phase.\r
 #\r
-#  Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #  This program and the accompanying materials are licensed and made available\r
 #  under the terms and conditions of the BSD License which accompanies this\r
@@ -69,6 +69,9 @@
 [FeaturePcd]\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdFrameworkCompatibilitySupport         ## CONSUMES\r
 \r
+[Pcd]\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdRecoveryFileName         ## CONSUMES\r
+\r
 [Depex]\r
   gEfiPeiMemoryDiscoveredPpiGuid AND gEfiPeiBootInRecoveryModePpiGuid\r
 \r