From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=40.92.70.91; helo=eur03-am5-obe.outbound.protection.outlook.com; envelope-from=marvin.haeuser@outlook.com; receiver=edk2-devel@lists.01.org Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-oln040092070091.outbound.protection.outlook.com [40.92.70.91]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 99AF52097E27C for ; Thu, 12 Jul 2018 16:19:26 -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=ZsiFV/JQtWnfrwr8TKoPelH3+k5spKx3ozdKGWe9q/Q=; b=FAAKQ+UwNKlwoh74h3YIbL6v1dSi592BjYYm79zTCUFWbi9Tc66KXt+GeDsAkPdmWH9UzZD67tB1f+o2c9kQuuQSgGoP0DN9VhzY1h+jIxQENO8ejJQ3Wa3sukLlkr18xgocyX5pVYmQtdghu+/Ab7yi9fvawyDzfqLxAoqYupakuHVor/FHQL1cIxLNgoLwZj15BsTgRCx/kPW/Zri7+p93pCLyhNZ/JmolAi/AthSM41eFKkrbI55R6imuKRDkQn6wP26ep5r5ujRTzCA6U+JhhG9OG6ZOJBy93p8WBD6rp1Z+a9yrDdNhnIY8u/vuKIpJ5DYzNdiZjj43QF5Qjw== Received: from VE1EUR03FT049.eop-EUR03.prod.protection.outlook.com (10.152.18.59) by VE1EUR03HT033.eop-EUR03.prod.protection.outlook.com (10.152.19.98) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.930.16; Thu, 12 Jul 2018 23:19:24 +0000 Received: from VI1PR0801MB1790.eurprd08.prod.outlook.com (10.152.18.53) by VE1EUR03FT049.mail.protection.outlook.com (10.152.19.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.20.930.16 via Frontend Transport; Thu, 12 Jul 2018 23:19:24 +0000 Received: from VI1PR0801MB1790.eurprd08.prod.outlook.com ([fe80::b1af:9cda:38b1:ee81]) by VI1PR0801MB1790.eurprd08.prod.outlook.com ([fe80::b1af:9cda:38b1:ee81%9]) with mapi id 15.20.0930.022; Thu, 12 Jul 2018 23:19:24 +0000 From: Marvin H?user To: "edk2-devel@lists.01.org" CC: "star.zeng@intel.com" , "eric.dong@intel.com" Thread-Topic: Inquiry regarding early DxeIplPeim loading. Thread-Index: AdQaNDyLZ2J/sHRiSC+kEdwPjgFgmQ== Date: Thu, 12 Jul 2018 23:19:23 +0000 Message-ID: Accept-Language: de-DE, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:3D9E0CEBAD9827635559912CB5A590D3F12EDDEFFE25404395ED31BEC782B21E; UpperCasedChecksum:065FBEB790ABABD13111F4E97AC01D173DA5B2A64F11AB09F4D7CAEC1FC30B4E; SizeAsReceived:7073; Count:44 x-tmn: [8luFwD73WrkqxuRkAYmr+86UMRQi7a3N] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VE1EUR03HT033; 7:8djxlOiQo9tXeLUlsFDtZDezBt7XEzHUeMPWLn113mxQggeMUxGrbxjabreYWRaSOXwYgpwTjGV5jXOAONclmpi0MymGd6HaOp9oG5npx1vntWmFzzj7RcfAVmVHYpU2VKCsDOj5P9pReRL8wdb5WcmkeZLD1fYjEk3dMszSNTSiXZ+9Zp+Gcb/dcg11F7WqLRUW/eV0cntyvQb/KpIC/It+Y044gk0M8EcfwH6yxbQaYuusFxCzKWpmRWlDo9+E x-incomingheadercount: 44 x-eopattributedmessage: 0 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(201702061078)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031324274)(2017031323274)(2017031322404)(1601125500)(1603101448)(1701031045); SRVR:VE1EUR03HT033; x-ms-traffictypediagnostic: VE1EUR03HT033: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(82015058); SRVR:VE1EUR03HT033; BCL:0; PCL:0; RULEID:; SRVR:VE1EUR03HT033; x-forefront-prvs: 0731AA2DE6 x-forefront-antispam-report: SFV:NSPM; SFS:(7070007)(199004)(189003)(82202002)(2900100001)(6436002)(25786009)(236005)(6346003)(72206003)(4326008)(5660300001)(8936002)(54896002)(102836004)(6306002)(33656002)(99286004)(20460500001)(55016002)(5640700003)(14444005)(56003)(68736007)(966005)(790700001)(426003)(2501003)(256004)(7696005)(8676002)(74316002)(476003)(104016004)(97736004)(2351001)(106356001)(606006)(86362001)(6916009)(26005)(105586002)(87572001)(54906003)(81156014)(486006)(14454004)(5250100002)(19627235001); DIR:OUT; SFP:1901; SCL:1; SRVR:VE1EUR03HT033; H:VI1PR0801MB1790.eurprd08.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX: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: 8UivlCNyUglQg8+FCVFW2MUu545xB1Yml0MWPAK9EoFw9xopO+Oh1YOqb5pvYFbYgT7p9cfFZgGdaiDfXRLnB2iSrnpx7TmupzvQrElSYiOwN5NrWnLEEHNsElBDzk+Bv5LIAq9v4IWjilTgxKOeqmkRi8kryyLQq2jse7V6SCafq5uBPfNt5Jc+P9DITlclZx7EsUCZPpapJPVoMmWLXJaKyNFgTWLbS6X0kl46rfM= 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: 59c7d9ed-8d13-40d4-61b5-08d5e84de7d0 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 7181d4b0-87d6-4f4e-ba33-0d3746212cec X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Jul 2018 23:19:24.0631 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1EUR03HT033 X-Content-Filtered-By: Mailman/MimeDel 2.1.27 Subject: 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: Thu, 12 Jul 2018 23:19:27 -0000 Content-Language: de-DE Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Good day developers, 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 th= is way. If the Boot Mode is !=3D S3, the module will register for shadowing and imm= ediately return during the pre-memory phase https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Core/DxeIplPeim/= DxeLoad.c#L92 https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Core/DxeIplPeim/= DxeLoad.c#L111 If the Boot Mode is S3, the module will register a Memory Discovered event = to install crucial PPIs... https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Core/DxeIplPeim/= DxeLoad.c#L125 ... and install the DxeIpl PPI before returning https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Core/DxeIplPeim/= DxeLoad.c#L132 However, by design, the DxeIpl PPI is not located until the very end of Pei= Core, 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 to = have any effect to me, as both paths are left awaiting memory availability = (Shadow / event). The only functional change would be PeiCore failing to lo= cate the DxeIpl PPI in case memory initialization silently fails and code e= xecution continues, which is an insane state in the first place. Am I missing any scenario where this design is helpful? Is there any disadv= antage for adding a Depex on MemoryDiscovered PPI? Running only after memor= y initialization would shrink the initialization function by removing the s= hadowing request in non-S3 path and the event registration in the S3 path, = as well as merging the PPI installation code as both registrations end up e= xecuting the exact same code https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Core/DxeIplPeim/= DxeLoad.c#L118 https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Core/DxeIplPeim/= DxeLoad.c#L57 The initialization function would collapse to PPI installations, a shadow o= r event registration call would be saved and platforms could safely embed D= xeIplPeim into a Post Memory FV, such as MinPlatformPkg is using, to have t= he PEIM loaded directly into memory to gain yet more performance. The only = restriction would be to prohibit compression. Thanks for your time. Best regards, Marvin.