audk/MdeModulePkg
Sean Rhodes ec25e904c7 MdeModulePkg/Bus/Pci/XhciDxe: Check port is compatible before getting PSIV
On some platforms, including Sky Lake and Kaby Lake, the PSIV (Protocol
Speed ID Value) indices are shared between Protocol Speed ID DWORD' in
the extended capabilities registers for both USB2 (Full Speed) and USB3
(Super Speed).

An example can be found below:

    XhcCheckUsbPortSpeedUsedPsic: checking for USB2 ext caps
    XhciPsivGetPsid: found 3 PSID entries
    XhciPsivGetPsid: looking for port speed 1
    XhciPsivGetPsid: PSIV 1 PSIE 2 PLT 0 PSIM 12
    XhciPsivGetPsid: PSIV 2 PSIE 1 PLT 0 PSIM 1500
    XhciPsivGetPsid: PSIV 3 PSIE 2 PLT 0 PSIM 480
    XhcCheckUsbPortSpeedUsedPsic: checking for USB3 ext caps
    XhciPsivGetPsid: found 3 PSID entries
    XhciPsivGetPsid: looking for port speed 1
    XhciPsivGetPsid: PSIV 1 PSIE 3 PLT 0 PSIM 5
    XhciPsivGetPsid: PSIV 2 PSIE 3 PLT 0 PSIM 10
    XhciPsivGetPsid: PSIV 34 PSIE 2 PLT 0 PSIM 1248

The result is edk2 detecting USB2 devices as USB3 devices, which
consequently causes enumeration to fail.

To avoid incorrect detection, check the Compatible Port Offset to find
the starting Port of Root Hubs that support the protocol.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
2022-12-21 00:46:58 +00:00
..
Application MdeModulePkg/DumpDynPcd: Remove unsupported format specifiers 2022-08-17 07:45:58 +00:00
Bus MdeModulePkg/Bus/Pci/XhciDxe: Check port is compatible before getting PSIV 2022-12-21 00:46:58 +00:00
Core MdeModulePkg/DxeCore: Use correct type for alignment mask 2022-12-08 18:09:48 +00:00
Include MdePkg: Add UEFI Unaccepted memory definition 2022-11-01 10:08:10 +00:00
Library MdeModulePkg/UefiBootManagerLib: Add Disk Info support for Ufs 2022-10-06 17:38:41 +00:00
Logo MdeModulePkg/Logo: Add LoongArch64 architecture. 2022-10-14 02:16:33 +00:00
Test MdeModulePkg/UefiSortLib:Add UefiSortLib unit test 2021-08-12 08:34:04 +00:00
Universal MdeModulePkg: Supporting S3 in 64bit PEI 2022-12-19 06:12:56 +00:00
MdeModulePkg.ci.yaml MdeModulePkg: Update YAML to ignore specific ECC files/errors 2021-11-30 14:19:07 +00:00
MdeModulePkg.dec MdeModulePkg: Disable PciDegrade support for LoongArch64 2022-12-01 02:52:14 +00:00
MdeModulePkg.dsc MdeModulePkg: Use LockBoxNullLib for LOONGARCH64 2022-10-14 02:16:33 +00:00
MdeModulePkg.uni MdeModulePkg: Use configurable PCD for AHCI command retries 2022-09-13 02:51:27 +00:00
MdeModulePkgExtra.uni MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00