From: "Leif Lindholm via groups.io" <leif.lindholm=oss.qualcomm.com@groups.io>
To: devel@edk2.groups.io
Cc: "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>
Subject: [edk2-devel] Various confusing bits around USB host controller protocols
Date: Mon, 10 Feb 2025 17:01:39 +0000 [thread overview]
Message-ID: <CAD=n3R1gaqzgmws9aCDM5FBFk18kFgN91qbGE5hKVK3uAS-SUw@mail.gmail.com> (raw)
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]
-=-=-=-=-=-=-=-=-=-=-=-
next reply other threads:[~2025-02-10 17:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-10 17:01 Leif Lindholm via groups.io [this message]
2025-02-11 4:16 ` 回复: [edk2-devel] Various confusing bits around USB host controller protocols gaoliming via groups.io
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAD=n3R1gaqzgmws9aCDM5FBFk18kFgN91qbGE5hKVK3uAS-SUw@mail.gmail.com' \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox