From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id AF0611A1E47 for ; Sat, 8 Oct 2016 18:28:39 -0700 (PDT) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP; 08 Oct 2016 18:28:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,315,1473145200"; d="scan'208";a="888122241" Received: from jyao1-mobl.ccr.corp.intel.com ([10.239.192.129]) by orsmga003.jf.intel.com with ESMTP; 08 Oct 2016 18:28:37 -0700 From: Jiewen Yao To: edk2-devel@lists.01.org Cc: Ruiyu Ni , Feng Tian , Star Zeng , Liming Gao , Eric Dong Date: Sun, 9 Oct 2016 09:28:29 +0800 Message-Id: <1475976509-7580-4-git-send-email-jiewen.yao@intel.com> X-Mailer: git-send-email 2.7.4.windows.1 In-Reply-To: <1475976509-7580-1-git-send-email-jiewen.yao@intel.com> References: <1475976509-7580-1-git-send-email-jiewen.yao@intel.com> Subject: [PATCH V2 3/3] FatPkg/FatPei: Use PcdRecoveryFileName PCD. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Oct 2016 01:28:39 -0000 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 Cc: Feng Tian Cc: Star Zeng Cc: Liming Gao Cc: Eric Dong Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao --- 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.
+Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
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.
+Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
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.
+# Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
# # 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