From: eric_tian Date: Mon, 31 Aug 2009 02:39:56 +0000 (+0000) Subject: revert the change on BdsConsole. when doing minimal boot, the ConsoleIn variable... X-Git-Tag: edk2-stable201903~17112 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=a29a93b4bda3a7cb0a7152bb9888731dfbcf4db3;ds=sidebyside revert the change on BdsConsole. when doing minimal boot, the ConsoleIn variable is used to store existing input device's device path. If the device can not be connected, its device path will be removed from ConsoleIn. 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 --- diff --git a/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c b/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c index 42b0a23769..ab7879def1 100644 --- a/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c +++ b/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c @@ -361,16 +361,37 @@ BdsLibConnectConsoleVariable ( SetDevicePathEndNode (Next); // - // Connect the instance device path + // Check USB1.1 console // - Status = BdsLibConnectDevicePath (Instance); - if (EFI_ERROR (Status)) { + if ((DevicePathType (Instance) == MESSAGING_DEVICE_PATH) && + ((DevicePathSubType (Instance) == MSG_USB_CLASS_DP) + || (DevicePathSubType (Instance) == MSG_USB_WWID_DP) + )) { // - // Delete the instance from the console varialbe + // Check the Usb console in Usb2.0 bus firstly, then Usb1.1 bus // - BdsLibUpdateConsoleVariable (ConVarName, NULL, Instance); + Status = BdsLibConnectUsbDevByShortFormDP (PCI_IF_EHCI, Instance); + if (!EFI_ERROR (Status)) { + DeviceExist = TRUE; + } + + Status = BdsLibConnectUsbDevByShortFormDP (PCI_IF_UHCI, Instance); + if (!EFI_ERROR (Status)) { + DeviceExist = TRUE; + } } else { - DeviceExist = TRUE; + // + // Connect the instance device path + // + Status = BdsLibConnectDevicePath (Instance); + if (EFI_ERROR (Status)) { + // + // Delete the instance from the console varialbe + // + BdsLibUpdateConsoleVariable (ConVarName, NULL, Instance); + } else { + DeviceExist = TRUE; + } } FreePool(Instance); } while (CopyOfDevicePath != NULL);