summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.h
diff options
context:
space:
mode:
authorRuiyu Ni <ruiyu.ni@intel.com>2018-04-11 11:37:08 +0800
committerRuiyu Ni <ruiyu.ni@intel.com>2018-09-12 10:12:05 +0800
commit5c9ac43f47865bb9b13608fd7ae1d39ab73ef397 (patch)
tree05b4728c239a70a3182d16b9455608262bb444a7 /MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.h
parent1ad635b283812283e8db457ba4809d5d38433f17 (diff)
downloadedk2-5c9ac43f47865bb9b13608fd7ae1d39ab73ef397.tar.gz
edk2-5c9ac43f47865bb9b13608fd7ae1d39ab73ef397.tar.bz2
edk2-5c9ac43f47865bb9b13608fd7ae1d39ab73ef397.zip
MdeModulePkg/ConPlatform: Support short-form USB device path
Today's implementation does an exact device path match to check whether the device path of a console is in ConIn/ConOut/ErrOut. But that doesn't work for the USB keyboard. Because when a platform have multiple USB port, ConIn needs to carry all device paths corresponding to each port. Even worse, today's BDS core logic removes the device path from ConIn/ConOut/ErrOut when the connection to that device path fails. So if user switches the USB keyboard from one port to another across boot, the USB keyboard doesn't work in the second boot. ConPlatform driver solved this problem by adding the IsHotPlugDevice() function. So that for USB keyboard, ConPlatform doesn't care whether its device path is in ConIn or not. But the rule is too loose, and now causes platform BDS cannot control whether to enable USB keyboard as an active console. The patch changes ConPlatform to support USB short-form device path when checking whether the device path of a console is in ConIn/ConOut/ErrOut. The logic to always accept USB/PCCARD device as active console is removed. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
Diffstat (limited to 'MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.h')
-rw-r--r--MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.h24
1 files changed, 3 insertions, 21 deletions
diff --git a/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.h b/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.h
index 1d5f11e94c..b5465f09f1 100644
--- a/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.h
+++ b/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.h
@@ -21,6 +21,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Protocol/DevicePath.h>
#include <Protocol/SimpleTextIn.h>
#include <Protocol/PciIo.h>
+#include <Protocol/UsbIo.h>
#include <Protocol/GraphicsOutput.h>
#include <Guid/GlobalVariable.h>
@@ -119,8 +120,7 @@ ConPlatformTextOutDriverBindingSupported (
Start this driver on ControllerHandle by opening Simple Text Input Protocol,
reading Device Path, and installing Console In Devcice GUID on ControllerHandle.
- If this devcie is not one hot-plug devce, append its device path into the
- console environment variables ConInDev.
+ Append its device path into the console environment variables ConInDev.
@param This Protocol instance pointer.
@param ControllerHandle Handle of device to bind driver to
@@ -147,8 +147,7 @@ ConPlatformTextInDriverBindingStart (
reading Device Path, and installing Console Out Devcic GUID, Standard Error
Device GUID on ControllerHandle.
- If this devcie is not one hot-plug devce, append its device path into the
- console environment variables ConOutDev, StdErrDev.
+ Append its device path into the console environment variables ConOutDev, ErrOutDev.
@param This Protocol instance pointer.
@param ControllerHandle Handle of device to bind driver to
@@ -294,23 +293,6 @@ ConPlatformUpdateDeviceVariable (
IN CONPLATFORM_VAR_OPERATION Operation
);
-/**
- Check if the device supports hot-plug through its device path.
-
- This function could be updated to check more types of Hot Plug devices.
- Currently, it checks USB and PCCard device.
-
- @param DevicePath Pointer to device's device path.
-
- @retval TRUE The devcie is a hot-plug device
- @retval FALSE The devcie is not a hot-plug device.
-
-**/
-BOOLEAN
-IsHotPlugDevice (
- IN EFI_DEVICE_PATH_PROTOCOL *DevicePath
- );
-
//
// EFI Component Name Functions
//