Use PCD for PMM size and EndOpromShadowAddress to remove hard code value in CSM module.
Signed-off-by: li-elvin Reviewed-by: jyao1 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12519 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -2301,7 +2301,7 @@ LegacyBiosInstallRom (
|
||||
// then test if there is enough space for its RT code
|
||||
//
|
||||
RuntimeAddress = Private->OptionRom;
|
||||
if (RuntimeAddress + *RuntimeImageLength > mEndOpromShadowAddress) {
|
||||
if (RuntimeAddress + *RuntimeImageLength > PcdGet32 (PcdEndOpromShadowAddress)) {
|
||||
DEBUG ((EFI_D_ERROR, "return LegacyBiosInstallRom(%d): EFI_OUT_OF_RESOURCES (no more space for OpROM)\n", __LINE__));
|
||||
gBS->FreePages (PhysicalAddress, EFI_SIZE_TO_PAGES (ImageSize));
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
@@ -2312,7 +2312,7 @@ LegacyBiosInstallRom (
|
||||
// test if there is enough space for its INIT code
|
||||
//
|
||||
InitAddress = PCI_START_ADDRESS (Private->OptionRom);
|
||||
if (InitAddress + ImageSize > mEndOpromShadowAddress) {
|
||||
if (InitAddress + ImageSize > PcdGet32 (PcdEndOpromShadowAddress)) {
|
||||
DEBUG ((EFI_D_ERROR, "return LegacyBiosInstallRom(%d): EFI_OUT_OF_RESOURCES (no more space for OpROM)\n", __LINE__));
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
Reference in New Issue
Block a user