In the PEI Core's image loading area, there is some logic that decides whether
an image should be loaded into allocated memory or left in place:
// Allocate Memory for the image when memory is ready, and image is
relocatable.
// On normal boot, PcdShadowPeimOnBoot decides whether load PEIM or PeiCore
into memory.
// On S3 boot, PcdShadowPeimOnS3Boot decides whether load PEIM or PeiCore
into memory.
//
if ((!ImageContext.RelocationsStripped) && (Private->PeiMemoryInstalled) && (
(!IsS3Boot && (PcdGetBool (PcdShadowPeimOnBoot) || IsRegisterForShadow))
|| (IsS3Boot && PcdGetBool (PcdShadowPeimOnS3Boot)))) {
This works great for PEIMs - when PcdShadowPeimOnBoot is FALSE they are not
copied to memory and execute from their original locations.
However, I'm seeing that when DxeIpl is trying to load the DXE Core into memory
that when PcdShadowPeimOnBoot is false the DXE Core also doesn't get copied to
memory (and crashes because the PE alignment is not being respected and this
module was never intended to be XIP). Since this PCD's name states that this
should apply to PEIMs I'm thinking this is not the intended behavior.
We need some way to apply the policy so we can differentiate real PEIMs (and
the PEI Core) from the DXE Core and other image types.
Any suggestions for how to correct this PCD behavior would be appreciated.
Thanks,
Eugene
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel