mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH v3 0/5] Add support for USB-EFI devices in EFI Playload
@ 2026-08-20 14:34 Fabian Pflug
  2026-08-20 14:34 ` [PATCH v3 1/5] efi: usb: add header for usb-efi Fabian Pflug
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Fabian Pflug @ 2026-08-20 14:34 UTC (permalink / raw)
  To: Sascha Hauer, Ahmad Fatoum, BAREBOX; +Cc: Fabian Pflug

When running as EFI payload, barebox does not have control over the USB
bus, but instead the BIOS will have enumerated and set up devices.

The UEFI will also expose an API to access the devices, with one handle
per USB interface.
This driver will create an USB-Host per device and initialize the device
and pass it onto barebox for driver initialization, allowing all
usb-devices to be used.

This might lead to problems where USB-Storage is handled as an USB
device as well as UEFI Block IO Storage, therefore it is not added to
efi_defconfig by default.

Signed-off-by: Fabian Pflug <f.pflug@pengutronix.de>
---
Changes in v3:
- integrate review feedback from Ahmad
 - predeclared header instead of including linux/usb/usb.h
 - change return type when EFI_USB_ERR_STALL
 - use goto in function on error instead of return. (Missed that...)
 - lang table size of 0 is now not an error.
 - failure in setting string descriptors are no errors.
 - set host-hw-dev
 - remove USB_HOST from Kconfig
- Link to v2: https://lore.barebox.org/barebox/20260817-v2026-06-0-topic-efi_usb-v2-0-3d45c1782ccc@pengutronix.de

Changes in v2:
- fixed wrong type in header for get_string_descriptor
- add missing free to string buffer
- use 16bit data type for string buffer
- include the first byte of string buffer
- renamed num_langs to table_size and made usage clearer
- Link to v1: https://lore.barebox.org/barebox/20260812-v2026-06-0-topic-efi_usb-v1-0-9d2573c29f21@pengutronix.de

---
Fabian Pflug (5):
      efi: usb: add header for usb-efi
      usb: core: make usb_set_maxpacket_ep public
      drivers: usb: host: efi: add efi io driver
      efi: guid: add guid for usb host controller 2
      test: x86: add test for uefi usb io

 drivers/usb/core/usb.c             |  12 +-
 drivers/usb/core/usb.h             |   2 +
 drivers/usb/host/Kconfig           |  10 ++
 drivers/usb/host/Makefile          |   1 +
 drivers/usb/host/efi-io-protocol.c | 322 +++++++++++++++++++++++++++++++++++++
 efi/guid.c                         |   2 +
 include/efi/guid.h                 |   4 +
 include/efi/protocol/usb.h         |  71 ++++++++
 test/x86/pc@efi_defconfig.yaml     |   9 +-
 9 files changed, 422 insertions(+), 11 deletions(-)
---
base-commit: 87f49b49fdd06c0de492bd2c1cd6b8c93e393029
change-id: 20260812-v2026-06-0-topic-efi_usb-2eb7641b6b60

Best regards,
-- 
Fabian Pflug <f.pflug@pengutronix.de>




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-08-20 14:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-20 14:34 [PATCH v3 0/5] Add support for USB-EFI devices in EFI Playload Fabian Pflug
2026-08-20 14:34 ` [PATCH v3 1/5] efi: usb: add header for usb-efi Fabian Pflug
2026-08-20 14:34 ` [PATCH v3 2/5] usb: core: make usb_set_maxpacket_ep public Fabian Pflug
2026-08-20 14:34 ` [PATCH v3 3/5] drivers: usb: host: efi: add efi io driver Fabian Pflug
2026-08-20 14:34 ` [PATCH v3 4/5] efi: guid: add guid for usb host controller 2 Fabian Pflug
2026-08-20 14:34 ` [PATCH v3 5/5] test: x86: add test for uefi usb io Fabian Pflug

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox