mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
Handle the case when OpROM wants to completely remove itself.
Signed-off-by: Ruiyu Ni<ruiyu.ni@intel.com> Reviewed-by: Elvin Li<elvin.li@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13736 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
a9c12422ff
commit
7f446eba26
@ -2536,7 +2536,16 @@ LegacyBiosInstallRom (
|
||||
//
|
||||
// The ROM could have updated it's size so we need to read again.
|
||||
//
|
||||
*RuntimeImageLength = ((EFI_LEGACY_EXPANSION_ROM_HEADER *) (RuntimeAddress))->Size512 * 512;
|
||||
if ((((EFI_LEGACY_EXPANSION_ROM_HEADER *) RuntimeAddress)->Signature != PCI_EXPANSION_ROM_HEADER_SIGNATURE) &&
|
||||
(((EFI_LEGACY_EXPANSION_ROM_HEADER *) InitAddress)->Size512 == 0)) {
|
||||
//
|
||||
// The INIT function didn't copy the RUNTIME code to RuntimeAddress
|
||||
//
|
||||
*RuntimeImageLength = 0;
|
||||
} else {
|
||||
*RuntimeImageLength = ((EFI_LEGACY_EXPANSION_ROM_HEADER *) RuntimeAddress)->Size512 * 512;
|
||||
}
|
||||
|
||||
DEBUG ((EFI_D_INFO, " fsize = %x\n", *RuntimeImageLength));
|
||||
|
||||
//
|
||||
|
Loading…
x
Reference in New Issue
Block a user