iPXE
efi_usb.h
Go to the documentation of this file.
1#ifndef _IPXE_EFI_USB_H
2#define _IPXE_EFI_USB_H
3
4/** @file
5 *
6 * USB I/O protocol
7 *
8 */
9
10FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
11FILE_SECBOOT ( PERMITTED );
12
13#include <ipxe/list.h>
14#include <ipxe/efi/efi.h>
15#include <ipxe/efi/efi_driver.h>
17#include <ipxe/usb.h>
18
19/** An EFI USB device */
21 /** Name */
22 const char *name;
23 /** The underlying USB function */
25 /** Configuration descriptor */
27 /** Supported languages */
29 /** Length of supported languages */
30 size_t lang_len;
31 /** List of interfaces */
33};
34
35/** An EFI USB device interface */
37 /** Name */
38 char name[32];
39 /** Containing USB device */
41 /** List of interfaces */
43
44 /** Interface number */
45 unsigned int interface;
46 /** Alternate setting */
47 unsigned int alternate;
48 /** EFI handle */
50 /** USB I/O protocol */
52 /** Device path */
54
55 /** Opened endpoints */
57};
58
59/** An EFI USB device endpoint */
61 /** EFI USB device interface */
63 /** USB endpoint */
65
66 /** Most recent synchronous completion status */
67 int rc;
68
69 /** Asynchronous timer event */
71 /** Asynchronous callback handler */
73 /** Asynchronous callback context */
74 void *context;
75};
76
77/** Asynchronous transfer fill level
78 *
79 * This is a policy decision.
80 */
81#define EFI_USB_ASYNC_FILL 2
82
83#endif /* _IPXE_EFI_USB_H */
EFI Usb I/O Protocol as defined in UEFI specification.
struct _EFI_USB_IO_PROTOCOL EFI_USB_IO_PROTOCOL
Definition UsbIo.h:29
EFI_STATUS(EFIAPI * EFI_ASYNC_USB_TRANSFER_CALLBACK)(IN VOID *Data, IN UINTN DataLength, IN VOID *Context, IN UINT32 Status)
Async USB transfer callback routine.
Definition UsbIo.h:83
unsigned short uint16_t
Definition stdint.h:11
EFI driver interface.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:896
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
Definition compiler.h:926
EFI API.
#define EFI_HANDLE
Definition efi.h:53
#define EFI_EVENT
Definition efi.h:54
Universal Serial Bus (USB)
Linked lists.
This protocol can be used on any device handle to obtain generic path/location information concerning...
Definition DevicePath.h:46
An EFI USB device.
Definition efi_usb.h:20
struct list_head interfaces
List of interfaces.
Definition efi_usb.h:32
struct usb_function * func
The underlying USB function.
Definition efi_usb.h:24
size_t lang_len
Length of supported languages.
Definition efi_usb.h:30
uint16_t * lang
Supported languages.
Definition efi_usb.h:28
const char * name
Name.
Definition efi_usb.h:22
struct usb_configuration_descriptor * config
Configuration descriptor.
Definition efi_usb.h:26
An EFI USB device endpoint.
Definition efi_usb.h:60
EFI_EVENT event
Asynchronous timer event.
Definition efi_usb.h:70
struct efi_usb_interface * usbintf
EFI USB device interface.
Definition efi_usb.h:62
EFI_ASYNC_USB_TRANSFER_CALLBACK callback
Asynchronous callback handler.
Definition efi_usb.h:72
void * context
Asynchronous callback context.
Definition efi_usb.h:74
int rc
Most recent synchronous completion status.
Definition efi_usb.h:67
struct usb_endpoint ep
USB endpoint.
Definition efi_usb.h:64
An EFI USB device interface.
Definition efi_usb.h:36
EFI_DEVICE_PATH_PROTOCOL * path
Device path.
Definition efi_usb.h:53
unsigned int alternate
Alternate setting.
Definition efi_usb.h:47
struct efi_usb_device * usbdev
Containing USB device.
Definition efi_usb.h:40
struct efi_usb_endpoint * endpoint[32]
Opened endpoints.
Definition efi_usb.h:56
EFI_HANDLE handle
EFI handle.
Definition efi_usb.h:49
EFI_USB_IO_PROTOCOL usbio
USB I/O protocol.
Definition efi_usb.h:51
struct list_head list
List of interfaces.
Definition efi_usb.h:42
unsigned int interface
Interface number.
Definition efi_usb.h:45
char name[32]
Name.
Definition efi_usb.h:38
A doubly-linked list entry (or list head)
Definition list.h:19
A USB configuration descriptor.
Definition usb.h:210
A USB endpoint.
Definition usb.h:404
A USB function.
Definition usb.h:674