public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH V2 0/3] Add PcdRecoveryFileName PCD.
@ 2016-10-09  1:28 Jiewen Yao
  2016-10-09  1:28 ` [PATCH V2 1/3] MdeModulePkg/dec: " Jiewen Yao
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Jiewen Yao @ 2016-10-09  1:28 UTC (permalink / raw)
  To: edk2-devel

The V2 version moves PCD to [PcdsFixedAtBuild, 
PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]

=========================
This PCD is used to indicated the recovery file name.
The previous name - FvMain.Fv is hardcoded in FatPei and CdExpressPei.
It does not make sense to force the name.

Now a platform may use any recovery file name.

Jiewen Yao (3):
  MdeModulePkg/dec: Add PcdRecoveryFileName PCD.
  MdeModulePkg/CdExpressPei: Use PcdRecoveryFileName PCD.
  FatPkg/FatPei: Use PcdRecoveryFileName PCD.

 FatPkg/FatPei/FatLiteApi.c                                |  8 ++++----
 FatPkg/FatPei/FatLitePeim.h                               |  4 +---
 FatPkg/FatPei/FatPei.inf                                  |  5 ++++-
 MdeModulePkg/MdeModulePkg.dec                             |  6 ++++++
 MdeModulePkg/Universal/Disk/CdExpressPei/CdExpressPei.inf |  5 ++++-
 MdeModulePkg/Universal/Disk/CdExpressPei/PeiCdExpress.c   | 16 ++++++++++++++--
 MdeModulePkg/Universal/Disk/CdExpressPei/PeiCdExpress.h   |  7 +------
 7 files changed, 34 insertions(+), 17 deletions(-)

-- 
2.7.4.windows.1



^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH V2 1/3] MdeModulePkg/dec: Add PcdRecoveryFileName PCD.
  2016-10-09  1:28 [PATCH V2 0/3] Add PcdRecoveryFileName PCD Jiewen Yao
@ 2016-10-09  1:28 ` Jiewen Yao
  2016-10-09  2:06   ` Ni, Ruiyu
  2016-10-09  1:28 ` [PATCH V2 2/3] MdeModulePkg/CdExpressPei: Use " Jiewen Yao
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 11+ messages in thread
From: Jiewen Yao @ 2016-10-09  1:28 UTC (permalink / raw)
  To: edk2-devel; +Cc: Feng Tian, Star Zeng, Liming Gao, Eric Dong, Ruiyu Ni

This PCD is used to indicated the recovery file name.
The previous name - FvMain.Fv is hardcoded in FatPei and CdExpressPei.
It does not make sense to force the name.

Now a platform may use any recovery file name.

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: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
---
 MdeModulePkg/MdeModulePkg.dec | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec
index 1e88568..76b4e1b 100644
--- a/MdeModulePkg/MdeModulePkg.dec
+++ b/MdeModulePkg/MdeModulePkg.dec
@@ -1645,6 +1645,12 @@
   # @Prompt Enable fast PS2 detection
   gEfiMdeModulePkgTokenSpaceGuid.PcdFastPS2Detection|FALSE|BOOLEAN|0x30001044
 
+  ## This is recover file name in PEI phase.
+  #  The file must be in the root directory.
+  #  The file name must be the 8.3 format.
+  #  The PCD data must be in UNICODE format.
+  gEfiMdeModulePkgTokenSpaceGuid.PcdRecoveryFileName|L"FVMAIN.FV"|VOID*|0x30001045
+
 [PcdsPatchableInModule]
   ## Specify memory size with page number for PEI code when
   #  Loading Module at Fixed Address feature is enabled.
-- 
2.7.4.windows.1



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH V2 2/3] MdeModulePkg/CdExpressPei: Use PcdRecoveryFileName PCD.
  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  1:28 ` Jiewen Yao
  2016-10-09  1:28 ` [PATCH V2 3/3] FatPkg/FatPei: " Jiewen Yao
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: Jiewen Yao @ 2016-10-09  1:28 UTC (permalink / raw)
  To: edk2-devel; +Cc: Feng Tian, Star Zeng, Liming Gao, Eric Dong, Ruiyu Ni

This PCD is used to indicated the recovery file name.
The previous name - FvMain.Fv is hardcoded in CdExpressPei.
It does not make sense to force the name.

Now a platform may use any recovery file name.

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: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
---
 MdeModulePkg/Universal/Disk/CdExpressPei/CdExpressPei.inf |  5 ++++-
 MdeModulePkg/Universal/Disk/CdExpressPei/PeiCdExpress.c   | 16 ++++++++++++++--
 MdeModulePkg/Universal/Disk/CdExpressPei/PeiCdExpress.h   |  7 +------
 3 files changed, 19 insertions(+), 9 deletions(-)

diff --git a/MdeModulePkg/Universal/Disk/CdExpressPei/CdExpressPei.inf b/MdeModulePkg/Universal/Disk/CdExpressPei/CdExpressPei.inf
index e9d45e5..facad47 100644
--- a/MdeModulePkg/Universal/Disk/CdExpressPei/CdExpressPei.inf
+++ b/MdeModulePkg/Universal/Disk/CdExpressPei/CdExpressPei.inf
@@ -5,7 +5,7 @@
 # finds whether there is Recovery data in the device. If it finds recovery
 # data, it will install Device Recovery Module PPI.
 #
-# 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
@@ -68,6 +68,9 @@
 [FeaturePcd]
   gEfiMdeModulePkgTokenSpaceGuid.PcdFrameworkCompatibilitySupport   ## CONSUMES
 
+[Pcd]
+  gEfiMdeModulePkgTokenSpaceGuid.PcdRecoveryFileName         ## CONSUMES
+
 [Depex]
   gEfiPeiMemoryDiscoveredPpiGuid AND gEfiPeiBootInRecoveryModePpiGuid
 
diff --git a/MdeModulePkg/Universal/Disk/CdExpressPei/PeiCdExpress.c b/MdeModulePkg/Universal/Disk/CdExpressPei/PeiCdExpress.c
index 371ab73..d3cbfaa 100644
--- a/MdeModulePkg/Universal/Disk/CdExpressPei/PeiCdExpress.c
+++ b/MdeModulePkg/Universal/Disk/CdExpressPei/PeiCdExpress.c
@@ -17,6 +17,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include "PeiCdExpress.h"
 
 PEI_CD_EXPRESS_PRIVATE_DATA *mPrivateData = NULL;
+CHAR8 *mRecoveryFileName;
+UINTN mRecoveryFileNameSize;
 
 /**
   Installs the Device Recovery Module PPI, Initialize BlockIo Ppi 
@@ -48,6 +50,16 @@ CdExpressPeimEntry (
     return EFI_OUT_OF_RESOURCES;
   }
 
+  mRecoveryFileNameSize = PcdGetSize(PcdRecoveryFileName) / sizeof(CHAR16);
+  mRecoveryFileName = AllocatePool(mRecoveryFileNameSize);
+  if (mRecoveryFileName == NULL) {
+    return EFI_OUT_OF_RESOURCES;
+  }
+  Status = UnicodeStrToAsciiStrS(PcdGetPtr(PcdRecoveryFileName), mRecoveryFileName, mRecoveryFileNameSize);
+  if (EFI_ERROR(Status)) {
+    return Status;
+  }
+
   //
   // Initialize Private Data (to zero, as is required by subsequent operations)
   //
@@ -466,12 +478,12 @@ RetrieveCapsuleFileFromRoot (
       }
     }
 
-    if (Index != (sizeof (PEI_RECOVERY_FILE_NAME) - 1)) {
+    if (Index != mRecoveryFileNameSize - 1) {
       Buffer += FileRecord->Length;
       continue;
     }
 
-    if (!StringCmp (FileRecord->FileID, (UINT8 *) PEI_RECOVERY_FILE_NAME, sizeof (PEI_RECOVERY_FILE_NAME) - 1, FALSE)) {
+    if (!StringCmp (FileRecord->FileID, (UINT8 *)mRecoveryFileName, mRecoveryFileNameSize - 1, FALSE)) {
       Buffer += FileRecord->Length;
       continue;
     }
diff --git a/MdeModulePkg/Universal/Disk/CdExpressPei/PeiCdExpress.h b/MdeModulePkg/Universal/Disk/CdExpressPei/PeiCdExpress.h
index 91f34dc..1c8843c 100644
--- a/MdeModulePkg/Universal/Disk/CdExpressPei/PeiCdExpress.h
+++ b/MdeModulePkg/Universal/Disk/CdExpressPei/PeiCdExpress.h
@@ -1,7 +1,7 @@
 /** @file
   Header file for CD 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
@@ -43,11 +43,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #define PEI_MEMMORY_PAGE_SIZE             0x1000
 
 //
-// Recovery file name (in root directory)
-//
-#define PEI_RECOVERY_FILE_NAME  "FVMAIN.FV"
-
-//
 // Following are defined according to ISO-9660 specification
 //
 #define PEI_CD_STANDARD_ID                      "CD001"
-- 
2.7.4.windows.1



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH V2 3/3] FatPkg/FatPei: Use PcdRecoveryFileName PCD.
  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  1:28 ` [PATCH V2 2/3] MdeModulePkg/CdExpressPei: Use " Jiewen Yao
@ 2016-10-09  1:28 ` Jiewen Yao
  2016-10-09  1:42 ` [PATCH V2 0/3] Add " Tian, Feng
  2016-10-09 17:32 ` Kinney, Michael D
  4 siblings, 0 replies; 11+ messages in thread
From: Jiewen Yao @ 2016-10-09  1:28 UTC (permalink / raw)
  To: edk2-devel; +Cc: Ruiyu Ni, Feng Tian, Star Zeng, Liming Gao, Eric Dong

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



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH V2 0/3] Add PcdRecoveryFileName PCD.
  2016-10-09  1:28 [PATCH V2 0/3] Add PcdRecoveryFileName PCD Jiewen Yao
                   ` (2 preceding siblings ...)
  2016-10-09  1:28 ` [PATCH V2 3/3] FatPkg/FatPei: " Jiewen Yao
@ 2016-10-09  1:42 ` Tian, Feng
  2016-10-09 17:32 ` Kinney, Michael D
  4 siblings, 0 replies; 11+ messages in thread
From: Tian, Feng @ 2016-10-09  1:42 UTC (permalink / raw)
  To: Yao, Jiewen, edk2-devel@lists.01.org; +Cc: Tian, Feng

Reviewed-by: Feng Tian <feng.tian@Intel.com>

Thanks
Feng

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Jiewen Yao
Sent: Sunday, October 9, 2016 9:28 AM
To: edk2-devel@lists.01.org
Subject: [edk2] [PATCH V2 0/3] Add PcdRecoveryFileName PCD.

The V2 version moves PCD to [PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]

=========================
This PCD is used to indicated the recovery file name.
The previous name - FvMain.Fv is hardcoded in FatPei and CdExpressPei.
It does not make sense to force the name.

Now a platform may use any recovery file name.

Jiewen Yao (3):
  MdeModulePkg/dec: Add PcdRecoveryFileName PCD.
  MdeModulePkg/CdExpressPei: Use PcdRecoveryFileName PCD.
  FatPkg/FatPei: Use PcdRecoveryFileName PCD.

 FatPkg/FatPei/FatLiteApi.c                                |  8 ++++----
 FatPkg/FatPei/FatLitePeim.h                               |  4 +---
 FatPkg/FatPei/FatPei.inf                                  |  5 ++++-
 MdeModulePkg/MdeModulePkg.dec                             |  6 ++++++
 MdeModulePkg/Universal/Disk/CdExpressPei/CdExpressPei.inf |  5 ++++-
 MdeModulePkg/Universal/Disk/CdExpressPei/PeiCdExpress.c   | 16 ++++++++++++++--
 MdeModulePkg/Universal/Disk/CdExpressPei/PeiCdExpress.h   |  7 +------
 7 files changed, 34 insertions(+), 17 deletions(-)

--
2.7.4.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH V2 1/3] MdeModulePkg/dec: Add PcdRecoveryFileName PCD.
  2016-10-09  1:28 ` [PATCH V2 1/3] MdeModulePkg/dec: " Jiewen Yao
@ 2016-10-09  2:06   ` Ni, Ruiyu
  0 siblings, 0 replies; 11+ messages in thread
From: Ni, Ruiyu @ 2016-10-09  2:06 UTC (permalink / raw)
  To: Yao, Jiewen, edk2-devel@lists.01.org
  Cc: Tian, Feng, Zeng, Star, Gao, Liming, Dong, Eric

All serials Reviewed-by: Ruiyu Ni <Ruiyu.ni@intel.com>

Thanks/Ray

> -----Original Message-----
> From: Yao, Jiewen
> Sent: Sunday, October 9, 2016 9:28 AM
> To: edk2-devel@lists.01.org
> Cc: Tian, Feng <feng.tian@intel.com>; Zeng, Star <star.zeng@intel.com>;
> Gao, Liming <liming.gao@intel.com>; Dong, Eric <eric.dong@intel.com>; Ni,
> Ruiyu <ruiyu.ni@intel.com>
> Subject: [PATCH V2 1/3] MdeModulePkg/dec: Add PcdRecoveryFileName
> PCD.
> 
> This PCD is used to indicated the recovery file name.
> The previous name - FvMain.Fv is hardcoded in FatPei and CdExpressPei.
> It does not make sense to force the name.
> 
> Now a platform may use any recovery file name.
> 
> 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: Ruiyu Ni <ruiyu.ni@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
> ---
>  MdeModulePkg/MdeModulePkg.dec | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/MdeModulePkg/MdeModulePkg.dec
> b/MdeModulePkg/MdeModulePkg.dec index 1e88568..76b4e1b 100644
> --- a/MdeModulePkg/MdeModulePkg.dec
> +++ b/MdeModulePkg/MdeModulePkg.dec
> @@ -1645,6 +1645,12 @@
>    # @Prompt Enable fast PS2 detection
> 
> gEfiMdeModulePkgTokenSpaceGuid.PcdFastPS2Detection|FALSE|BOOLEAN
> |0x30001044
> 
> +  ## This is recover file name in PEI phase.
> +  #  The file must be in the root directory.
> +  #  The file name must be the 8.3 format.
> +  #  The PCD data must be in UNICODE format.
> +
> +
> gEfiMdeModulePkgTokenSpaceGuid.PcdRecoveryFileName|L"FVMAIN.FV"|
> VOID*|
> + 0x30001045
> +
>  [PcdsPatchableInModule]
>    ## Specify memory size with page number for PEI code when
>    #  Loading Module at Fixed Address feature is enabled.
> --
> 2.7.4.windows.1



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH V2 0/3] Add PcdRecoveryFileName PCD.
  2016-10-09  1:28 [PATCH V2 0/3] Add PcdRecoveryFileName PCD Jiewen Yao
                   ` (3 preceding siblings ...)
  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
  4 siblings, 1 reply; 11+ messages in thread
From: Kinney, Michael D @ 2016-10-09 17:32 UTC (permalink / raw)
  To: Yao, Jiewen, edk2-devel@lists.01.org, Kinney, Michael D

Jiewen,

Not sure what is wrong, but if I set this PCD to a different value, the
recovery image can not be found on the recovery media.  For example, if I
update Quark DSC to use the value QUARKREC.CAP, and I put that file on
the same USB FLASH drive that worked with default value of FVMAIN.FV, the
file can not be found.

Mike

> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Jiewen Yao
> Sent: Saturday, October 8, 2016 6:28 PM
> To: edk2-devel@lists.01.org
> Subject: [edk2] [PATCH V2 0/3] Add PcdRecoveryFileName PCD.
> 
> The V2 version moves PCD to [PcdsFixedAtBuild,
> PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]
> 
> =========================
> This PCD is used to indicated the recovery file name.
> The previous name - FvMain.Fv is hardcoded in FatPei and CdExpressPei.
> It does not make sense to force the name.
> 
> Now a platform may use any recovery file name.
> 
> Jiewen Yao (3):
>   MdeModulePkg/dec: Add PcdRecoveryFileName PCD.
>   MdeModulePkg/CdExpressPei: Use PcdRecoveryFileName PCD.
>   FatPkg/FatPei: Use PcdRecoveryFileName PCD.
> 
>  FatPkg/FatPei/FatLiteApi.c                                |  8 ++++----
>  FatPkg/FatPei/FatLitePeim.h                               |  4 +---
>  FatPkg/FatPei/FatPei.inf                                  |  5 ++++-
>  MdeModulePkg/MdeModulePkg.dec                             |  6 ++++++
>  MdeModulePkg/Universal/Disk/CdExpressPei/CdExpressPei.inf |  5 ++++-
>  MdeModulePkg/Universal/Disk/CdExpressPei/PeiCdExpress.c   | 16 ++++++++++++++--
>  MdeModulePkg/Universal/Disk/CdExpressPei/PeiCdExpress.h   |  7 +------
>  7 files changed, 34 insertions(+), 17 deletions(-)
> 
> --
> 2.7.4.windows.1
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH V2 0/3] Add PcdRecoveryFileName PCD.
  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
  0 siblings, 2 replies; 11+ messages in thread
From: Yao, Jiewen @ 2016-10-10  3:37 UTC (permalink / raw)
  To: Kinney, Michael D, edk2-devel@lists.01.org; +Cc: Yao, Jiewen

Hi Mike
I am surprised to hear that.

I double check it just now. It still works well.

I am using below:
  gEfiMdeModulePkgTokenSpaceGuid.PcdRecoveryFileName|L"QUARKREC.Cap"

What do you configure?

Thank you
Yao Jiewen

From: Kinney, Michael D
Sent: Monday, October 10, 2016 1:32 AM
To: Yao, Jiewen <jiewen.yao@intel.com>; edk2-devel@lists.01.org; Kinney, Michael D <michael.d.kinney@intel.com>
Subject: RE: [edk2] [PATCH V2 0/3] Add PcdRecoveryFileName PCD.

Jiewen,

Not sure what is wrong, but if I set this PCD to a different value, the
recovery image can not be found on the recovery media.  For example, if I
update Quark DSC to use the value QUARKREC.CAP, and I put that file on
the same USB FLASH drive that worked with default value of FVMAIN.FV, the
file can not be found.

Mike

> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Jiewen Yao
> Sent: Saturday, October 8, 2016 6:28 PM
> To: edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
> Subject: [edk2] [PATCH V2 0/3] Add PcdRecoveryFileName PCD.
>
> The V2 version moves PCD to [PcdsFixedAtBuild,
> PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]
>
> =========================
> This PCD is used to indicated the recovery file name.
> The previous name - FvMain.Fv is hardcoded in FatPei and CdExpressPei.
> It does not make sense to force the name.
>
> Now a platform may use any recovery file name.
>
> Jiewen Yao (3):
>   MdeModulePkg/dec: Add PcdRecoveryFileName PCD.
>   MdeModulePkg/CdExpressPei: Use PcdRecoveryFileName PCD.
>   FatPkg/FatPei: Use PcdRecoveryFileName PCD.
>
>  FatPkg/FatPei/FatLiteApi.c                                |  8 ++++----
>  FatPkg/FatPei/FatLitePeim.h                               |  4 +---
>  FatPkg/FatPei/FatPei.inf                                  |  5 ++++-
>  MdeModulePkg/MdeModulePkg.dec                             |  6 ++++++
>  MdeModulePkg/Universal/Disk/CdExpressPei/CdExpressPei.inf |  5 ++++-
>  MdeModulePkg/Universal/Disk/CdExpressPei/PeiCdExpress.c   | 16 ++++++++++++++--
>  MdeModulePkg/Universal/Disk/CdExpressPei/PeiCdExpress.h   |  7 +------
>  7 files changed, 34 insertions(+), 17 deletions(-)
>
> --
> 2.7.4.windows.1
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
> https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH V2 0/3] Add PcdRecoveryFileName PCD.
  2016-10-10  3:37   ` Yao, Jiewen
@ 2016-10-10  3:53     ` Kinney, Michael D
  2016-10-11  0:43     ` Kinney, Michael D
  1 sibling, 0 replies; 11+ messages in thread
From: Kinney, Michael D @ 2016-10-10  3:53 UTC (permalink / raw)
  To: Yao, Jiewen, edk2-devel@lists.01.org, Kinney, Michael D

Jiewen,

That is one of the values I tried.  Maybe it is a build or merge issue on my end.  I will try again.

Mike

From: Yao, Jiewen
Sent: Sunday, October 9, 2016 8:37 PM
To: Kinney, Michael D <michael.d.kinney@intel.com>; edk2-devel@lists.01.org
Cc: Yao, Jiewen <jiewen.yao@intel.com>
Subject: RE: [edk2] [PATCH V2 0/3] Add PcdRecoveryFileName PCD.

Hi Mike
I am surprised to hear that.

I double check it just now. It still works well.

I am using below:
  gEfiMdeModulePkgTokenSpaceGuid.PcdRecoveryFileName|L"QUARKREC.Cap"

What do you configure?

Thank you
Yao Jiewen

From: Kinney, Michael D
Sent: Monday, October 10, 2016 1:32 AM
To: Yao, Jiewen <jiewen.yao@intel.com<mailto:jiewen.yao@intel.com>>; edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>; Kinney, Michael D <michael.d.kinney@intel.com<mailto:michael.d.kinney@intel.com>>
Subject: RE: [edk2] [PATCH V2 0/3] Add PcdRecoveryFileName PCD.

Jiewen,

Not sure what is wrong, but if I set this PCD to a different value, the
recovery image can not be found on the recovery media.  For example, if I
update Quark DSC to use the value QUARKREC.CAP, and I put that file on
the same USB FLASH drive that worked with default value of FVMAIN.FV, the
file can not be found.

Mike

> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Jiewen Yao
> Sent: Saturday, October 8, 2016 6:28 PM
> To: edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
> Subject: [edk2] [PATCH V2 0/3] Add PcdRecoveryFileName PCD.
>
> The V2 version moves PCD to [PcdsFixedAtBuild,
> PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]
>
> =========================
> This PCD is used to indicated the recovery file name.
> The previous name - FvMain.Fv is hardcoded in FatPei and CdExpressPei.
> It does not make sense to force the name.
>
> Now a platform may use any recovery file name.
>
> Jiewen Yao (3):
>   MdeModulePkg/dec: Add PcdRecoveryFileName PCD.
>   MdeModulePkg/CdExpressPei: Use PcdRecoveryFileName PCD.
>   FatPkg/FatPei: Use PcdRecoveryFileName PCD.
>
>  FatPkg/FatPei/FatLiteApi.c                                |  8 ++++----
>  FatPkg/FatPei/FatLitePeim.h                               |  4 +---
>  FatPkg/FatPei/FatPei.inf                                  |  5 ++++-
>  MdeModulePkg/MdeModulePkg.dec                             |  6 ++++++
>  MdeModulePkg/Universal/Disk/CdExpressPei/CdExpressPei.inf |  5 ++++-
>  MdeModulePkg/Universal/Disk/CdExpressPei/PeiCdExpress.c   | 16 ++++++++++++++--
>  MdeModulePkg/Universal/Disk/CdExpressPei/PeiCdExpress.h   |  7 +------
>  7 files changed, 34 insertions(+), 17 deletions(-)
>
> --
> 2.7.4.windows.1
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
> https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH V2 0/3] Add PcdRecoveryFileName PCD.
  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
  1 sibling, 1 reply; 11+ messages in thread
From: Kinney, Michael D @ 2016-10-11  0:43 UTC (permalink / raw)
  To: Yao, Jiewen, edk2-devel@lists.01.org, Kinney, Michael D

Jiewen,

I have resolved my build issue.  I have verified that using a recovery 
filename of L"QUARKREC.Cap" works.

However, as part of my testing, I added this PCD to a [PcdsFixedAtBuild]
section and the FAT PEIM does not build.  With this PCD type the PcdGetPtr() 
function returns a CONST pointer and the FindRecoveryFile() requires a non 
CONST pointer.

The fix is to cast the value returned by PcdGetPtr() to CHAR16 *.

-    Status = FindRecoveryFile (PrivateData, Index, PcdGetPtr(PcdRecoveryFileName), &Handle);
+    Status = FindRecoveryFile (PrivateData, Index, (CHAR16 *)PcdGetPtr (PcdRecoveryFileName), &Handle);

There are 3 instances of this in the FAT PEIM that need to be fixed.

Thanks,

Mike




From: Yao, Jiewen 
Sent: Sunday, October 9, 2016 8:37 PM
To: Kinney, Michael D <michael.d.kinney@intel.com>; edk2-devel@lists.01.org
Cc: Yao, Jiewen <jiewen.yao@intel.com>
Subject: RE: [edk2] [PATCH V2 0/3] Add PcdRecoveryFileName PCD.

Hi Mike
I am surprised to hear that.

I double check it just now. It still works well.

I am using below:
  gEfiMdeModulePkgTokenSpaceGuid.PcdRecoveryFileName|L"QUARKREC.Cap"

What do you configure?

Thank you
Yao Jiewen

From: Kinney, Michael D 
Sent: Monday, October 10, 2016 1:32 AM
To: Yao, Jiewen <jiewen.yao@intel.com>; edk2-devel@lists.01.org; Kinney, Michael D <michael.d.kinney@intel.com>
Subject: RE: [edk2] [PATCH V2 0/3] Add PcdRecoveryFileName PCD.

Jiewen,

Not sure what is wrong, but if I set this PCD to a different value, the
recovery image can not be found on the recovery media.  For example, if I
update Quark DSC to use the value QUARKREC.CAP, and I put that file on
the same USB FLASH drive that worked with default value of FVMAIN.FV, the
file can not be found.

Mike

> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Jiewen Yao
> Sent: Saturday, October 8, 2016 6:28 PM
> To: edk2-devel@lists.01.org
> Subject: [edk2] [PATCH V2 0/3] Add PcdRecoveryFileName PCD.
> 
> The V2 version moves PCD to [PcdsFixedAtBuild,
> PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]
> 
> =========================
> This PCD is used to indicated the recovery file name.
> The previous name - FvMain.Fv is hardcoded in FatPei and CdExpressPei.
> It does not make sense to force the name.
> 
> Now a platform may use any recovery file name.
> 
> Jiewen Yao (3):
>   MdeModulePkg/dec: Add PcdRecoveryFileName PCD.
>   MdeModulePkg/CdExpressPei: Use PcdRecoveryFileName PCD.
>   FatPkg/FatPei: Use PcdRecoveryFileName PCD.
> 
>  FatPkg/FatPei/FatLiteApi.c                                |  8 ++++----
>  FatPkg/FatPei/FatLitePeim.h                               |  4 +---
>  FatPkg/FatPei/FatPei.inf                                  |  5 ++++-
>  MdeModulePkg/MdeModulePkg.dec                             |  6 ++++++
>  MdeModulePkg/Universal/Disk/CdExpressPei/CdExpressPei.inf |  5 ++++-
>  MdeModulePkg/Universal/Disk/CdExpressPei/PeiCdExpress.c   | 16 ++++++++++++++--
>  MdeModulePkg/Universal/Disk/CdExpressPei/PeiCdExpress.h   |  7 +------
>  7 files changed, 34 insertions(+), 17 deletions(-)
> 
> --
> 2.7.4.windows.1
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH V2 0/3] Add PcdRecoveryFileName PCD.
  2016-10-11  0:43     ` Kinney, Michael D
@ 2016-10-11  0:46       ` Yao, Jiewen
  0 siblings, 0 replies; 11+ messages in thread
From: Yao, Jiewen @ 2016-10-11  0:46 UTC (permalink / raw)
  To: Kinney, Michael D, edk2-devel@lists.01.org

Yes. I just fixed that yesterday on my side.

I am surprise it does not appear before. Anyway I will send out V2 patch.


From: Kinney, Michael D
Sent: Tuesday, October 11, 2016 8:43 AM
To: Yao, Jiewen <jiewen.yao@intel.com>; edk2-devel@lists.01.org; Kinney, Michael D <michael.d.kinney@intel.com>
Subject: RE: [edk2] [PATCH V2 0/3] Add PcdRecoveryFileName PCD.

Jiewen,

I have resolved my build issue.  I have verified that using a recovery
filename of L"QUARKREC.Cap" works.

However, as part of my testing, I added this PCD to a [PcdsFixedAtBuild]
section and the FAT PEIM does not build.  With this PCD type the PcdGetPtr()
function returns a CONST pointer and the FindRecoveryFile() requires a non
CONST pointer.

The fix is to cast the value returned by PcdGetPtr() to CHAR16 *.

-    Status = FindRecoveryFile (PrivateData, Index, PcdGetPtr(PcdRecoveryFileName), &Handle);
+    Status = FindRecoveryFile (PrivateData, Index, (CHAR16 *)PcdGetPtr (PcdRecoveryFileName), &Handle);

There are 3 instances of this in the FAT PEIM that need to be fixed.

Thanks,

Mike




From: Yao, Jiewen
Sent: Sunday, October 9, 2016 8:37 PM
To: Kinney, Michael D <michael.d.kinney@intel.com<mailto:michael.d.kinney@intel.com>>; edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
Cc: Yao, Jiewen <jiewen.yao@intel.com<mailto:jiewen.yao@intel.com>>
Subject: RE: [edk2] [PATCH V2 0/3] Add PcdRecoveryFileName PCD.

Hi Mike
I am surprised to hear that.

I double check it just now. It still works well.

I am using below:
  gEfiMdeModulePkgTokenSpaceGuid.PcdRecoveryFileName|L"QUARKREC.Cap"

What do you configure?

Thank you
Yao Jiewen

From: Kinney, Michael D
Sent: Monday, October 10, 2016 1:32 AM
To: Yao, Jiewen <jiewen.yao@intel.com<mailto:jiewen.yao@intel.com>>; edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>; Kinney, Michael D <michael.d.kinney@intel.com<mailto:michael.d.kinney@intel.com>>
Subject: RE: [edk2] [PATCH V2 0/3] Add PcdRecoveryFileName PCD.

Jiewen,

Not sure what is wrong, but if I set this PCD to a different value, the
recovery image can not be found on the recovery media.  For example, if I
update Quark DSC to use the value QUARKREC.CAP, and I put that file on
the same USB FLASH drive that worked with default value of FVMAIN.FV, the
file can not be found.

Mike

> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Jiewen Yao
> Sent: Saturday, October 8, 2016 6:28 PM
> To: edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
> Subject: [edk2] [PATCH V2 0/3] Add PcdRecoveryFileName PCD.
>
> The V2 version moves PCD to [PcdsFixedAtBuild,
> PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]
>
> =========================
> This PCD is used to indicated the recovery file name.
> The previous name - FvMain.Fv is hardcoded in FatPei and CdExpressPei.
> It does not make sense to force the name.
>
> Now a platform may use any recovery file name.
>
> Jiewen Yao (3):
>   MdeModulePkg/dec: Add PcdRecoveryFileName PCD.
>   MdeModulePkg/CdExpressPei: Use PcdRecoveryFileName PCD.
>   FatPkg/FatPei: Use PcdRecoveryFileName PCD.
>
>  FatPkg/FatPei/FatLiteApi.c                                |  8 ++++----
>  FatPkg/FatPei/FatLitePeim.h                               |  4 +---
>  FatPkg/FatPei/FatPei.inf                                  |  5 ++++-
>  MdeModulePkg/MdeModulePkg.dec                             |  6 ++++++
>  MdeModulePkg/Universal/Disk/CdExpressPei/CdExpressPei.inf |  5 ++++-
>  MdeModulePkg/Universal/Disk/CdExpressPei/PeiCdExpress.c   | 16 ++++++++++++++--
>  MdeModulePkg/Universal/Disk/CdExpressPei/PeiCdExpress.h   |  7 +------
>  7 files changed, 34 insertions(+), 17 deletions(-)
>
> --
> 2.7.4.windows.1
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
> https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2016-10-11  0:46 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH V2 3/3] FatPkg/FatPei: " Jiewen Yao
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox