]> git.proxmox.com Git - mirror_edk2.git/commitdiff
revert the change on BdsConsole. when doing minimal boot, the ConsoleIn variable...
authoreric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 31 Aug 2009 02:39:56 +0000 (02:39 +0000)
committereric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 31 Aug 2009 02:39:56 +0000 (02:39 +0000)
So due the usb hot plug feature, we should always connect USB host controller according to the consolein device provided by PlatformData file before entering frontpage. This way can avoid usb device can not work in frontpage phase.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9207 6f19259b-4bc3-4df7-8a09-765794883524

IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c

index 42b0a23769e40ac694c54c31a6b1a3ad0d77918c..ab7879def1fd01205ff7a9c40c2904ce5884dd46 100644 (file)
@@ -361,16 +361,37 @@ BdsLibConnectConsoleVariable (
 \r
     SetDevicePathEndNode (Next);\r
     //\r
-    // Connect the instance device path\r
+    // Check USB1.1 console\r
     //\r
-    Status = BdsLibConnectDevicePath (Instance);\r
-    if (EFI_ERROR (Status)) {\r
+    if ((DevicePathType (Instance) == MESSAGING_DEVICE_PATH) &&\r
+       ((DevicePathSubType (Instance) == MSG_USB_CLASS_DP)\r
+       || (DevicePathSubType (Instance) == MSG_USB_WWID_DP)\r
+       )) {\r
       //\r
-      // Delete the instance from the console varialbe\r
+      // Check the Usb console in Usb2.0 bus firstly, then Usb1.1 bus\r
       //\r
-      BdsLibUpdateConsoleVariable (ConVarName, NULL, Instance);\r
+      Status = BdsLibConnectUsbDevByShortFormDP (PCI_IF_EHCI, Instance);\r
+      if (!EFI_ERROR (Status)) {\r
+        DeviceExist = TRUE;\r
+      }\r
+\r
+      Status = BdsLibConnectUsbDevByShortFormDP (PCI_IF_UHCI, Instance);\r
+      if (!EFI_ERROR (Status)) {\r
+        DeviceExist = TRUE;\r
+      }\r
     } else {\r
-      DeviceExist = TRUE;\r
+      //\r
+      // Connect the instance device path\r
+      //\r
+      Status = BdsLibConnectDevicePath (Instance);\r
+      if (EFI_ERROR (Status)) {\r
+        //\r
+        // Delete the instance from the console varialbe\r
+        //\r
+        BdsLibUpdateConsoleVariable (ConVarName, NULL, Instance);\r
+      } else {\r
+        DeviceExist = TRUE;\r
+      }\r
     }\r
     FreePool(Instance);\r
   } while (CopyOfDevicePath != NULL);\r