From: Marvin H?user <Marvin.Haeuser@outlook.com>
To: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "afish@apple.com" <afish@apple.com>
Subject: Re: [MdeModulePkg/PeiCore] How is Data being NULL on entry ensured?
Date: Sat, 13 Aug 2016 02:53:08 +0000 [thread overview]
Message-ID: <VI1PR06MB17922DDACF940EA8F481BEAB80100@VI1PR06MB1792.eurprd06.prod.outlook.com> (raw)
In-Reply-To: <2E6F056D-46C2-4B3F-AC41-F4EE47D339C5@apple.com>
Hey Andrew,
Thank you very much! I suppose I was misguided by the ENTRY_POINT property being PeiCore in the build file.
Regards,
Marvin.
> -----Original Message-----
> From: afish@apple.com [mailto:afish@apple.com]
> Sent: Saturday, August 13, 2016 4:47 AM
> To: Marvin H?user <Marvin.Haeuser@outlook.com>
> Cc: edk2-devel@lists.01.org
> Subject: Re: [edk2] [MdeModulePkg/PeiCore] How is Data being NULL on
> entry ensured?
>
>
> > On Aug 12, 2016, at 7:01 PM, Marvin H?user
> <Marvin.Haeuser@outlook.com> wrote:
> >
> > Dear list subscribers,
> >
> > I have just been looking around the PeiCore code and wondered, how it is
> ensured, that the third ("Data") argument of the entry point is NULL on the
> first run.
> > EFI_PEI_CORE_ENTRY_POINT only has two arguments and hence most SEC
> implementations, including MdeModulePkg/SecCore, are going to pass only
> the first two arguments to the entry point.
> > I'm aware that the code works and I have never seen an occasion of it
> failing or seeming to fail because of this design, though I wondered, how is it
> assured, that the third argument, which is not part of the first call, is being
> NULL on entry and not some leftover on the temporary stack/in the
> argument 3 register?
> >
>
> Marvin,
>
> The code you are looking for is in the entry point library.
>
> https://github.com/tianocore/edk2/blob/master/MdePkg/Library/PeiCoreE
> ntryPoint/PeiCoreEntryPoint.c#L59
>
> **/
> VOID
> EFIAPI
> _ModuleEntryPoint(
> IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,
> IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList
> )
> {
> ProcessModuleEntryPointList (SecCoreData, PpiList, NULL);
>
> //
> // Should never return
> //
> ASSERT(FALSE);
> CpuDeadLoop ();
> }
>
>
> ProcessModuleEntryPointList() call is auto-generated and it will cal the entry
> point listed in the PEI Core INF file. So that is why it is hard to grep for.
>
> Thanks,
>
> Andrew Fish
>
> > Thank you for your time!
> >
> > Regards,
> > Marvin.
> > _______________________________________________
> > edk2-devel mailing list
> > edk2-devel@lists.01.org
> > https://lists.01.org/mailman/listinfo/edk2-devel
prev parent reply other threads:[~2016-08-13 2:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-13 2:01 [MdeModulePkg/PeiCore] How is Data being NULL on entry ensured? Marvin H?user
2016-08-13 2:47 ` Andrew Fish
2016-08-13 2:53 ` Marvin H?user [this message]
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=VI1PR06MB17922DDACF940EA8F481BEAB80100@VI1PR06MB1792.eurprd06.prod.outlook.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