mirror of https://github.com/acidanthera/audk.git
Add OpROM code type check to ensure OpROM is PCAT legacy OpROM when an OpROM is passed to InstallPciRom.
Signed-off-by: Li Elvin <elvin.li@intel.com> Reviewed-by: Ni Ruiyu <ruiyu.ni@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14260 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
2d34b53ec3
commit
007f932de6
|
@ -2942,7 +2942,7 @@ LegacyBiosInstallPciRom (
|
||||||
Pcir = (PCI_3_0_DATA_STRUCTURE *)
|
Pcir = (PCI_3_0_DATA_STRUCTURE *)
|
||||||
((UINT8 *) LocalRomImage + ((PCI_EXPANSION_ROM_HEADER *) LocalRomImage)->PcirOffset);
|
((UINT8 *) LocalRomImage + ((PCI_EXPANSION_ROM_HEADER *) LocalRomImage)->PcirOffset);
|
||||||
|
|
||||||
if (Pcir->Signature != PCI_DATA_STRUCTURE_SIGNATURE) {
|
if ((Pcir->Signature != PCI_DATA_STRUCTURE_SIGNATURE) || (Pcir->CodeType != PCI_CODE_TYPE_PCAT_IMAGE)) {
|
||||||
mVgaInstallationInProgress = FALSE;
|
mVgaInstallationInProgress = FALSE;
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue