MdePkg/Usb: Add BOS Descriptor to support SuperSpeed Devices

[Suggested Solution]
Add the BOS descriptor structure and definition.

Signed-off-by: Marlboro Chuang <marlboro.chuang@dell.com>
Signed-off-by: Jared Pan <jared.pan@dell.com>
This commit is contained in:
Jared Pan 2026-07-13 16:10:14 +08:00 committed by mergify[bot]
parent bcd168735f
commit ea275a48fa
2 changed files with 29 additions and 0 deletions

View file

@ -117,6 +117,24 @@ typedef struct {
UINT8 NumConfigurations;
} USB_DEVICE_DESCRIPTOR;
///
/// Binary Device Object Store (BOS)
/// USB 3.0 spec, Section 9.6.2
///
typedef struct {
UINT8 Length;
UINT8 DescriptorType;
UINT16 TotalLength;
UINT8 NumDeviceCaps;
} USB_BOS_DESCRIPTOR;
typedef struct {
UINT8 Length;
UINT8 DescriptorType;
UINT8 DevCapabilityType;
UINT8 CapData[1];
} USB_DEV_CAP_DESCRIPTOR;
///
/// Standard Configuration Descriptor
/// USB 2.0 spec, Section 9.6.3
@ -229,11 +247,20 @@ typedef enum {
USB_DESC_TYPE_INTERFACE = 0x04,
USB_DESC_TYPE_ENDPOINT = 0x05,
USB_DESC_TYPE_INTERFACE_ASSOCIATION = 0x0b,
USB_DESC_TYPE_BOS = 0x0f,
USB_DESC_TYPE_DEV_CAP = 0x10,
USB_DESC_TYPE_HID = 0x21,
USB_DESC_TYPE_REPORT = 0x22,
USB_DESC_TYPE_CS_INTERFACE = 0x24,
USB_DESC_TYPE_CS_ENDPOINT = 0x25,
//
// Device Capability Type Codes
//
USB_DEV_CAP_WIRELESS_USB = 0x01,
USB_DEV_CAP_USB20_EXTENSION = 0x02,
USB_DEV_CAP_SUPPERSPEED_USB = 0x03,
//
// Features to be cleared by CLEAR_FEATURE requests
//

View file

@ -34,6 +34,8 @@ typedef struct _EFI_USB_IO_PROTOCOL EFI_USB_IO_PROTOCOL;
typedef USB_DEVICE_REQUEST EFI_USB_DEVICE_REQUEST;
typedef USB_DEVICE_DESCRIPTOR EFI_USB_DEVICE_DESCRIPTOR;
typedef USB_CONFIG_DESCRIPTOR EFI_USB_CONFIG_DESCRIPTOR;
typedef USB_BOS_DESCRIPTOR EFI_USB_BOS_DESCRIPTOR;
typedef USB_DEV_CAP_DESCRIPTOR EFI_USB_DEV_CAP_DESCRIPTOR;
typedef USB_INTERFACE_DESCRIPTOR EFI_USB_INTERFACE_DESCRIPTOR;
typedef USB_ENDPOINT_DESCRIPTOR EFI_USB_ENDPOINT_DESCRIPTOR;