[edk2-devel] [PATCH 1/1] BaseTools/GenFds: Change FV Header to FileSystemGuid3, edk2-stable202108

Yuwei Chen yuwei.chen at intel.com
Tue Aug 17 06:20:41 UTC 2021


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 at intel.com>
Cc: Bob Feng <bob.c.feng at intel.com>
Cc: Liming Gao <gaoliming at byosoft.com.cn>
Cc: Andrew Fish <afish at apple.com>
Cc: Leif Lindholm <leif at nuviainc.com>
Cc: Michael D Kinney <michael.d.kinney at 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



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#79407): https://edk2.groups.io/g/devel/message/79407
Mute This Topic: https://groups.io/mt/84942129/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list