From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 5E9FC1A1E3A for ; Mon, 24 Oct 2016 02:34:42 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 24 Oct 2016 02:34:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,541,1473145200"; d="scan'208";a="1049143685" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga001.jf.intel.com with ESMTP; 24 Oct 2016 02:34:33 -0700 Received: from fmsmsx117.amr.corp.intel.com (10.18.116.17) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 24 Oct 2016 02:34:32 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx117.amr.corp.intel.com (10.18.116.17) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 24 Oct 2016 02:34:32 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.206]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.209]) with mapi id 14.03.0248.002; Mon, 24 Oct 2016 17:34:30 +0800 From: "Gao, Liming" To: "Zeng, Star" , "edk2-devel@lists.01.org" Thread-Topic: [PATCH] MdeModulePkg PeiCore: Make sure FvInfo has FFS2 format if Ffs2Guid FvFormat Thread-Index: AQHSLdfDhlGK3cP56kms8EcetOxo9KC3V+yA Date: Mon, 24 Oct 2016 09:34:30 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14B4987D1@shsmsx102.ccr.corp.intel.com> References: <1477300771-68480-1-git-send-email-star.zeng@intel.com> In-Reply-To: <1477300771-68480-1-git-send-email-star.zeng@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] MdeModulePkg PeiCore: Make sure FvInfo has FFS2 format if Ffs2Guid FvFormat 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: Mon, 24 Oct 2016 09:34:42 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao > -----Original Message----- > From: Zeng, Star > Sent: Monday, October 24, 2016 5:20 PM > To: edk2-devel@lists.01.org > Cc: Zeng, Star ; Gao, Liming ; > Sean Brogan > Subject: [PATCH] MdeModulePkg PeiCore: Make sure FvInfo has FFS2 > format if Ffs2Guid FvFormat >=20 > Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D160 >=20 > Cc: Liming Gao > Cc: Sean Brogan > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Star Zeng > --- > MdeModulePkg/Core/Pei/FwVol/FwVol.c | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) >=20 > diff --git a/MdeModulePkg/Core/Pei/FwVol/FwVol.c > b/MdeModulePkg/Core/Pei/FwVol/FwVol.c > index 6ca41ee16f4a..554bcc31d976 100644 > --- a/MdeModulePkg/Core/Pei/FwVol/FwVol.c > +++ b/MdeModulePkg/Core/Pei/FwVol/FwVol.c > @@ -565,6 +565,20 @@ FirmwareVolmeInfoPpiNotifyCallback ( > IsFvInfo2 =3D FALSE; > } >=20 > + if (CompareGuid (&FvInfo2Ppi.FvFormat, &gEfiFirmwareFileSystem2Guid)) > { > + // > + // gEfiFirmwareFileSystem2Guid is specified for the FvFormat, then h= ere > to check the > + // FileSystemGuid pointed by FvInfo against > gEfiFirmwareFileSystem2Guid to make sure > + // FvInfo has the firmware file system 2 format. > + // > + // If the ASSERT really appears, the FvFormat needs to be specified > correctly, for example, > + // gEfiFirmwareFileSystem3Guid can be used for firmware file system = 3 > format, or > + // (((EFI_FIRMWARE_VOLUME_HEADER *) FvInfo)->FileSystemGuid can > be just used for both > + // firmware file system 2 and 3 format. > + // > + ASSERT (CompareGuid (&(((EFI_FIRMWARE_VOLUME_HEADER *) > FvInfo2Ppi.FvInfo)->FileSystemGuid), &gEfiFirmwareFileSystem2Guid)); > + } > + > // > // Locate the corresponding FV_PPI according to founded FV's format gu= id > // > -- > 2.7.0.windows.1