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>
3 files changed
tree: 05b4728c239a70a3182d16b9455608262bb444a7
  1. AppPkg/
  2. ArmPkg/
  3. ArmPlatformPkg/
  4. ArmVirtPkg/
  5. BaseTools/
  6. BeagleBoardPkg/
  7. Conf/
  8. CorebootModulePkg/
  9. CorebootPayloadPkg/
  10. CryptoPkg/
  11. DuetPkg/
  12. EdkCompatibilityPkg/
  13. EdkShellBinPkg/
  14. EdkShellPkg/
  15. EmbeddedPkg/
  16. EmulatorPkg/
  17. FatBinPkg/
  18. FatPkg/
  19. FmpDevicePkg/
  20. IntelFrameworkModulePkg/
  21. IntelFrameworkPkg/
  22. IntelFsp2Pkg/
  23. IntelFsp2WrapperPkg/
  24. IntelFspPkg/
  25. IntelFspWrapperPkg/
  26. IntelSiliconPkg/
  27. MdeModulePkg/
  28. MdePkg/
  29. NetworkPkg/
  30. Nt32Pkg/
  31. Omap35xxPkg/
  32. OptionRomPkg/
  33. OvmfPkg/
  34. PcAtChipsetPkg/
  35. QuarkPlatformPkg/
  36. QuarkSocPkg/
  37. SecurityPkg/
  38. ShellBinPkg/
  39. ShellPkg/
  40. SignedCapsulePkg/
  41. SourceLevelDebugPkg/
  42. StandaloneMmPkg/
  43. StdLib/
  44. StdLibPrivateInternalFiles/
  45. UefiCpuPkg/
  46. UnixPkg/
  47. Vlv2DeviceRefCodePkg/
  48. Vlv2TbltDevicePkg/
  49. .gitignore
  50. .gitmodules
  51. BuildNotes2.txt
  52. Contributions.txt
  53. edksetup.bat
  54. edksetup.sh
  55. License.txt
  56. Maintainers.txt
  57. Readme.md
Readme.md

EDK II Project

A modern, feature-rich, cross-platform firmware development environment for the UEFI and PI specifications from www.uefi.org.

Contributions to the EDK II open source project are covered by the TianoCore Contribution Agreement 1.1

The majority of the content in the EDK II open source project uses a BSD 2-Clause License. The EDK II open source project contains the following components that are covered by additional licenses:

The EDK II Project is composed of packages. The maintainers for each package are listed in Maintainers.txt.

Resources