summaryrefslogtreecommitdiff
path: root/IntelFrameworkModulePkg/Csm/LegacyBiosDxe
diff options
context:
space:
mode:
authorli-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524>2013-04-12 07:34:27 +0000
committerli-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524>2013-04-12 07:34:27 +0000
commit007f932de64bf2b67f63b1656134120dc3856339 (patch)
tree6036588c8ef3552354ae6d4808afab423637a97f /IntelFrameworkModulePkg/Csm/LegacyBiosDxe
parent2d34b53ec303427a9d3966781029c58908421674 (diff)
downloadedk2-platforms-007f932de64bf2b67f63b1656134120dc3856339.tar.xz
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
Diffstat (limited to 'IntelFrameworkModulePkg/Csm/LegacyBiosDxe')
-rw-r--r--IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyPci.c2
1 files changed, 1 insertions, 1 deletions
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;
}