summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorli-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524>2013-05-09 08:47:09 +0000
committerli-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524>2013-05-09 08:47:09 +0000
commitee65c5083b836d881d2724496e5353b0f3b1f252 (patch)
treea6f99564a8cba3a4fa55a96f28a74e0c3c14d50b
parent30a95d4d39214084f435acbc1534cb111dda3095 (diff)
downloadedk2-ee65c5083b836d881d2724496e5353b0f3b1f252.zip
edk2-ee65c5083b836d881d2724496e5353b0f3b1f252.tar.gz
edk2-ee65c5083b836d881d2724496e5353b0f3b1f252.tar.bz2
Check if video device exists before trying to install Video OpROM.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14335 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyPci.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyPci.c b/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyPci.c
index 62d0fee..fd5641a 100644
--- a/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyPci.c
+++ b/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyPci.c
@@ -2914,7 +2914,15 @@ LegacyBiosInstallPciRom (
return EFI_UNSUPPORTED;
}
- if (!Private->VgaInstalled) {
+ Status = Private->LegacyBiosPlatform->GetPlatformHandle (
+ Private->LegacyBiosPlatform,
+ EfiGetPlatformVgaHandle,
+ 0,
+ &HandleBuffer,
+ &HandleCount,
+ NULL
+ );
+ if ((!EFI_ERROR (Status)) && (!Private->VgaInstalled)) {
//
// A return status of EFI_NOT_FOUND is considered valid (No EFI
// driver is controlling video.