* [edk2-devel] Various confusing bits around USB host controller protocols
@ 2025-02-10 17:01 Leif Lindholm via groups.io
2025-02-11 4:16 ` 回复: " gaoliming via groups.io
0 siblings, 1 reply; 2+ messages in thread
From: Leif Lindholm via groups.io @ 2025-02-10 17:01 UTC (permalink / raw)
To: devel; +Cc: Kinney, Michael D, Liming Gao, Ray Ni, Ard Biesheuvel
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/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 2+ messages in thread
* 回复: [edk2-devel] Various confusing bits around USB host controller protocols
2025-02-10 17:01 [edk2-devel] Various confusing bits around USB host controller protocols Leif Lindholm via groups.io
@ 2025-02-11 4:16 ` gaoliming via groups.io
0 siblings, 0 replies; 2+ messages in thread
From: gaoliming via groups.io @ 2025-02-11 4:16 UTC (permalink / raw)
To: devel, leif.lindholm
Cc: 'Kinney, Michael D', 'Ray Ni',
'Ard Biesheuvel'
Lefi:
EFI_USB_HC_PROTOCOL is defined in EFI 1.10. I think it can be deprecated. At least, its consumer code in UsbBusDxe should be removed.
Thanks
Liming
> -----邮件原件-----
> 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Leif Lindholm
> via groups.io
> 发送时间: 2025年2月11日 1:02
> 收件人: devel@edk2.groups.io
> 抄送: Kinney, Michael D <michael.d.kinney@intel.com>; Liming Gao
> <gaoliming@byosoft.com.cn>; Ray Ni <ray.ni@intel.com>; Ard Biesheuvel
> <ardb+tianocore@kernel.org>
> 主题: [edk2-devel] Various confusing bits around USB host controller
> protocols
>
> 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/U
> sbHostController.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 (#121115): https://edk2.groups.io/g/devel/message/121115
Mute This Topic: https://groups.io/mt/111116998/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-02-11 4:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-10 17:01 [edk2-devel] Various confusing bits around USB host controller protocols Leif Lindholm via groups.io
2025-02-11 4:16 ` 回复: " gaoliming via groups.io
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox