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 
10 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
11 FILE_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 */
24  struct usb_function *func;
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 */
42  struct list_head list;
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 */
64  struct usb_endpoint ep;
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 */
uint16_t * lang
Supported languages.
Definition: efi_usb.h:28
unsigned short uint16_t
Definition: stdint.h:11
size_t lang_len
Length of supported languages.
Definition: efi_usb.h:30
unsigned int alternate
Alternate setting.
Definition: efi_usb.h:47
EFI driver interface.
char name[32]
Name.
Definition: efi_usb.h:38
struct usb_function * func
The underlying USB function.
Definition: efi_usb.h:24
Definition: efi.h:63
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
const char * name
Name.
Definition: efi_usb.h:22
EFI_DEVICE_PATH_PROTOCOL * path
Device path.
Definition: efi_usb.h:53
The EFI_USB_IO_PROTOCOL provides four basic transfers types described in the USB 1....
Definition: UsbIo.h:479
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 efi_usb_endpoint * endpoint[32]
Opened endpoints.
Definition: efi_usb.h:56
A doubly-linked list entry (or list head)
Definition: list.h:19
A USB endpoint.
Definition: usb.h:404
An EFI USB device interface.
Definition: efi_usb.h:36
EFI_EVENT event
Asynchronous timer event.
Definition: efi_usb.h:70
FILE_SECBOOT(PERMITTED)
int rc
Most recent synchronous completion status.
Definition: efi_usb.h:67
void * context
Asynchronous callback context.
Definition: efi_usb.h:74
struct list_head interfaces
List of interfaces.
Definition: efi_usb.h:32
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
Linked lists.
unsigned int interface
Interface number.
Definition: efi_usb.h:45
An EFI USB device endpoint.
Definition: efi_usb.h:60
struct usb_configuration_descriptor * config
Configuration descriptor.
Definition: efi_usb.h:26
struct usb_endpoint ep
USB endpoint.
Definition: efi_usb.h:64
EFI API.
EFI Usb I/O Protocol as defined in UEFI specification.
EFI_USB_IO_PROTOCOL usbio
USB I/O protocol.
Definition: efi_usb.h:51
A USB configuration descriptor.
Definition: usb.h:210
struct list_head list
List of interfaces.
Definition: efi_usb.h:42
Universal Serial Bus (USB)
EFI_HANDLE handle
EFI handle.
Definition: efi_usb.h:49
A USB function.
Definition: usb.h:674
struct efi_usb_device * usbdev
Containing USB device.
Definition: efi_usb.h:40
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
Definition: efi.h:62