diff options
author | eric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-08-31 02:39:56 +0000 |
---|---|---|
committer | eric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-08-31 02:39:56 +0000 |
commit | a29a93b4bda3a7cb0a7152bb9888731dfbcf4db3 (patch) | |
tree | 4f2981c66902195348cc34bb4efa346a19215391 /IntelFrameworkModulePkg | |
parent | ea4220e3e9ab0f352bb7b22ad14a685a1fcdb454 (diff) | |
download | edk2-platforms-a29a93b4bda3a7cb0a7152bb9888731dfbcf4db3.tar.xz |
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
Diffstat (limited to 'IntelFrameworkModulePkg')
-rw-r--r-- | IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c | 33 |
1 files changed, 27 insertions, 6 deletions
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);
|