From: "Zeng, Star" <star.zeng@intel.com>
To: Marvin H?user <Marvin.Haeuser@outlook.com>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Dong, Eric" <eric.dong@intel.com>,
"Cohen, Eugene" <eugene@hp.com>,
"Gao, Liming" <liming.gao@intel.com>,
"Zeng, Star" <star.zeng@intel.com>
Subject: Re: Inquiry regarding early DxeIplPeim loading.
Date: Fri, 13 Jul 2018 09:24:18 +0000 [thread overview]
Message-ID: <0C09AFA07DD0434D9E2A0C6AEB0483103BB82A5E@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <VI1PR0801MB1790CBB5596007710220DB2380590@VI1PR0801MB1790.eurprd08.prod.outlook.com>
Marvin,
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.
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 <eric.dong@intel.com>; Zeng, Star <star.zeng@intel.com>
Subject: [edk2] Inquiry regarding early DxeIplPeim loading.
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 this way.
If the Boot Mode is != S3, the module will register for shadowing and immediately 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 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 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 locate the DxeIpl PPI in case memory initialization silently fails and code execution continues, which is an insane state in the first place.
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 registrations end up executing 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 or event registration call would be saved and platforms could safely embed DxeIplPeim into a Post Memory FV, such as MinPlatformPkg is using, to have the 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.
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
next prev parent reply other threads:[~2018-07-13 9:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-12 23:19 Inquiry regarding early DxeIplPeim loading Marvin H?user
2018-07-13 9:24 ` Zeng, Star [this message]
2018-07-13 13:25 ` Marvin H?user
2018-07-18 9:11 ` Zeng, Star
2018-07-18 21:36 ` Cohen, Eugene
2018-07-19 0:10 ` Marvin H?user
2018-07-19 15:40 ` Cohen, Eugene
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0C09AFA07DD0434D9E2A0C6AEB0483103BB82A5E@shsmsx102.ccr.corp.intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox