From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=40.92.68.46; helo=eur02-he1-obe.outbound.protection.outlook.com; envelope-from=marvin.haeuser@outlook.com; receiver=edk2-devel@lists.01.org Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-oln040092068046.outbound.protection.outlook.com [40.92.68.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 2819820988475 for ; Fri, 13 Jul 2018 06:25:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZKIDRMCPkazgRh7d79u/fPPFCVDNfAfxcnGawn7GT5c=; b=QTw3CPjFX2p7Be+tjxsolNtt2HfpGiDs7mj12QGCCDcrDiZmx6uPRa/+eH+3bDpgSPceh2h7cc0CILCj1YDkJIftKOfZ/WmeYuKYZ4IpTvtVltODot3bQ7FsSpQhqLUeCmULQCKNIUff9mPkx1/plrLurZ5WSjULU5uoVEsJh9IQ/V8hftpKQIAyhkz5I9c2ppxb8r/3WDLFgqXlg1Dh3WkydamjvQf4O/1oJdK3Llg21yg11xy2wIH/nII9PAjY/8cMmU03RAIqXwHygaGDTGPRpnB6fukE9v/iRVqwb3tFbxSlP/RAStXiy5N4v482bphlERawARnbIqKgYIQnnQ== Received: from HE1EUR02FT034.eop-EUR02.prod.protection.outlook.com (10.152.10.53) by HE1EUR02HT039.eop-EUR02.prod.protection.outlook.com (10.152.10.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.20.930.16; Fri, 13 Jul 2018 13:25:35 +0000 Received: from HE1PR0801MB1786.eurprd08.prod.outlook.com (10.152.10.54) by HE1EUR02FT034.mail.protection.outlook.com (10.152.10.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.20.952.17 via Frontend Transport; Fri, 13 Jul 2018 13:25:35 +0000 Received: from HE1PR0801MB1786.eurprd08.prod.outlook.com ([fe80::35a9:b81f:7290:7e9b]) by HE1PR0801MB1786.eurprd08.prod.outlook.com ([fe80::35a9:b81f:7290:7e9b%7]) with mapi id 15.20.0952.017; Fri, 13 Jul 2018 13:25:35 +0000 From: Marvin H?user To: "edk2-devel@lists.01.org" CC: "Zeng, Star" , "eric.dong@intel.com" Thread-Topic: Inquiry regarding early DxeIplPeim loading. Thread-Index: AdQaNDyLZ2J/sHRiSC+kEdwPjgFgmQAVgqeAAAhusyA= Date: Fri, 13 Jul 2018 13:25:35 +0000 Message-ID: References: <0C09AFA07DD0434D9E2A0C6AEB0483103BB82A5E@shsmsx102.ccr.corp.intel.com> In-Reply-To: <0C09AFA07DD0434D9E2A0C6AEB0483103BB82A5E@shsmsx102.ccr.corp.intel.com> Accept-Language: de-DE, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:DA7638550B78C24546E01460FD3210ABAAE371F029FAA10D258F7A02A336E428; UpperCasedChecksum:52BE50C5A6B0140B2D16ACFDD6CC545D2EE5083918871DE68D623C795C7A18A2; SizeAsReceived:7248; Count:46 x-tmn: [gZ1v9Ne1WtDQ8NuVrah4Ym7alTTXAVz7] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; HE1EUR02HT039; 7:ufrTT7f98yEfp5T9GVTxfJggCYSGfoUAHdBOyxbVuJRXSZklyHDM0pSAEf1OEz0G7UuNV7cg8mE8746h8MuahwLu99JfIVyvYhnHvneay8/CfaZxtSdIj8ZYfKCfR2+h4yyP2vVTQdj5ecgwCdKuJLb/lsuOlV4ISEh+a9AW9u5TqZF7n7ZFLR08VuGmMOH0dBxl18CZcSkXh7QztHvn1vmEn9I7yo4cR3llRteBC07LdIxLMMBMfmhe2vkDnJ4j x-incomingheadercount: 46 x-eopattributedmessage: 0 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(201702061078)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031324274)(2017031323274)(2017031322404)(1603101448)(1601125500)(1701031045); SRVR:HE1EUR02HT039; x-ms-traffictypediagnostic: HE1EUR02HT039: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(82015058); SRVR:HE1EUR02HT039; BCL:0; PCL:0; RULEID:; SRVR:HE1EUR02HT039; x-forefront-prvs: 07326CFBC4 x-forefront-antispam-report: SFV:NSPM; SFS:(7070007)(189003)(199004)(13464003)(87572001)(102836004)(53546011)(81156014)(305945005)(33656002)(99286004)(7696005)(14444005)(486006)(76176011)(54906003)(74316002)(6916009)(68736007)(2501003)(5660300001)(105586002)(14454004)(72206003)(8676002)(56003)(966005)(6246003)(25786009)(4326008)(11346002)(476003)(446003)(97736004)(2351001)(426003)(2900100001)(8936002)(104016004)(106356001)(6346003)(229853002)(20460500001)(26005)(6436002)(256004)(5250100002)(86362001)(5640700003)(55016002)(575784001)(82202002)(6306002)(19627235001); DIR:OUT; SFP:1901; SCL:1; SRVR:HE1EUR02HT039; H:HE1PR0801MB1786.eurprd08.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:; received-spf: None (protection.outlook.com: outlook.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Marvin.Haeuser@outlook.com; x-microsoft-antispam-message-info: Kn45IVHkN3PTVAjBK8QolScqI0tQvLfmsFg2xRAjyu0AnJn3ofTEd1JdCrZcQB4KEIj7/uR/gljrvbcS2pTm9eDH+gsgu3kk95yipPRrD+S3vhC7CtgH2DPqfjJ7ySC5MFJZfgCFveFcLLBzQwreFHoUR29israHhxxZWeII3oUFAe07j2cZAjPvNeiMm/RdWuvIjFuUegut4/G3EJrn5j1RLk6El63Dost75OV/AY0= MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 7181d4b0-87d6-4f4e-ba33-0d3746212cec X-MS-Exchange-CrossTenant-Network-Message-Id: a2596d90-7b81-4162-56f3-08d5e8c41dad X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 7181d4b0-87d6-4f4e-ba33-0d3746212cec X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Jul 2018 13:25:35.1396 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1EUR02HT039 Subject: Re: Inquiry regarding early DxeIplPeim loading. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jul 2018 13:25:39 -0000 Content-Language: de-DE Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hey Star, Thank you very much for your reply. Interesting, that is basically the case I described as "insane" because I d= id not consider any platform to allow S3 resume without memory initializati= on. So, this code definitely makes sense. You are right, according to the specification, moving it to the PostMem FV = should be fine. However that will cost a shadow call and a re-entry for non= -S3 and an event registration for the S3 boot path. As the information whether S3 resume without meminit is intended is known a= t compile-time, what's your opinion on a FeatureFlag PCD which chooses betw= een direct calls and the shadow/event system? I would prepare a patch as soon as I can properly test its working, if you = are interested. The changes would be most minimal, I imagine. Thanks, Marvin. > -----Original Message----- > From: Zeng, Star > Sent: Friday, July 13, 2018 11:24 AM > To: Marvin H?user ; edk2- > devel@lists.01.org > Cc: Dong, Eric ; Cohen, Eugene ; > Gao, Liming ; Zeng, Star > Subject: RE: Inquiry regarding early DxeIplPeim loading. >=20 > Marvin, >=20 > You can check SHA-1: ebaafbe62c70309d0ceb44a0c4199093d0a823c4. > It is for the case "Allow S3 Resume without having installed permanent > memory (via InstallPeiMemory)" (PI Mantis 1532, you can search the > sentence in PI spec) requested by HP. > Yes before ebaafbe62c70309d0ceb44a0c4199093d0a823c4, DxeIpl.inf had > gEfiPeiMemoryDiscoveredPpiGuid DEPEX. > For the case you mentioned about MinPlatformPkg, I think you can put the > DxeIpl.inf into a Post Memory FV if the platform will publish > gEfiPeiMemoryDiscoveredPpiGuid indeed. >=20 >=20 > Thanks, > Star > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Marvin H?user > Sent: Friday, July 13, 2018 7:19 AM > To: edk2-devel@lists.01.org > Cc: Dong, Eric ; Zeng, Star > Subject: [edk2] Inquiry regarding early DxeIplPeim loading. >=20 > Good day developers, >=20 > While checking out which edk2 modules request being shadowed, I came > across DxeIplPeim being one of them, however I am not sure why it was > designed this way. >=20 > If the Boot Mode is !=3D S3, the module will register for shadowing and > immediately return during the pre-memory phase > https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Core/Dxe > IplPeim/DxeLoad.c#L92 > https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Core/Dxe > IplPeim/DxeLoad.c#L111 >=20 > If the Boot Mode is S3, the module will register a Memory Discovered even= t > to install crucial PPIs... > https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Core/Dxe > IplPeim/DxeLoad.c#L125 > ... and install the DxeIpl PPI before returning > https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Core/Dxe > IplPeim/DxeLoad.c#L132 >=20 > However, by design, the DxeIpl PPI is not located until the very end of > PeiCore, meaning the dispatcher ran out of modules to dispatch > https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Core/Pei/ > PeiMain/PeiMain.c#L467 > Hence installing the DxeIpl PPI early in the S3 boot path does not seem t= o > have any effect to me, as both paths are left awaiting memory availabilit= y > (Shadow / event). The only functional change would be PeiCore failing to > locate the DxeIpl PPI in case memory initialization silently fails and co= de > execution continues, which is an insane state in the first place. >=20 > Am I missing any scenario where this design is helpful? Is there any > disadvantage for adding a Depex on MemoryDiscovered PPI? Running only > after memory initialization would shrink the initialization function by > removing the shadowing request in non-S3 path and the event registration = in > the S3 path, as well as merging the PPI installation code as both registr= ations > end up executing the exact same code > https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Core/Dxe > IplPeim/DxeLoad.c#L118 > https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Core/Dxe > IplPeim/DxeLoad.c#L57 >=20 > The initialization function would collapse to PPI installations, a shadow= or > event registration call would be saved and platforms could safely embed > DxeIplPeim into a Post Memory FV, such as MinPlatformPkg is using, to hav= e > the PEIM loaded directly into memory to gain yet more performance. The > only restriction would be to prohibit compression. >=20 > Thanks for your time. >=20 > Best regards, > Marvin. > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel