Spotted while looking into https://github.com/tianocore/edk2/pull/10593
This starts with https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Include/Ppi/Usb2HostController.h#L244, which states that PEI_USB2_HOST_CONTROLLER_PPI is modelled after EFI_USB2_HOST_CONTROLLER_PROTOCOL as described by UEFI 2.3. The problem is that 1) UEFI 2.3 does not describe any EFI_USB2_HOST_CONTROLLER_PROTOCOL (it describes a EFI_USB2_HC_PROTOCOL, which thankfully is what edk2 uses elsewhere). 2) EFI_USB2_HC_PROTOCOL does not contain a GetRootHubPortNumber(). 3) The specification still references GetRootHubPortNumber() in three locations. 4) https://github.com/tianocore/edk2/blob/master/MdePkg/Include/Protocol/UsbHostController.h#L464 defines a EFI_USB_HC_PROTOCOL that is not described by the UEFI specification version 2.0 or later. As far as I can tell there is one clear errata in the UEFI speficiation: the references to GetRootHubPortNumber(). Which presumably should be updated to reflect that the information should be retrieved from GetCapability() instead (which UsbBusDxe does). Are there any other implications? But that leaves the support for the extra-spec EFI_USB_HC_PROTOCOL. Why is it still there, in UsbBusDxe, and is anyone actually using it? Relying on it? Could we delete it? Deprecate it? I don't know what if anything should be done about the PEI_USB*_HOST_CONTROLLER_PPI structs, but the comments describing them are actively misleading and should be updated *somehow*. / Leif -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#121114): https://edk2.groups.io/g/devel/message/121114 Mute This Topic: https://groups.io/mt/111105835/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-