/** @file\r
\r
-Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions\r
if (!EFI_ERROR (Status)) {\r
continue;\r
}\r
+ \r
+ //\r
+ // If legacy VBIOS Oprom has not been dispatched before, install legacy VBIOS here.\r
+ //\r
+ if (IS_PCI_DISPLAY (&Pci) && Index == 0) { \r
+ Status = LegacyBiosInstallVgaRom (Private);\r
+ //\r
+ // A return status of EFI_NOT_FOUND is considered valid (No EFI\r
+ // driver is controlling video).\r
+ //\r
+ ASSERT ((Status == EFI_SUCCESS) || (Status == EFI_NOT_FOUND));\r
+ continue;\r
+ }\r
+\r
//\r
// Install legacy ROM\r
//\r
return EFI_UNSUPPORTED;\r
}\r
\r
- if (!Private->VgaInstalled) {\r
+ Status = Private->LegacyBiosPlatform->GetPlatformHandle (\r
+ Private->LegacyBiosPlatform,\r
+ EfiGetPlatformVgaHandle,\r
+ 0,\r
+ &HandleBuffer,\r
+ &HandleCount,\r
+ NULL\r
+ );\r
+ if ((!EFI_ERROR (Status)) && (!Private->VgaInstalled)) {\r
//\r
// A return status of EFI_NOT_FOUND is considered valid (No EFI\r
// driver is controlling video.\r
Pcir = (PCI_3_0_DATA_STRUCTURE *)\r
((UINT8 *) LocalRomImage + ((PCI_EXPANSION_ROM_HEADER *) LocalRomImage)->PcirOffset);\r
\r
- if (Pcir->Signature != PCI_DATA_STRUCTURE_SIGNATURE) {\r
+ if ((Pcir->Signature != PCI_DATA_STRUCTURE_SIGNATURE) || (Pcir->CodeType != PCI_CODE_TYPE_PCAT_IMAGE)) {\r
mVgaInstallationInProgress = FALSE;\r
return EFI_UNSUPPORTED;\r
}\r