public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Jiewen Yao <jiewen.yao@intel.com>
To: edk2-devel@lists.01.org
Cc: Ruiyu Ni <ruiyu.ni@intel.com>, Feng Tian <feng.tian@intel.com>,
	Star Zeng <star.zeng@intel.com>,
	Liming Gao <liming.gao@intel.com>,
	Eric Dong <eric.dong@intel.com>
Subject: [PATCH V2 3/3] FatPkg/FatPei: Use PcdRecoveryFileName PCD.
Date: Sun,  9 Oct 2016 09:28:29 +0800	[thread overview]
Message-ID: <1475976509-7580-4-git-send-email-jiewen.yao@intel.com> (raw)
In-Reply-To: <1475976509-7580-1-git-send-email-jiewen.yao@intel.com>

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.

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>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
---
 FatPkg/FatPei/FatLiteApi.c  | 8 ++++----
 FatPkg/FatPei/FatLitePeim.h | 4 +---
 FatPkg/FatPei/FatPei.inf    | 5 ++++-
 3 files changed, 9 insertions(+), 8 deletions(-)

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



  parent reply	other threads:[~2016-10-09  1:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-09  1:28 [PATCH V2 0/3] Add PcdRecoveryFileName PCD Jiewen Yao
2016-10-09  1:28 ` [PATCH V2 1/3] MdeModulePkg/dec: " Jiewen Yao
2016-10-09  2:06   ` Ni, Ruiyu
2016-10-09  1:28 ` [PATCH V2 2/3] MdeModulePkg/CdExpressPei: Use " Jiewen Yao
2016-10-09  1:28 ` Jiewen Yao [this message]
2016-10-09  1:42 ` [PATCH V2 0/3] Add " Tian, Feng
2016-10-09 17:32 ` Kinney, Michael D
2016-10-10  3:37   ` Yao, Jiewen
2016-10-10  3:53     ` Kinney, Michael D
2016-10-11  0:43     ` Kinney, Michael D
2016-10-11  0:46       ` Yao, Jiewen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1475976509-7580-4-git-send-email-jiewen.yao@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox