Eugene: This PCD is for PeiCore and PEIM, not for DxeCore. I agree to update PeiCore to check FileType first, then apply this PCD.
Thanks Liming -----Original Message----- From: edk2-devel [mailto:[email protected]] On Behalf Of Cohen, Eugene Sent: Friday, February 05, 2016 10:30 PM To: [email protected]; Gao, Liming Subject: [edk2] PeiCore Image.c: PcdShadowPeimOnBoot affects DXE Core IPL 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 _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

