Hi All, based on Chapter 11, PEI Physical Memory Usage, in the PI spec, I think that any PEIM that wants to call BuildMemoryAllocationHob() must make sure that it runs on permanent PEI RAM.
In other words, it seems like BuildMemoryAllocationHob() is restricted to PEI code that runs after permanent PEI RAM installation. One way a PEIM can conform to this requirement is apparently a Depex on gEfiPeiMemoryDiscoveredPpiGuid. Questions: - Is BuildMemoryAllocationHob() in fact restricted this way? - If so, is a gEfiPeiMemoryDiscoveredPpiGuid Depex a good way to comply with this restriction in a PEIM (that doesn't itself install the permanent PEI RAM)? In practice, this question has no consequences for OvmfPkg, because there we already conform to the (apparent) requirement, and we ensure the ordering simply by installing the permanent PEI RAM in the *same* PEIM that later on calls BuildMemoryAllocationHob(). However, in ArmPlatformPkg/AArch64VirtualizationPkg, we might call BuildMemoryAllocationHob() in a PEIM that is *separate* from the PEIM that installs the permantent PEI RAM. Hence I think that this dependency should be spelled out explicitly in the dependent PEIM's depex. Thanks! Laszlo ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ _______________________________________________ edk2-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/edk2-devel
