TianoCore EDK2 master
|
#include "Uhci.h"
Go to the source code of this file.
Functions | |
EFI_STATUS EFIAPI | Uhci2Reset (IN EFI_USB2_HC_PROTOCOL *This, IN UINT16 Attributes) |
EFI_STATUS EFIAPI | Uhci2GetState (IN EFI_USB2_HC_PROTOCOL *This, OUT EFI_USB_HC_STATE *State) |
EFI_STATUS EFIAPI | Uhci2SetState (IN EFI_USB2_HC_PROTOCOL *This, IN EFI_USB_HC_STATE State) |
EFI_STATUS EFIAPI | Uhci2GetCapability (IN EFI_USB2_HC_PROTOCOL *This, OUT UINT8 *MaxSpeed, OUT UINT8 *PortNumber, OUT UINT8 *Is64BitCapable) |
EFI_STATUS EFIAPI | Uhci2GetRootHubPortStatus (IN EFI_USB2_HC_PROTOCOL *This, IN UINT8 PortNumber, OUT EFI_USB_PORT_STATUS *PortStatus) |
EFI_STATUS EFIAPI | Uhci2SetRootHubPortFeature (IN EFI_USB2_HC_PROTOCOL *This, IN UINT8 PortNumber, IN EFI_USB_PORT_FEATURE PortFeature) |
EFI_STATUS EFIAPI | Uhci2ClearRootHubPortFeature (IN EFI_USB2_HC_PROTOCOL *This, IN UINT8 PortNumber, IN EFI_USB_PORT_FEATURE PortFeature) |
EFI_STATUS EFIAPI | Uhci2ControlTransfer (IN EFI_USB2_HC_PROTOCOL *This, IN UINT8 DeviceAddress, IN UINT8 DeviceSpeed, IN UINTN MaximumPacketLength, IN EFI_USB_DEVICE_REQUEST *Request, IN EFI_USB_DATA_DIRECTION TransferDirection, IN OUT VOID *Data, IN OUT UINTN *DataLength, IN UINTN TimeOut, IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator, OUT UINT32 *TransferResult) |
EFI_STATUS EFIAPI | Uhci2BulkTransfer (IN EFI_USB2_HC_PROTOCOL *This, IN UINT8 DeviceAddress, IN UINT8 EndPointAddress, IN UINT8 DeviceSpeed, IN UINTN MaximumPacketLength, IN UINT8 DataBuffersNumber, IN OUT VOID *Data[EFI_USB_MAX_BULK_BUFFER_NUM], IN OUT UINTN *DataLength, IN OUT UINT8 *DataToggle, IN UINTN TimeOut, IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator, OUT UINT32 *TransferResult) |
EFI_STATUS EFIAPI | Uhci2AsyncInterruptTransfer (IN EFI_USB2_HC_PROTOCOL *This, IN UINT8 DeviceAddress, IN UINT8 EndPointAddress, IN UINT8 DeviceSpeed, IN UINTN MaximumPacketLength, IN BOOLEAN IsNewTransfer, IN OUT UINT8 *DataToggle, IN UINTN PollingInterval, IN UINTN DataLength, IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator, IN EFI_ASYNC_USB_TRANSFER_CALLBACK CallBackFunction, IN VOID *Context) |
EFI_STATUS EFIAPI | Uhci2SyncInterruptTransfer (IN EFI_USB2_HC_PROTOCOL *This, IN UINT8 DeviceAddress, IN UINT8 EndPointAddress, IN UINT8 DeviceSpeed, IN UINTN MaximumPacketLength, IN OUT VOID *Data, IN OUT UINTN *DataLength, IN OUT UINT8 *DataToggle, IN UINTN TimeOut, IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator, OUT UINT32 *TransferResult) |
EFI_STATUS EFIAPI | Uhci2IsochronousTransfer (IN EFI_USB2_HC_PROTOCOL *This, IN UINT8 DeviceAddress, IN UINT8 EndPointAddress, IN UINT8 DeviceSpeed, IN UINTN MaximumPacketLength, IN UINT8 DataBuffersNumber, IN OUT VOID *Data[EFI_USB_MAX_ISO_BUFFER_NUM], IN UINTN DataLength, IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator, OUT UINT32 *TransferResult) |
EFI_STATUS EFIAPI | Uhci2AsyncIsochronousTransfer (IN EFI_USB2_HC_PROTOCOL *This, IN UINT8 DeviceAddress, IN UINT8 EndPointAddress, IN UINT8 DeviceSpeed, IN UINTN MaximumPacketLength, IN UINT8 DataBuffersNumber, IN OUT VOID *Data[EFI_USB_MAX_ISO_BUFFER_NUM], IN UINTN DataLength, IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator, IN EFI_ASYNC_USB_TRANSFER_CALLBACK IsochronousCallBack, IN VOID *Context) |
EFI_STATUS EFIAPI | UhciDriverEntryPoint (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable) |
EFI_STATUS EFIAPI | UhciDriverBindingSupported (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath) |
USB_HC_DEV * | UhciAllocateDev (IN EFI_PCI_IO_PROTOCOL *PciIo, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, IN UINT64 OriginalPciAttributes) |
VOID | UhciFreeDev (IN USB_HC_DEV *Uhc) |
VOID | UhciCleanDevUp (IN EFI_HANDLE Controller, IN EFI_USB2_HC_PROTOCOL *This) |
VOID EFIAPI | UhcExitBootService (EFI_EVENT Event, VOID *Context) |
EFI_STATUS EFIAPI | UhciDriverBindingStart (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath) |
EFI_STATUS EFIAPI | UhciDriverBindingStop (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer) |
Variables | |
EFI_DRIVER_BINDING_PROTOCOL | gUhciDriverBinding |
The UHCI driver model and HC protocol routines.
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file Uhci.c.
VOID EFIAPI UhcExitBootService | ( | EFI_EVENT | Event, |
VOID * | Context | ||
) |
EFI_STATUS EFIAPI Uhci2AsyncInterruptTransfer | ( | IN EFI_USB2_HC_PROTOCOL * | This, |
IN UINT8 | DeviceAddress, | ||
IN UINT8 | EndPointAddress, | ||
IN UINT8 | DeviceSpeed, | ||
IN UINTN | MaximumPacketLength, | ||
IN BOOLEAN | IsNewTransfer, | ||
IN OUT UINT8 * | DataToggle, | ||
IN UINTN | PollingInterval, | ||
IN UINTN | DataLength, | ||
IN EFI_USB2_HC_TRANSACTION_TRANSLATOR * | Translator, | ||
IN EFI_ASYNC_USB_TRANSFER_CALLBACK | CallBackFunction, | ||
IN VOID * | Context | ||
) |
Submits an asynchronous interrupt transfer to an interrupt endpoint of a USB device according to UEFI 2.0 spec.
This | A pointer to the EFI_USB2_HC_PROTOCOL instance. |
DeviceAddress | Target device address. |
EndPointAddress | Endpoint number and direction. |
DeviceSpeed | Device speed. |
MaximumPacketLength | Maximum packet size of the target endpoint. |
IsNewTransfer | If TRUE, submit a new transfer, if FALSE cancel old transfer. |
DataToggle | On input, data toggle to use; On output, next data toggle. |
PollingInterval | Interrupt poll rate in milliseconds. |
DataLength | On input, size of the data buffer, On output, actually transferred data size. |
Translator | A pointr to the transaction translator data. |
CallBackFunction | Function to call periodically. |
Context | User context. |
EFI_STATUS EFIAPI Uhci2AsyncIsochronousTransfer | ( | IN EFI_USB2_HC_PROTOCOL * | This, |
IN UINT8 | DeviceAddress, | ||
IN UINT8 | EndPointAddress, | ||
IN UINT8 | DeviceSpeed, | ||
IN UINTN | MaximumPacketLength, | ||
IN UINT8 | DataBuffersNumber, | ||
IN OUT VOID * | Data[EFI_USB_MAX_ISO_BUFFER_NUM], | ||
IN UINTN | DataLength, | ||
IN EFI_USB2_HC_TRANSACTION_TRANSLATOR * | Translator, | ||
IN EFI_ASYNC_USB_TRANSFER_CALLBACK | IsochronousCallBack, | ||
IN VOID * | Context | ||
) |
Submits Async isochronous transfer to a target USB device according to UEFI 2.0 spec.
This | A pointer to the EFI_USB2_HC_PROTOCOL instance. |
DeviceAddress | Target device address. |
EndPointAddress | Endpoint number and direction. |
DeviceSpeed | Device speed. |
MaximumPacketLength | Maximum packet size of the target endpoint. |
DataBuffersNumber | Number of data buffers prepared for the transfer. |
Data | Array of pointers to the buffers of data. |
DataLength | On input, size of the data buffer, On output, actually transferred data size. |
Translator | A pointr to the transaction translator data. |
IsochronousCallBack | Function to call when the transfer complete. |
Context | Pass to the call back function as parameter. |
EFI_STATUS EFIAPI Uhci2BulkTransfer | ( | IN EFI_USB2_HC_PROTOCOL * | This, |
IN UINT8 | DeviceAddress, | ||
IN UINT8 | EndPointAddress, | ||
IN UINT8 | DeviceSpeed, | ||
IN UINTN | MaximumPacketLength, | ||
IN UINT8 | DataBuffersNumber, | ||
IN OUT VOID * | Data[EFI_USB_MAX_BULK_BUFFER_NUM], | ||
IN OUT UINTN * | DataLength, | ||
IN OUT UINT8 * | DataToggle, | ||
IN UINTN | TimeOut, | ||
IN EFI_USB2_HC_TRANSACTION_TRANSLATOR * | Translator, | ||
OUT UINT32 * | TransferResult | ||
) |
Submits bulk transfer to a bulk endpoint of a USB device.
This | A pointer to the EFI_USB2_HC_PROTOCOL instance. |
DeviceAddress | Target device address. |
EndPointAddress | Endpoint number and direction. |
DeviceSpeed | Device speed. |
MaximumPacketLength | Maximum packet size of the target endpoint. |
DataBuffersNumber | Number of data buffers prepared for the transfer. |
Data | Array of pointers to the buffers of data. |
DataLength | On input, size of the data buffer, On output, actually transferred data size. |
DataToggle | On input, data toggle to use; On output, next data toggle. |
TimeOut | Maximum time out, in microseconds. |
Translator | A pointr to the transaction translator data. |
TransferResult | Variable to receive transfer result. |
EFI_STATUS EFIAPI Uhci2ClearRootHubPortFeature | ( | IN EFI_USB2_HC_PROTOCOL * | This, |
IN UINT8 | PortNumber, | ||
IN EFI_USB_PORT_FEATURE | PortFeature | ||
) |
Clears a feature for the specified root hub port according to Uefi 2.0 spec.
This | A pointer to the EFI_USB2_HC_PROTOCOL instance. |
PortNumber | Specifies the root hub port whose feature is requested to be cleared. |
PortFeature | Indicates the feature selector associated with the feature clear request. |
EFI_STATUS EFIAPI Uhci2ControlTransfer | ( | IN EFI_USB2_HC_PROTOCOL * | This, |
IN UINT8 | DeviceAddress, | ||
IN UINT8 | DeviceSpeed, | ||
IN UINTN | MaximumPacketLength, | ||
IN EFI_USB_DEVICE_REQUEST * | Request, | ||
IN EFI_USB_DATA_DIRECTION | TransferDirection, | ||
IN OUT VOID * | Data, | ||
IN OUT UINTN * | DataLength, | ||
IN UINTN | TimeOut, | ||
IN EFI_USB2_HC_TRANSACTION_TRANSLATOR * | Translator, | ||
OUT UINT32 * | TransferResult | ||
) |
Submits control transfer to a target USB device according to UEFI 2.0 spec.
This | A pointer to the EFI_USB2_HC_PROTOCOL instance. |
DeviceAddress | Target device address. |
DeviceSpeed | Device speed. |
MaximumPacketLength | Maximum packet size of the target endpoint. |
Request | USB device request to send. |
TransferDirection | Data direction of the Data stage in control transfer. |
Data | Data to transmit/receive in data stage. |
DataLength | Length of the data. |
TimeOut | Maximum time, in microseconds, for transfer to complete. |
Translator | Transaction translator to be used by this device. |
TransferResult | Variable to receive the transfer result. |
EFI_STATUS EFIAPI Uhci2GetCapability | ( | IN EFI_USB2_HC_PROTOCOL * | This, |
OUT UINT8 * | MaxSpeed, | ||
OUT UINT8 * | PortNumber, | ||
OUT UINT8 * | Is64BitCapable | ||
) |
Retrieves capabilities of USB host controller according to UEFI 2.0 spec.
This | A pointer to the EFI_USB2_HC_PROTOCOL instance. |
MaxSpeed | A pointer to the max speed USB host controller supports. |
PortNumber | A pointer to the number of root hub ports. |
Is64BitCapable | A pointer to an integer to show whether USB host controller supports 64-bit memory addressing. |
EFI_STATUS EFIAPI Uhci2GetRootHubPortStatus | ( | IN EFI_USB2_HC_PROTOCOL * | This, |
IN UINT8 | PortNumber, | ||
OUT EFI_USB_PORT_STATUS * | PortStatus | ||
) |
Retrieves the current status of a USB root hub port according to UEFI 2.0 spec.
This | A pointer to the EFI_USB2_HC_PROTOCOL. |
PortNumber | The port to get status. |
PortStatus | A pointer to the current port status bits and port status change bits. |
EFI_STATUS EFIAPI Uhci2GetState | ( | IN EFI_USB2_HC_PROTOCOL * | This, |
OUT EFI_USB_HC_STATE * | State | ||
) |
Retrieves current state of the USB host controller according to UEFI 2.0 spec.
This | A pointer to the EFI_USB2_HC_PROTOCOL instance. |
State | Variable to receive current device state. |
EFI_STATUS EFIAPI Uhci2IsochronousTransfer | ( | IN EFI_USB2_HC_PROTOCOL * | This, |
IN UINT8 | DeviceAddress, | ||
IN UINT8 | EndPointAddress, | ||
IN UINT8 | DeviceSpeed, | ||
IN UINTN | MaximumPacketLength, | ||
IN UINT8 | DataBuffersNumber, | ||
IN OUT VOID * | Data[EFI_USB_MAX_ISO_BUFFER_NUM], | ||
IN UINTN | DataLength, | ||
IN EFI_USB2_HC_TRANSACTION_TRANSLATOR * | Translator, | ||
OUT UINT32 * | TransferResult | ||
) |
Submits isochronous transfer to a target USB device according to UEFI 2.0 spec.
This | A pointer to the EFI_USB2_HC_PROTOCOL instance. |
DeviceAddress | Target device address. |
EndPointAddress | Endpoint number and direction. |
DeviceSpeed | Device speed. |
MaximumPacketLength | Maximum packet size of the target endpoint. |
DataBuffersNumber | Number of data buffers prepared for the transfer. |
Data | Array of pointers to the buffers of data. |
DataLength | On input, size of the data buffer, On output, actually transferred data size. |
Translator | A pointr to the transaction translator data. |
TransferResult | Variable to receive transfer result. |
EFI_STATUS EFIAPI Uhci2Reset | ( | IN EFI_USB2_HC_PROTOCOL * | This, |
IN UINT16 | Attributes | ||
) |
Provides software reset for the USB host controller according to UEFI 2.0 spec.
This | A pointer to the EFI_USB2_HC_PROTOCOL instance. |
Attributes | A bit mask of the reset operation to perform. See below for a list of the supported bit mask values. |
EFI_STATUS EFIAPI Uhci2SetRootHubPortFeature | ( | IN EFI_USB2_HC_PROTOCOL * | This, |
IN UINT8 | PortNumber, | ||
IN EFI_USB_PORT_FEATURE | PortFeature | ||
) |
Sets a feature for the specified root hub port according to UEFI 2.0 spec.
This | A pointer to the EFI_USB2_HC_PROTOCOL. |
PortNumber | Specifies the root hub port whose feature is requested to be set. |
PortFeature | Indicates the feature selector associated with the feature set request. |
EFI_STATUS EFIAPI Uhci2SetState | ( | IN EFI_USB2_HC_PROTOCOL * | This, |
IN EFI_USB_HC_STATE | State | ||
) |
Sets the USB host controller to a specific state according to UEFI 2.0 spec.
This | A pointer to the EFI_USB2_HC_PROTOCOL instance. |
State | Indicates the state of the host controller that will be set. |
EFI_STATUS EFIAPI Uhci2SyncInterruptTransfer | ( | IN EFI_USB2_HC_PROTOCOL * | This, |
IN UINT8 | DeviceAddress, | ||
IN UINT8 | EndPointAddress, | ||
IN UINT8 | DeviceSpeed, | ||
IN UINTN | MaximumPacketLength, | ||
IN OUT VOID * | Data, | ||
IN OUT UINTN * | DataLength, | ||
IN OUT UINT8 * | DataToggle, | ||
IN UINTN | TimeOut, | ||
IN EFI_USB2_HC_TRANSACTION_TRANSLATOR * | Translator, | ||
OUT UINT32 * | TransferResult | ||
) |
Submits synchronous interrupt transfer to an interrupt endpoint of a USB device according to UEFI 2.0 spec.
This | A pointer to the EFI_USB2_HC_PROTOCOL instance. |
DeviceAddress | Target device address. |
EndPointAddress | Endpoint number and direction. |
DeviceSpeed | Device speed. |
MaximumPacketLength | Maximum packet size of the target endpoint. |
Data | Array of pointers to the buffers of data. |
DataLength | On input, size of the data buffer, On output, actually transferred data size. |
DataToggle | On input, data toggle to use; On output, next data toggle. |
TimeOut | Maximum time out, in microseconds. |
Translator | A pointr to the transaction translator data. |
TransferResult | Variable to receive transfer result. |
USB_HC_DEV * UhciAllocateDev | ( | IN EFI_PCI_IO_PROTOCOL * | PciIo, |
IN EFI_DEVICE_PATH_PROTOCOL * | DevicePath, | ||
IN UINT64 | OriginalPciAttributes | ||
) |
VOID UhciCleanDevUp | ( | IN EFI_HANDLE | Controller, |
IN EFI_USB2_HC_PROTOCOL * | This | ||
) |
EFI_STATUS EFIAPI UhciDriverBindingStart | ( | IN EFI_DRIVER_BINDING_PROTOCOL * | This, |
IN EFI_HANDLE | Controller, | ||
IN EFI_DEVICE_PATH_PROTOCOL * | RemainingDevicePath | ||
) |
Starting the Usb UHCI Driver.
This | Protocol instance pointer. |
Controller | Handle of device to test. |
RemainingDevicePath | Not used. |
EFI_SUCCESS | This driver supports this device. |
EFI_UNSUPPORTED | This driver does not support this device. |
EFI_DEVICE_ERROR | This driver cannot be started due to device Error. EFI_OUT_OF_RESOURCES- Failed due to resource shortage. |
EFI_STATUS EFIAPI UhciDriverBindingStop | ( | IN EFI_DRIVER_BINDING_PROTOCOL * | This, |
IN EFI_HANDLE | Controller, | ||
IN UINTN | NumberOfChildren, | ||
IN EFI_HANDLE * | ChildHandleBuffer | ||
) |
Stop this driver on ControllerHandle. Support stopping any child handles created by this driver.
This | Protocol instance pointer. |
Controller | Handle of device to stop driver on. |
NumberOfChildren | Number of Children in the ChildHandleBuffer. |
ChildHandleBuffer | List of handles for the children we need to stop. |
EFI_STATUS EFIAPI UhciDriverBindingSupported | ( | IN EFI_DRIVER_BINDING_PROTOCOL * | This, |
IN EFI_HANDLE | Controller, | ||
IN EFI_DEVICE_PATH_PROTOCOL * | RemainingDevicePath | ||
) |
Test to see if this driver supports ControllerHandle. Any ControllerHandle that has UsbHcProtocol installed will be supported.
This | Protocol instance pointer. |
Controller | Handle of device to test. |
RemainingDevicePath | Not used. |
EFI_STATUS EFIAPI UhciDriverEntryPoint | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
Entry point for EFI drivers.
ImageHandle | EFI_HANDLE. |
SystemTable | EFI_SYSTEM_TABLE. |
EFI_SUCCESS | Driver is successfully loaded. |
VOID UhciFreeDev | ( | IN USB_HC_DEV * | Uhc | ) |
EFI_DRIVER_BINDING_PROTOCOL gUhciDriverBinding |