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: af...@apple.com [mailto:af...@apple.com] > Sent: Saturday, August 13, 2016 4:47 AM > To: Marvin H?user <marvin.haeu...@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.haeu...@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 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel