From 007f932de64bf2b67f63b1656134120dc3856339 Mon Sep 17 00:00:00 2001 From: li-elvin Date: Fri, 12 Apr 2013 07:34:27 +0000 Subject: Add OpROM code type check to ensure OpROM is PCAT legacy OpROM when an OpROM is passed to InstallPciRom. Signed-off-by: Li Elvin Reviewed-by: Ni Ruiyu git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14260 6f19259b-4bc3-4df7-8a09-765794883524 --- IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyPci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'IntelFrameworkModulePkg') diff --git a/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyPci.c b/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyPci.c index 5b1117eb1b..62d0feed3c 100644 --- a/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyPci.c +++ b/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyPci.c @@ -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; } -- cgit v1.2.3