From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id B55BBAC1AB4 for ; Mon, 10 Feb 2025 17:01:54 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=lr9Y3rUOt2n8iqdpNh6HvldS825ghT08G+NcIzx9RjY=; c=relaxed/simple; d=groups.io; h=MIME-Version:From:Date:Message-ID:Subject:To:Cc:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type; s=20240830; t=1739206914; v=1; x=1739466113; b=gn6iuEXit9RB+E3noPqL68GutC1NvTEryh9u7JZfH6g2jaeYnS2a46cs0zV/lnzi/QEadaYt upNl3MHoy/JIzZQnmJgnm6Z/PjoGPb6Pfg3zh32G9pmCLqO4TATTX71nckIBgWZNaSGsZWYU3xg YgWNVkm6ZvKB97mYLkX9RH6BynpRHezZ4MKuFUxV721NmBFT/Fz/2LYlAjQC+jf3chjOXMeRML6 frN403r75dZ9VO3D4WjtHNO2qpOaBaxiQtwvRtdmjmh7YcjW2uUyGcgWdMc9OLxkmSM994KJ3Gr y4IlQcrBDSKSeT8ZBVpcaQ3Dyuj4kxjsKSXeCq3wAb/LA== X-Received: by 127.0.0.2 with SMTP id 6ROaYY7687511x7uUN1g6TmJ; Mon, 10 Feb 2025 09:01:53 -0800 X-Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by mx.groups.io with SMTP id smtpd.web11.56765.1739206912225039880 for ; Mon, 10 Feb 2025 09:01:52 -0800 X-Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 51A9eMJo023309 for ; Mon, 10 Feb 2025 17:01:52 GMT X-Received: from mail-yb1-f197.google.com (mail-yb1-f197.google.com [209.85.219.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 44p0dqd3mn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Mon, 10 Feb 2025 17:01:51 +0000 (GMT) X-Received: by mail-yb1-f197.google.com with SMTP id 3f1490d57ef6-e5789a8458eso6601720276.2 for ; Mon, 10 Feb 2025 09:01:51 -0800 (PST) X-Gm-Message-State: r9ktBhzsL8cGNoD7KeQbO9sZx7686176AA= X-Gm-Gg: ASbGncu77f/iYTGTXZfVElBZwluBiFx9FPIzSdYXAC3XejNOe+xfIYaFUMZNgXbSt33 0h7jwzG3SDJjzBCfv1WOBTGAJ9qTsPFuG845iKNHZ4bEz4h0cpSzt/Kr4RKBED7obVrTPGkKQ5A /RFje5MSbQFbV6XPMINeE= X-Received: by 2002:a05:6902:230f:b0:e57:90b7:e37d with SMTP id 3f1490d57ef6-e5b4625a76dmr11386553276.33.1739206910393; Mon, 10 Feb 2025 09:01:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IGqZ7znUSPbAIRlCHmw4OoU8BLgvDS6xr4DY+pZvofsruXu0/L1Cw2GOTPY3AeNYEVAxaw99r4VcRhAKGo524s= X-Received: by 2002:a05:6902:230f:b0:e57:90b7:e37d with SMTP id 3f1490d57ef6-e5b4625a76dmr11386503276.33.1739206909897; Mon, 10 Feb 2025 09:01:49 -0800 (PST) MIME-Version: 1.0 From: "Leif Lindholm via groups.io" Date: Mon, 10 Feb 2025 17:01:39 +0000 X-Gm-Features: AWEUYZklLgdkNGiofAt_rOhORzscrZb8ui8GCEB6q-927yJ-fj4zXwF85hdbmI4 Message-ID: Subject: [edk2-devel] Various confusing bits around USB host controller protocols To: devel@edk2.groups.io Cc: "Kinney, Michael D" , Liming Gao , Ray Ni , Ard Biesheuvel X-Proofpoint-GUID: gzfGHMi3rdMUDseHgNdUv5mgvb4avc1h X-Proofpoint-ORIG-GUID: gzfGHMi3rdMUDseHgNdUv5mgvb4avc1h Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Mon, 10 Feb 2025 09:01:52 -0800 Resent-From: leif.lindholm@oss.qualcomm.com Reply-To: devel@edk2.groups.io,leif.lindholm@oss.qualcomm.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Type: text/plain; charset="UTF-8" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240830 header.b=gn6iuEXi; dmarc=pass (policy=none) header.from=groups.io; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io 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] -=-=-=-=-=-=-=-=-=-=-=-