MdeModulePkg/DxeCore: Allow relocation of images with large address
Add PCD to control if modules with start addresses in PE/COFF > 0x100000 attempt to load at specified address. If a module has an address in this range and there is untested memory DxeCore will attempt to promote all memory to tested which bypasses any memory testing that would occur later in boot. There are several existing AARCH64 option roms that have base addresses of 0x180000000. Signed-off-by: Jeff Brasen <jbrasen@nvidia.com> Reviewed-by: Ashish Singhal <ashishsingha@nvidia.com> Message-Id: <bd36c9c24158590db2226ede05cb8c2f50c93a37.1684194452.git.jbrasen@nvidia.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
This commit is contained in:
committed by
mergify[bot]
parent
a671a14e63
commit
aa8431822b
@@ -680,7 +680,9 @@ CoreLoadPeImage (
|
||||
);
|
||||
}
|
||||
} else {
|
||||
if ((Image->ImageContext.ImageAddress >= 0x100000) || Image->ImageContext.RelocationsStripped) {
|
||||
if ((PcdGetBool (PcdImageLargeAddressLoad) && ((Image->ImageContext.ImageAddress) >= 0x100000)) ||
|
||||
Image->ImageContext.RelocationsStripped)
|
||||
{
|
||||
Status = CoreAllocatePages (
|
||||
AllocateAddress,
|
||||
(EFI_MEMORY_TYPE)(Image->ImageContext.ImageCodeMemoryType),
|
||||
|
Reference in New Issue
Block a user