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:
li-elvin 2013-04-12 07:34:27 +00:00
parent 2d34b53ec3
commit 007f932de6
1 changed files with 1 additions and 1 deletions

View File

@ -2942,7 +2942,7 @@ LegacyBiosInstallPciRom (
Pcir = (PCI_3_0_DATA_STRUCTURE *)
((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;
return EFI_UNSUPPORTED;
}