From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mx.groups.io with SMTP id smtpd.web09.35729.1629181257378500113 for ; Mon, 16 Aug 2021 23:20:57 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.65, mailfrom: yuwei.chen@intel.com) X-IronPort-AV: E=McAfee;i="6200,9189,10078"; a="216035078" X-IronPort-AV: E=Sophos;i="5.84,328,1620716400"; d="scan'208";a="216035078" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2021 23:20:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,328,1620716400"; d="scan'208";a="520313632" Received: from yuweipc.ccr.corp.intel.com ([10.239.158.34]) by FMSMGA003.fm.intel.com with ESMTP; 16 Aug 2021 23:20:42 -0700 From: "Yuwei Chen" To: devel@edk2.groups.io Cc: Bob Feng , Liming Gao , Andrew Fish , Leif Lindholm , Michael D Kinney Subject: [PATCH 1/1] BaseTools/GenFds: Change FV Header to FileSystemGuid3, edk2-stable202108 Date: Tue, 17 Aug 2021 14:20:41 +0800 Message-Id: <20210817062041.755-1-yuwei.chen@intel.com> X-Mailer: git-send-email 2.27.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Cc: Bob Feng Cc: Liming Gao Cc: Andrew Fish Cc: Leif Lindholm Cc: Michael D Kinney --- 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