From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.88; helo=mga01.intel.com; envelope-from=jiewen.yao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id B34122237A4D5 for ; Fri, 2 Feb 2018 17:48:25 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Feb 2018 17:54:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,452,1511856000"; d="scan'208";a="26944352" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga004.fm.intel.com with ESMTP; 02 Feb 2018 17:54:03 -0800 Received: from fmsmsx102.amr.corp.intel.com (10.18.124.200) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 2 Feb 2018 17:54:03 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX102.amr.corp.intel.com (10.18.124.200) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 2 Feb 2018 17:54:03 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.124]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.125]) with mapi id 14.03.0319.002; Sat, 3 Feb 2018 09:54:01 +0800 From: "Yao, Jiewen" To: Marvin H?user , "edk2-devel@lists.01.org" Thread-Topic: MinPlatformPkg/PlatformInit: FV code Thread-Index: AdOZ7dDRJ47e1o0uT++5ldvAkWh9yACMtQZQAAxKRNAAD+uEoA== Date: Sat, 3 Feb 2018 01:54:01 +0000 Message-ID: <74D8A39837DF1E4DA445A8C0B3885C503AAB05B0@shsmsx102.ccr.corp.intel.com> References: <74D8A39837DF1E4DA445A8C0B3885C503AAAA932@shsmsx102.ccr.corp.intel.com> In-Reply-To: Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZGU1Nzc2MWItOGViMC00OWY2LTg0OTUtMzBhMWE3Nzg1ZDZhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiJaZFoxOElLZnF0Wk9talpJNnd1cHFRNUxVNytMUmlHd2dPN294MkFBVGZ0ejlNWFBEQnRqTWM5RmNlYyt1SnlsIn0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: MinPlatformPkg/PlatformInit: FV code X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Feb 2018 01:48:26 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Ah, good catch. That is correct - it is irrelevant to PEI. To put to FV Hob is enough, I be= lieve. Appreciate your careful review, which helps us clean up the code. :-) Thank you Yao Jiewen > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Marvin H?user > Sent: Saturday, February 3, 2018 2:30 AM > To: edk2-devel@lists.01.org; Yao, Jiewen > Subject: Re: [edk2] MinPlatformPkg/PlatformInit: FV code >=20 > Good point with the DxeCore, I didn't consider that. Though OsBoot would = be > irrelevant to the PEI phase, wouldn't it be? >=20 > Thanks, > Marvin >=20 > From: Yao, Jiewen [mailto:jiewen.yao@intel.com] > Sent: Friday, February 2, 2018 1:40 PM > To: Marvin H?user ; edk2-devel@lists.01.org > Subject: RE: MinPlatformPkg/PlatformInit: FV code >=20 > Excellent question. >=20 > Comment inline. >=20 > From: Marvin H?user [mailto:Marvin.Haeuser@outlook.com] > Sent: Wednesday, January 31, 2018 1:54 AM > To: edk2-devel@lists.01.org; Yao, Jiewen > > > Subject: MinPlatformPkg/PlatformInit: FV code >=20 > Dear developers, dear Jiewen, >=20 > I have been investigating the devel-MinPlatform branch of edk2-platforms = for > educational purposes and got two questions regarding the Firmware Volume > code in PlatformInitPreMem, if you do not mind. I assume the tree was tes= ted, so > most likely I misunderstood some things. >=20 >=20 > 1. Why is a Firmware Volume HOB built to cover the entire flash range > (https://github.com/tianocore/edk2-platforms/blob/devel-MinPlatform/Platf= or > m/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c#= L3 > 79)? Am I correct that this implies a FV spanning through the entire flas= h MMIO > range, which would then imply all other FVs are contained within it? This= would > make sense, however that's not what I saw in the KabylakeOpenBoardPkg Fla= sh > Map, which has the NV Storage first > (https://github.com/tianocore/edk2-platforms/blob/devel-MinPlatform/Platf= or > m/Intel/KabylakeOpenBoardPkg/Include/Fdf/FlashMapInclude.fdf#L25). >=20 > [Jiewen] You are right. We should not use FD region for FV. Will fix it. >=20 >=20 >=20 > 1. Why are FV Info PPIs installed for the UefiBoot and the OsBoot FVs > (https://github.com/tianocore/edk2-platforms/blob/devel-MinPlatform/Platf= or > m/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c#= L3 > 44)? If I checked correctly, installing this PPI type will trigger PeiCor= e to dispatch > PEIMs in the FVs, however there are only DXE drivers in these. Why are no= FV > HOBs installed, which are gotten by DxeCore? >=20 > [Jiewen] In DxeIpl, PeiServicesFfsFindNextVolume() is used to search DxeC= ore. > In PeiCore, PeiFfsFindNextVolume() calls FindNextCoreFvHandle() for DxeCo= re > one by one. If PcdFrameworkCompatibilitySupport is FALSE, it returns > &Private->Fv[Instance] directly. >=20 > And Fv[Instance] is added in FirmwareVolmeInfoPpiNotifyCallback(), when > gEfiPeiFirmwareVolumeInfo2PpiGuid is installed. >=20 > So if PcdFrameworkCompatibilitySupport is FALSE, install PPI is the only = way to > let PEI core discover DxeCore. > Only if PcdFrameworkCompatibilitySupport is TRUE, install PPI is not requ= ired, > but the FindNextCoreFvHandle() will install the PPI for the HobFv. The re= sult is > same. >=20 >=20 > Thank you > Yao Jiewen >=20 >=20 >=20 >=20 > Thanks in advance for your time! >=20 > Best regards, > Marvin. > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel