]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Call LegacyBiosInstallVgaRom to shadow Legacy VBIOS instead of LegacyBiosInstallPciRo...
authorli-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 15 Mar 2013 01:34:21 +0000 (01:34 +0000)
committerli-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 15 Mar 2013 01:34:21 +0000 (01:34 +0000)
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@14205 6f19259b-4bc3-4df7-8a09-765794883524

IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBiosInterface.h
IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyPci.c

index a63a7257def2685594c54274dc9474a653e2bf8e..d60851a42cff65f82fc075d0d58306ff0f094f4c 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
 /** @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
 \r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions\r
@@ -1520,4 +1520,20 @@ InternalLegacyBiosFarCall (
   IN  UINTN                           StackSize\r
   );\r
 \r
   IN  UINTN                           StackSize\r
   );\r
 \r
+/**\r
+  Load a legacy PC-AT OpROM for VGA controller.\r
+\r
+  @param  Private                Driver private data.\r
+\r
+  @retval EFI_SUCCESS            Legacy ROM successfully installed for this device.\r
+  @retval EFI_DEVICE_ERROR       No VGA device handle found, or native EFI video\r
+                                 driver cannot be successfully disconnected, or VGA\r
+                                 thunk driver cannot be successfully connected.\r
+\r
+**/\r
+EFI_STATUS\r
+LegacyBiosInstallVgaRom (\r
+  IN  LEGACY_BIOS_INSTANCE            *Private\r
+  );\r
+\r
 #endif\r
 #endif\r
index 910ed41b37911773d2d84e35e274b8c0c70abaf3..5b1117eb1b42ad03d2f0b32f5d9889638391ca14 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
 /** @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
 \r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions\r
@@ -1715,6 +1715,20 @@ PciShadowRoms (
     if (!EFI_ERROR (Status)) {\r
       continue;\r
     }\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
     //\r
     // Install legacy ROM\r
     //\r