TianoCore EDK2 master
|
#include <Uefi.h>
#include <Protocol/Usb2HostController.h>
#include <Protocol/PciIo.h>
#include <Guid/EventGroup.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/UefiDriverEntryPoint.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/UefiLib.h>
#include <Library/DebugLib.h>
#include <Library/ReportStatusCodeLib.h>
#include <Library/TimerLib.h>
#include <Library/PcdLib.h>
#include <IndustryStandard/Pci.h>
#include "XhciReg.h"
#include "XhciSched.h"
#include "ComponentName.h"
#include "UsbHcMem.h"
Go to the source code of this file.
Data Structures | |
struct | USB_CLASSC |
struct | EFI_USB_HUB_DESCRIPTOR |
struct | _USB_DEV_CONTEXT |
struct | _USB_XHCI_INSTANCE |
Macros | |
#define | XHC_MICROSECOND_TO_NANOSECOND(Time) (MultU64x32((Time), 1000)) |
#define | XHC_1_MICROSECOND (1) |
#define | XHC_1_MILLISECOND (1000) |
#define | XHC_GENERIC_TIMEOUT (10 * 1000) |
#define | XHC_RESET_TIMEOUT (1000) |
#define | XHC_RESET_RECOVERY_DELAY (10 * 1000) |
#define | XHC_ASYNC_TIMER_INTERVAL EFI_TIMER_PERIOD_MILLISECONDS(1) |
#define | XHC_TPL TPL_NOTIFY |
#define | CMD_RING_TRB_NUMBER 0x100 |
#define | TR_RING_TRB_NUMBER 0x100 |
#define | ERST_NUMBER 0x01 |
#define | EVENT_RING_TRB_NUMBER 0x200 |
#define | CMD_INTER 0 |
#define | CTRL_INTER 1 |
#define | BULK_INTER 2 |
#define | INT_INTER 3 |
#define | INT_INTER_ASYNC 4 |
#define | EFI_LIST_CONTAINER(Entry, Type, Field) BASE_CR(Entry, Type, Field) |
#define | XHC_LOW_32BIT(Addr64) ((UINT32)(((UINTN)(Addr64)) & 0xFFFFFFFF)) |
#define | XHC_HIGH_32BIT(Addr64) ((UINT32)(RShiftU64((UINT64)(UINTN)(Addr64), 32) & 0xFFFFFFFF)) |
#define | XHC_BIT_IS_SET(Data, Bit) ((BOOLEAN)(((Data) & (Bit)) == (Bit))) |
#define | XHC_REG_BIT_IS_SET(Xhc, Offset, Bit) (XHC_BIT_IS_SET(XhcReadOpReg ((Xhc), (Offset)), (Bit))) |
#define | XHCI_IS_DATAIN(EndpointAddr) XHC_BIT_IS_SET((EndpointAddr), 0x80) |
#define | XHCI_INSTANCE_SIG SIGNATURE_32 ('x', 'h', 'c', 'i') |
#define | XHC_FROM_THIS(a) CR(a, USB_XHCI_INSTANCE, Usb2Hc, XHCI_INSTANCE_SIG) |
#define | USB_DESC_TYPE_HUB 0x29 |
#define | USB_DESC_TYPE_HUB_SUPER_SPEED 0x2a |
#define | USB_REQUEST_TYPE(Dir, Type, Target) ((UINT8)((((Dir) == EfiUsbDataIn ? 0x01 : 0) << 7) | (Type) | (Target))) |
Typedefs | |
typedef struct _USB_XHCI_INSTANCE | USB_XHCI_INSTANCE |
typedef struct _USB_DEV_CONTEXT | USB_DEV_CONTEXT |
Functions | |
EFI_STATUS EFIAPI | XhcDriverBindingSupported (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath) |
EFI_STATUS EFIAPI | XhcDriverBindingStart (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath) |
EFI_STATUS EFIAPI | XhcDriverBindingStop (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer) |
EFI_STATUS EFIAPI | XhcGetCapability (IN EFI_USB2_HC_PROTOCOL *This, OUT UINT8 *MaxSpeed, OUT UINT8 *PortNumber, OUT UINT8 *Is64BitCapable) |
EFI_STATUS EFIAPI | XhcReset (IN EFI_USB2_HC_PROTOCOL *This, IN UINT16 Attributes) |
EFI_STATUS EFIAPI | XhcGetState (IN EFI_USB2_HC_PROTOCOL *This, OUT EFI_USB_HC_STATE *State) |
EFI_STATUS EFIAPI | XhcSetState (IN EFI_USB2_HC_PROTOCOL *This, IN EFI_USB_HC_STATE State) |
EFI_STATUS EFIAPI | XhcGetRootHubPortStatus (IN EFI_USB2_HC_PROTOCOL *This, IN UINT8 PortNumber, OUT EFI_USB_PORT_STATUS *PortStatus) |
EFI_STATUS EFIAPI | XhcSetRootHubPortFeature (IN EFI_USB2_HC_PROTOCOL *This, IN UINT8 PortNumber, IN EFI_USB_PORT_FEATURE PortFeature) |
EFI_STATUS EFIAPI | XhcClearRootHubPortFeature (IN EFI_USB2_HC_PROTOCOL *This, IN UINT8 PortNumber, IN EFI_USB_PORT_FEATURE PortFeature) |
EFI_STATUS EFIAPI | XhcControlTransfer (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 | XhcBulkTransfer (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 | XhcAsyncInterruptTransfer (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 OPTIONAL) |
EFI_STATUS EFIAPI | XhcSyncInterruptTransfer (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 | XhcIsochronousTransfer (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 | XhcAsyncIsochronousTransfer (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) |
UINT64 | XhcConvertTimeToTicks (UINT64 Time) |
UINT64 | XhcGetElapsedTicks (IN OUT UINT64 *PreviousTick) |
Variables | |
EFI_DRIVER_BINDING_PROTOCOL | gXhciDriverBinding |
EFI_COMPONENT_NAME_PROTOCOL | gXhciComponentName |
EFI_COMPONENT_NAME2_PROTOCOL | gXhciComponentName2 |
Provides some data structure definitions used by the XHCI host controller driver.
(C) Copyright 2023 Hewlett Packard Enterprise Development LP
Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.
Copyright (c) Microsoft Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file Xhci.h.
#define EFI_LIST_CONTAINER | ( | Entry, | |
Type, | |||
Field | |||
) | BASE_CR(Entry, Type, Field) |
#define USB_REQUEST_TYPE | ( | Dir, | |
Type, | |||
Target | |||
) | ((UINT8)((((Dir) == EfiUsbDataIn ? 0x01 : 0) << 7) | (Type) | (Target))) |
#define XHC_ASYNC_TIMER_INTERVAL EFI_TIMER_PERIOD_MILLISECONDS(1) |
#define XHC_BIT_IS_SET | ( | Data, | |
Bit | |||
) | ((BOOLEAN)(((Data) & (Bit)) == (Bit))) |
#define XHC_FROM_THIS | ( | a | ) | CR(a, USB_XHCI_INSTANCE, Usb2Hc, XHCI_INSTANCE_SIG) |
#define XHC_LOW_32BIT | ( | Addr64 | ) | ((UINT32)(((UINTN)(Addr64)) & 0xFFFFFFFF)) |
#define XHC_MICROSECOND_TO_NANOSECOND | ( | Time | ) | (MultU64x32((Time), 1000)) |
#define XHC_REG_BIT_IS_SET | ( | Xhc, | |
Offset, | |||
Bit | |||
) | (XHC_BIT_IS_SET(XhcReadOpReg ((Xhc), (Offset)), (Bit))) |
#define XHCI_INSTANCE_SIG SIGNATURE_32 ('x', 'h', 'c', 'i') |
#define XHCI_IS_DATAIN | ( | EndpointAddr | ) | XHC_BIT_IS_SET((EndpointAddr), 0x80) |
typedef struct _USB_DEV_CONTEXT USB_DEV_CONTEXT |
typedef struct _USB_XHCI_INSTANCE USB_XHCI_INSTANCE |
EFI_STATUS EFIAPI XhcAsyncInterruptTransfer | ( | 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 | OPTIONAL | ||
) |
Submits an asynchronous interrupt transfer to an interrupt endpoint of a USB device.
This | This EFI_USB2_HC_PROTOCOL instance. |
DeviceAddress | Target device address. |
EndPointAddress | Endpoint number and its direction encoded in bit 7 |
DeviceSpeed | Indicates device speed. |
MaximumPacketLength | Maximum packet size the target endpoint is capable |
IsNewTransfer | If TRUE, to submit an new asynchronous interrupt transfer If FALSE, to remove the specified asynchronous interrupt. |
DataToggle | On input, the initial data toggle to use; on output, it is updated to indicate the next data toggle. |
PollingInterval | The he interval, in milliseconds, that the transfer is polled. |
DataLength | The length of data to receive at the rate specified by PollingInterval. |
Translator | Transaction translator to use. |
CallBackFunction | Function to call at the rate specified by PollingInterval. |
Context | Context to CallBackFunction. |
EFI_SUCCESS | The request has been successfully submitted or canceled. |
EFI_INVALID_PARAMETER | Some parameters are invalid. |
EFI_OUT_OF_RESOURCES | The request failed due to a lack of resources. |
EFI_DEVICE_ERROR | The transfer failed due to host controller error. |
EFI_STATUS EFIAPI XhcAsyncIsochronousTransfer | ( | 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.
This | This EFI_USB2_HC_PROTOCOL instance. |
DeviceAddress | Target device address. |
EndPointAddress | End point address with its direction. |
DeviceSpeed | Device speed, Low speed device doesn't support this type. |
MaximumPacketLength | Maximum packet size that the endpoint is capable of sending or receiving. |
DataBuffersNumber | Number of data buffers prepared for the transfer. |
Data | Array of pointers to the buffers of data that will be transmitted to USB device or received from USB device. |
DataLength | The size, in bytes, of the data buffer. |
Translator | Transaction translator to use. |
IsochronousCallBack | Function to be called when the transfer complete. |
Context | Context passed to the call back function as parameter. |
EFI_STATUS EFIAPI XhcBulkTransfer | ( | 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 | This EFI_USB2_HC_PROTOCOL instance. |
DeviceAddress | Target device address. |
EndPointAddress | Endpoint number and its direction in bit 7. |
DeviceSpeed | Device speed, Low speed device doesn't support bulk transfer. |
MaximumPacketLength | Maximum packet size the endpoint is capable of sending or receiving. |
DataBuffersNumber | Number of data buffers prepared for the transfer. |
Data | Array of pointers to the buffers of data to transmit from or receive into. |
DataLength | The lenght of the data buffer. |
DataToggle | On input, the initial data toggle for the transfer; On output, it is updated to to next data toggle to use of the subsequent bulk transfer. |
Timeout | Indicates the maximum time, in millisecond, which the transfer is allowed to complete. |
Translator | A pointr to the transaction translator data. |
TransferResult | A pointer to the detailed result information of the bulk transfer. |
EFI_SUCCESS | The transfer was completed successfully. |
EFI_OUT_OF_RESOURCES | The transfer failed due to lack of resource. |
EFI_INVALID_PARAMETER | Some parameters are invalid. |
EFI_TIMEOUT | The transfer failed due to timeout. |
EFI_DEVICE_ERROR | The transfer failed due to host controller error. |
EFI_STATUS EFIAPI XhcClearRootHubPortFeature | ( | IN EFI_USB2_HC_PROTOCOL * | This, |
IN UINT8 | PortNumber, | ||
IN EFI_USB_PORT_FEATURE | PortFeature | ||
) |
Clears a feature for the specified root hub port.
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_SUCCESS | The feature specified by PortFeature was cleared for the USB root hub port specified by PortNumber. |
EFI_INVALID_PARAMETER | PortNumber is invalid or PortFeature is invalid. |
EFI_DEVICE_ERROR | Can't read register. |
EFI_STATUS EFIAPI XhcControlTransfer | ( | 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.
This | This EFI_USB2_HC_PROTOCOL instance. |
DeviceAddress | The target device address. |
DeviceSpeed | Target device speed. |
MaximumPacketLength | Maximum packet size the default control transfer endpoint is capable of sending or receiving. |
Request | USB device request to send. |
TransferDirection | Specifies the data direction for the data stage |
Data | Data buffer to be transmitted or received from USB device. |
DataLength | The size (in bytes) of the data buffer. |
Timeout | Indicates the maximum timeout, in millisecond. |
Translator | Transaction translator to be used by this device. |
TransferResult | Return the result of this control transfer. |
EFI_SUCCESS | Transfer was completed successfully. |
EFI_OUT_OF_RESOURCES | The transfer failed due to lack of resources. |
EFI_INVALID_PARAMETER | Some parameters are invalid. |
EFI_TIMEOUT | Transfer failed due to timeout. |
EFI_DEVICE_ERROR | Transfer failed due to host controller or device error. |
UINT64 XhcConvertTimeToTicks | ( | UINT64 | Time | ) |
Converts a time in nanoseconds to a performance counter tick count.
Time | The time in nanoseconds to be converted to performance counter ticks. |
EFI_STATUS EFIAPI XhcDriverBindingStart | ( | IN EFI_DRIVER_BINDING_PROTOCOL * | This, |
IN EFI_HANDLE | Controller, | ||
IN EFI_DEVICE_PATH_PROTOCOL * | RemainingDevicePath | ||
) |
Starting the Usb XHCI Driver.
This | Protocol instance pointer. |
Controller | Handle of device to test. |
RemainingDevicePath | Not used. |
EFI_STATUS EFIAPI XhcDriverBindingStop | ( | 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 XhcDriverBindingSupported | ( | 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 Usb2HcProtocol installed will be supported.
This | Protocol instance pointer. |
Controller | Handle of device to test. |
RemainingDevicePath | Not used. |
EFI_STATUS EFIAPI XhcGetCapability | ( | IN EFI_USB2_HC_PROTOCOL * | This, |
OUT UINT8 * | MaxSpeed, | ||
OUT UINT8 * | PortNumber, | ||
OUT UINT8 * | Is64BitCapable | ||
) |
Retrieves the capability of root hub ports.
This | The EFI_USB2_HC_PROTOCOL instance. |
MaxSpeed | Max speed supported by the controller. |
PortNumber | Number of the root hub ports. |
Is64BitCapable | Whether the controller supports 64-bit memory addressing. |
EFI_SUCCESS | Host controller capability were retrieved successfully. |
EFI_INVALID_PARAMETER | Either of the three capability pointer is NULL. |
Computes and returns the elapsed ticks since PreviousTick. The value of PreviousTick is overwritten with the current performance counter value.
PreviousTick | Pointer to PreviousTick count. |
EFI_STATUS EFIAPI XhcGetRootHubPortStatus | ( | 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.
This | This EFI_USB2_HC_PROTOCOL instance. |
PortNumber | The root hub port to retrieve the state from. This value is zero-based. |
PortStatus | Variable to receive the port state. |
EFI_SUCCESS | The status of the USB root hub port specified. by PortNumber was returned in PortStatus. |
EFI_INVALID_PARAMETER | PortNumber is invalid. |
EFI_DEVICE_ERROR | Can't read register. |
EFI_STATUS EFIAPI XhcGetState | ( | IN EFI_USB2_HC_PROTOCOL * | This, |
OUT EFI_USB_HC_STATE * | State | ||
) |
Retrieve the current state of the USB host controller.
This | This EFI_USB2_HC_PROTOCOL instance. |
State | Variable to return the current host controller state. |
EFI_SUCCESS | Host controller state was returned in State. |
EFI_INVALID_PARAMETER | State is NULL. |
EFI_DEVICE_ERROR | An error was encountered while attempting to retrieve the host controller's current state. |
EFI_STATUS EFIAPI XhcIsochronousTransfer | ( | 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.
This | This EFI_USB2_HC_PROTOCOL instance. |
DeviceAddress | Target device address. |
EndPointAddress | End point address with its direction. |
DeviceSpeed | Device speed, Low speed device doesn't support this type. |
MaximumPacketLength | Maximum packet size that the endpoint is capable of sending or receiving. |
DataBuffersNumber | Number of data buffers prepared for the transfer. |
Data | Array of pointers to the buffers of data that will be transmitted to USB device or received from USB device. |
DataLength | The size, in bytes, of the data buffer. |
Translator | Transaction translator to use. |
TransferResult | Variable to receive the transfer result. |
EFI_STATUS EFIAPI XhcReset | ( | IN EFI_USB2_HC_PROTOCOL * | This, |
IN UINT16 | Attributes | ||
) |
Provides software reset for the USB host controller.
This | This EFI_USB2_HC_PROTOCOL instance. |
Attributes | A bit mask of the reset operation to perform. |
EFI_SUCCESS | The reset operation succeeded. |
EFI_INVALID_PARAMETER | Attributes is not valid. |
EFI_UNSUPPOURTED | The type of reset specified by Attributes is not currently supported by the host controller. |
EFI_DEVICE_ERROR | Host controller isn't halted to reset. |
EFI_STATUS EFIAPI XhcSetRootHubPortFeature | ( | IN EFI_USB2_HC_PROTOCOL * | This, |
IN UINT8 | PortNumber, | ||
IN EFI_USB_PORT_FEATURE | PortFeature | ||
) |
Sets a feature for the specified root hub port.
This | This EFI_USB2_HC_PROTOCOL instance. |
PortNumber | Root hub port to set. |
PortFeature | Feature to set. |
EFI_SUCCESS | The feature specified by PortFeature was set. |
EFI_INVALID_PARAMETER | PortNumber is invalid or PortFeature is invalid. |
EFI_DEVICE_ERROR | Can't read register. |
EFI_STATUS EFIAPI XhcSetState | ( | IN EFI_USB2_HC_PROTOCOL * | This, |
IN EFI_USB_HC_STATE | State | ||
) |
Sets the USB host controller to a specific state.
This | This EFI_USB2_HC_PROTOCOL instance. |
State | The state of the host controller that will be set. |
EFI_SUCCESS | The USB host controller was successfully placed in the state specified by State. |
EFI_INVALID_PARAMETER | State is invalid. |
EFI_DEVICE_ERROR | Failed to set the state due to device error. |
EFI_STATUS EFIAPI XhcSyncInterruptTransfer | ( | 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.
This | This EFI_USB2_HC_PROTOCOL instance. |
DeviceAddress | Target device address. |
EndPointAddress | Endpoint number and its direction encoded in bit 7 |
DeviceSpeed | Indicates device speed. |
MaximumPacketLength | Maximum packet size the target endpoint is capable of sending or receiving. |
Data | Buffer of data that will be transmitted to USB device or received from USB device. |
DataLength | On input, the size, in bytes, of the data buffer; On output, the number of bytes transferred. |
DataToggle | On input, the initial data toggle to use; on output, it is updated to indicate the next data toggle. |
Timeout | Maximum time, in second, to complete. |
Translator | Transaction translator to use. |
TransferResult | Variable to receive the transfer result. |
|
extern |
Definition at line 15 of file ComponentName.c.
|
extern |
Definition at line 24 of file ComponentName.c.
|
extern |