audk/MdeModulePkg
Ruiyu Ni 5c9ac43f47 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>
2018-09-12 10:12:05 +08:00
..
Application MdeModulePkg: Removing ipf which is no longer supported from edk2. 2018-09-06 15:25:16 +08:00
Bus MdeModulePkg/EhciDxe: factor out EhcIsDebugPortInUse() 2018-09-06 14:07:50 +02:00
Core MdeModulePkg/DxeIpl: disable paging before creating new page table 2018-09-10 09:28:26 +08:00
Include MdeModulePkg: Removing ipf which is no longer supported from edk2. 2018-09-06 15:25:16 +08:00
Library MdeModulePkg: Removing ipf which is no longer supported from edk2. 2018-09-06 15:25:16 +08:00
Logo MdeModulePkg: Removing ipf which is no longer supported from edk2. 2018-09-06 15:25:16 +08:00
Universal MdeModulePkg/ConPlatform: Support short-form USB device path 2018-09-12 10:12:05 +08:00
MdeModulePkg.dec MdeModulePkg/MdeModulePkg.dec: add new settings for PCDs 2018-08-30 07:22:29 +08:00
MdeModulePkg.dsc MdeModulePkg: Removing ipf which is no longer supported from edk2. 2018-09-06 15:25:16 +08:00
MdeModulePkg.uni MdeModulePkg/Variable/RuntimeDxe: introduce PcdMaxVolatileVariableSize 2018-03-30 21:17:07 +02:00
MdeModulePkgExtra.uni MdeModulePkg: Clean up source files 2018-06-28 11:19:45 +08:00