audk/MdeModulePkg/Bus/Pci
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
..
EhciDxe MdeModulePkg: Put USB DEBUGs that occur for bulk timeouts under VERBOSE 2022-12-08 02:58:24 +00:00
EhciPei MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
IdeBusPei MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
IncompatiblePciDeviceSupportDxe MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
NonDiscoverablePciDeviceDxe MdeModulePkg/NonDiscoverablePciDeviceDxe: Allow partial FreeBuffer 2022-10-01 10:44:30 +00:00
NvmExpressDxe MdeModulePkg/NvmExpressDxe: fix check for Cap.Css 2022-03-25 00:59:04 +00:00
NvmExpressPei MdeModulePkg: Fix imbalanced debug macros 2022-09-09 01:42:39 +00:00
PciBusDxe Fix bug on SRIOV ReservedBusNum when ARI enable. 2022-10-14 07:07:01 +00:00
PciHostBridgeDxe MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PciSioSerialDxe MdeModulePkg: Fix spelling error in PciSioSerialDxe 2022-10-25 22:30:33 +00:00
SataControllerDxe MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
SdMmcPciHcDxe MdeModulePkg: SdMmcPciHcDxe: Fix issue that SD1.0 cards can't be recognized 2022-12-12 02:43:33 +00:00
SdMmcPciHcPei MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
UfsPciHcDxe MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
UfsPciHcPei MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
UhciDxe MdeModulePkg/Bus/Pci/UhciDxe: Fix the UsbHc memory allocate and free issue 2021-12-09 02:36:30 +00:00
UhciPei MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
XhciDxe MdeModulePkg/Bus/Pci/XhciDxe: Check port is compatible before getting PSIV 2022-12-21 00:46:58 +00:00
XhciPei MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00