public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 1/1] BaseTools/GenFds: Change FV Header to FileSystemGuid3, edk2-stable202108
@ 2021-08-17  6:20 Yuwei Chen
  2021-08-18  2:23 ` 回复: [edk2-devel] " gaoliming
  0 siblings, 1 reply; 2+ messages in thread
From: Yuwei Chen @ 2021-08-17  6:20 UTC (permalink / raw)
  To: devel; +Cc: Bob Feng, Liming Gao, Andrew Fish, Leif Lindholm,
	Michael D Kinney

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3566

Following PI spec: when there has Ffs with EFI_FFS_FILE_HEADER2,
the Parent Fv of the Ffs need set to FileSystemGuid3; when all
the Ffs with EFI_FFS_FILE_HEADER, the Parent Fv of the Ffs need
set to FileSystemGuid2.
Currently, when changing the Ffs in Fv from EFI_FFS_FILE_HEADER
to EFI_FFS_FILE_HEADER2, the Fv FileSystemGuid does not changed
consistent with Ffs type.That caused build issue.

This patch fixes this issue.
As FileSystemGuid3 is compatible with FileSystemGuid2, change all
the Fv header to FileSystemGuid3.

Signed-off-by: Yuwei Chen <yuwei.chen@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Andrew Fish <afish@apple.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
---
 BaseTools/Source/C/GenFv/GenFv.c                       | 2 +-
 BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/BaseTools/Source/C/GenFv/GenFv.c b/BaseTools/Source/C/GenFv/GenFv.c
index 43cc5cd3fe82..af0c21db062a 100644
--- a/BaseTools/Source/C/GenFv/GenFv.c
+++ b/BaseTools/Source/C/GenFv/GenFv.c
@@ -225,7 +225,7 @@ Routine Description:
   //
   // Set the default FvGuid
   //
-  memcpy (&mFvDataInfo.FvFileSystemGuid, &mEfiFirmwareFileSystem2Guid, sizeof (EFI_GUID));
+  memcpy (&mFvDataInfo.FvFileSystemGuid, &mEfiFirmwareFileSystem3Guid, sizeof (EFI_GUID));
   mFvDataInfo.ForceRebase = -1;
 
   //
diff --git a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py b/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py
index 25f9d54874d3..fa559793824d 100644
--- a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py
+++ b/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py
@@ -599,6 +599,8 @@ class GenFdsGlobalVariable:
         if MapFile:
             Cmd += ("-m", MapFile)
         if FileSystemGuid:
+            if FileSystemGuid == EFI_FIRMWARE_FILE_SYSTEM2_GUID:
+                FileSystemGuid = EFI_FIRMWARE_FILE_SYSTEM3_GUID
             Cmd += ("-g", FileSystemGuid)
         Cmd += ("-o", Output)
         for I in Input:
-- 
2.26.1.windows.1


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

* 回复: [edk2-devel] [PATCH 1/1] BaseTools/GenFds: Change FV Header to FileSystemGuid3, edk2-stable202108
  2021-08-17  6:20 [PATCH 1/1] BaseTools/GenFds: Change FV Header to FileSystemGuid3, edk2-stable202108 Yuwei Chen
@ 2021-08-18  2:23 ` gaoliming
  0 siblings, 0 replies; 2+ messages in thread
From: gaoliming @ 2021-08-18  2:23 UTC (permalink / raw)
  To: devel, yuwei.chen
  Cc: 'Bob Feng', 'Andrew Fish',
	'Leif Lindholm', 'Michael D Kinney'

Yuwei:
  This change may impact the third part tool. Customer may have their tool
to parse BIOS image. They may not support FileSystemGuid3. 

  So, I suggest to defer this patch to next stable tag so that there are
enough time to collect the feedback. 

  For this patch, I add my comments below. 

Thanks
Liming
> -----邮件原件-----
> 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Yuwei Chen
> 发送时间: 2021年8月17日 14:21
> 收件人: devel@edk2.groups.io
> 抄送: Bob Feng <bob.c.feng@intel.com>; Liming Gao
> <gaoliming@byosoft.com.cn>; Andrew Fish <afish@apple.com>; Leif
> Lindholm <leif@nuviainc.com>; Michael D Kinney
> <michael.d.kinney@intel.com>
> 主题: [edk2-devel] [PATCH 1/1] BaseTools/GenFds: Change FV Header to
> FileSystemGuid3, edk2-stable202108
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3566
> 
> Following PI spec: when there has Ffs with EFI_FFS_FILE_HEADER2,
> the Parent Fv of the Ffs need set to FileSystemGuid3; when all
> the Ffs with EFI_FFS_FILE_HEADER, the Parent Fv of the Ffs need
> set to FileSystemGuid2.
> Currently, when changing the Ffs in Fv from EFI_FFS_FILE_HEADER
> to EFI_FFS_FILE_HEADER2, the Fv FileSystemGuid does not changed
> consistent with Ffs type.That caused build issue.
> 
> This patch fixes this issue.
> As FileSystemGuid3 is compatible with FileSystemGuid2, change all
> the Fv header to FileSystemGuid3.
> 
> Signed-off-by: Yuwei Chen <yuwei.chen@intel.com>
> Cc: Bob Feng <bob.c.feng@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Andrew Fish <afish@apple.com>
> Cc: Leif Lindholm <leif@nuviainc.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> ---
>  BaseTools/Source/C/GenFv/GenFv.c                       | 2 +-
>  BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py | 2 ++
>  2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/BaseTools/Source/C/GenFv/GenFv.c
> b/BaseTools/Source/C/GenFv/GenFv.c
> index 43cc5cd3fe82..af0c21db062a 100644
> --- a/BaseTools/Source/C/GenFv/GenFv.c
> +++ b/BaseTools/Source/C/GenFv/GenFv.c
> @@ -225,7 +225,7 @@ Routine Description:
>    //
>    // Set the default FvGuid
>    //
> -  memcpy (&mFvDataInfo.FvFileSystemGuid,
> &mEfiFirmwareFileSystem2Guid, sizeof (EFI_GUID));
> +  memcpy (&mFvDataInfo.FvFileSystemGuid,
> &mEfiFirmwareFileSystem3Guid, sizeof (EFI_GUID));
>    mFvDataInfo.ForceRebase = -1;
> 
>    //
> diff --git a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py
> b/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py
> index 25f9d54874d3..fa559793824d 100644
> --- a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py
> +++ b/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py
> @@ -599,6 +599,8 @@ class GenFdsGlobalVariable:
>          if MapFile:
>              Cmd += ("-m", MapFile)
>          if FileSystemGuid:
> +            if FileSystemGuid == EFI_FIRMWARE_FILE_SYSTEM2_GUID:
> +                FileSystemGuid = EFI_FIRMWARE_FILE_SYSTEM3_GUID
[Liming] I don’t find EFI_FIRMWARE_FILE_SYSTEM2_GUID definition. Do you
verify this logic?
And, does == support the case insensitive string comparison?  

Liming
Thanks
>              Cmd += ("-g", FileSystemGuid)
>          Cmd += ("-o", Output)
>          for I in Input:
> --
> 2.26.1.windows.1
> 
> 
> 
> 
> 




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

end of thread, other threads:[~2021-08-18  2:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-17  6:20 [PATCH 1/1] BaseTools/GenFds: Change FV Header to FileSystemGuid3, edk2-stable202108 Yuwei Chen
2021-08-18  2:23 ` 回复: [edk2-devel] " gaoliming

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