TianoCore EDK2 master
|
Go to the source code of this file.
Data Structures | |
struct | _USB_DEV_TOPOLOGY |
union | _USB_DEV_ROUTE |
struct | _USB_ENDPOINT |
struct | _TRB_TEMPLATE |
struct | _TRANSFER_RING |
struct | _EVENT_RING |
struct | _URB |
struct | _EVENT_RING_SEG_TABLE_ENTRY |
struct | _TRANSFER_TRB_NORMAL |
struct | _TRANSFER_TRB_CONTROL_SETUP |
struct | _TRANSFER_TRB_CONTROL_DATA |
struct | _TRANSFER_TRB_CONTROL_STATUS |
struct | _EVT_TRB_TRANSFER |
struct | _EVT_TRB_COMMAND_COMPLETION |
union | _TRB |
struct | _CMD_TRB_NO_OP |
struct | _CMD_TRB_ENABLE_SLOT |
struct | _CMD_TRB_DISABLE_SLOT |
struct | _CMD_TRB_ADDRESS_DEVICE |
struct | _CMD_TRB_CONFIG_ENDPOINT |
struct | _CMD_TRB_EVALUATE_CONTEXT |
struct | _CMD_TRB_RESET_ENDPOINT |
struct | _CMD_TRB_STOP_ENDPOINT |
struct | _CMD_SET_TR_DEQ_POINTER |
struct | _LINK_TRB |
struct | _SLOT_CONTEXT |
struct | _SLOT_CONTEXT_64 |
struct | _ENDPOINT_CONTEXT |
struct | _ENDPOINT_CONTEXT_64 |
struct | _INPUT_CONTRL_CONTEXT |
struct | _INPUT_CONTRL_CONTEXT_64 |
struct | _DEVICE_CONTEXT |
struct | _DEVICE_CONTEXT_64 |
struct | _INPUT_CONTEXT |
struct | _INPUT_CONTEXT_64 |
Typedefs | |
typedef struct _USB_DEV_TOPOLOGY | USB_DEV_TOPOLOGY |
typedef union _USB_DEV_ROUTE | USB_DEV_ROUTE |
typedef struct _USB_ENDPOINT | USB_ENDPOINT |
typedef struct _TRB_TEMPLATE | TRB_TEMPLATE |
typedef struct _TRANSFER_RING | TRANSFER_RING |
typedef struct _EVENT_RING | EVENT_RING |
typedef struct _URB | URB |
typedef struct _EVENT_RING_SEG_TABLE_ENTRY | EVENT_RING_SEG_TABLE_ENTRY |
typedef struct _TRANSFER_TRB_NORMAL | TRANSFER_TRB_NORMAL |
typedef struct _TRANSFER_TRB_CONTROL_SETUP | TRANSFER_TRB_CONTROL_SETUP |
typedef struct _TRANSFER_TRB_CONTROL_DATA | TRANSFER_TRB_CONTROL_DATA |
typedef struct _TRANSFER_TRB_CONTROL_STATUS | TRANSFER_TRB_CONTROL_STATUS |
typedef struct _EVT_TRB_TRANSFER | EVT_TRB_TRANSFER |
typedef struct _EVT_TRB_COMMAND_COMPLETION | EVT_TRB_COMMAND_COMPLETION |
typedef union _TRB | TRB |
typedef struct _CMD_TRB_NO_OP | CMD_TRB_NO_OP |
typedef struct _CMD_TRB_ENABLE_SLOT | CMD_TRB_ENABLE_SLOT |
typedef struct _CMD_TRB_DISABLE_SLOT | CMD_TRB_DISABLE_SLOT |
typedef struct _CMD_TRB_ADDRESS_DEVICE | CMD_TRB_ADDRESS_DEVICE |
typedef struct _CMD_TRB_CONFIG_ENDPOINT | CMD_TRB_CONFIG_ENDPOINT |
typedef struct _CMD_TRB_EVALUATE_CONTEXT | CMD_TRB_EVALUATE_CONTEXT |
typedef struct _CMD_TRB_RESET_ENDPOINT | CMD_TRB_RESET_ENDPOINT |
typedef struct _CMD_TRB_STOP_ENDPOINT | CMD_TRB_STOP_ENDPOINT |
typedef struct _CMD_SET_TR_DEQ_POINTER | CMD_SET_TR_DEQ_POINTER |
typedef struct _LINK_TRB | LINK_TRB |
typedef struct _SLOT_CONTEXT | SLOT_CONTEXT |
typedef struct _SLOT_CONTEXT_64 | SLOT_CONTEXT_64 |
typedef struct _ENDPOINT_CONTEXT | ENDPOINT_CONTEXT |
typedef struct _ENDPOINT_CONTEXT_64 | ENDPOINT_CONTEXT_64 |
typedef struct _INPUT_CONTRL_CONTEXT | INPUT_CONTRL_CONTEXT |
typedef struct _INPUT_CONTRL_CONTEXT_64 | INPUT_CONTRL_CONTEXT_64 |
typedef struct _DEVICE_CONTEXT | DEVICE_CONTEXT |
typedef struct _DEVICE_CONTEXT_64 | DEVICE_CONTEXT_64 |
typedef struct _INPUT_CONTEXT | INPUT_CONTEXT |
typedef struct _INPUT_CONTEXT_64 | INPUT_CONTEXT_64 |
This file contains the definition for XHCI host controller schedule routines.
Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file XhciSched.h.
#define ED_BULK_IN 6 |
Definition at line 64 of file XhciSched.h.
#define ED_BULK_OUT 2 |
Definition at line 60 of file XhciSched.h.
#define ED_CONTROL_BIDIR 4 |
Definition at line 62 of file XhciSched.h.
#define ED_INTERRUPT_IN 7 |
Definition at line 65 of file XhciSched.h.
#define ED_INTERRUPT_OUT 3 |
Definition at line 61 of file XhciSched.h.
#define ED_ISOCH_IN 5 |
Definition at line 63 of file XhciSched.h.
#define ED_ISOCH_OUT 1 |
Definition at line 59 of file XhciSched.h.
#define ED_NOT_VALID 0 |
Definition at line 58 of file XhciSched.h.
#define EDKII_USB_ERR_TRANSACTION 0x200 |
Definition at line 86 of file XhciSched.h.
#define TRB_COMPLETION_BABBLE_ERROR 3 |
Definition at line 73 of file XhciSched.h.
#define TRB_COMPLETION_DATA_BUFFER_ERROR 2 |
Definition at line 72 of file XhciSched.h.
#define TRB_COMPLETION_INVALID 0 |
Definition at line 70 of file XhciSched.h.
#define TRB_COMPLETION_SHORT_PACKET 13 |
Definition at line 77 of file XhciSched.h.
#define TRB_COMPLETION_STALL_ERROR 6 |
Definition at line 76 of file XhciSched.h.
#define TRB_COMPLETION_STOPPED 26 |
Definition at line 78 of file XhciSched.h.
#define TRB_COMPLETION_STOPPED_LENGTH_INVALID 27 |
Definition at line 79 of file XhciSched.h.
#define TRB_COMPLETION_SUCCESS 1 |
Definition at line 71 of file XhciSched.h.
#define TRB_COMPLETION_TRB_ERROR 5 |
Definition at line 75 of file XhciSched.h.
#define TRB_COMPLETION_USB_TRANSACTION_ERROR 4 |
Definition at line 74 of file XhciSched.h.
#define TRB_TYPE_ADDRESS_DEV 11 |
Definition at line 38 of file XhciSched.h.
#define TRB_TYPE_COMMAND_COMPLT_EVENT 33 |
Definition at line 49 of file XhciSched.h.
#define TRB_TYPE_CON_ENDPOINT 12 |
Definition at line 39 of file XhciSched.h.
#define TRB_TYPE_DATA_STAGE 3 |
Definition at line 30 of file XhciSched.h.
#define TRB_TYPE_DEVICE_NOTIFI_EVENT 38 |
Definition at line 52 of file XhciSched.h.
#define TRB_TYPE_DIS_SLOT 10 |
Definition at line 37 of file XhciSched.h.
#define TRB_TYPE_EN_SLOT 9 |
Definition at line 36 of file XhciSched.h.
#define TRB_TYPE_EVALU_CONTXT 13 |
Definition at line 40 of file XhciSched.h.
#define TRB_TYPE_EVENT_DATA 7 |
Definition at line 34 of file XhciSched.h.
#define TRB_TYPE_FORCE_HEADER 22 |
Definition at line 46 of file XhciSched.h.
#define TRB_TYPE_GET_PORT_BANW 21 |
Definition at line 45 of file XhciSched.h.
#define TRB_TYPE_HOST_CONTROLLER_EVENT 37 |
Definition at line 51 of file XhciSched.h.
#define TRB_TYPE_ISOCH 5 |
Definition at line 32 of file XhciSched.h.
#define TRB_TYPE_LINK 6 |
Definition at line 33 of file XhciSched.h.
#define TRB_TYPE_MFINDEX_WRAP_EVENT 39 |
Definition at line 53 of file XhciSched.h.
#define TRB_TYPE_NO_OP 8 |
Definition at line 35 of file XhciSched.h.
#define TRB_TYPE_NO_OP_COMMAND 23 |
Definition at line 47 of file XhciSched.h.
#define TRB_TYPE_NORMAL 1 |
Definition at line 28 of file XhciSched.h.
#define TRB_TYPE_PORT_STATUS_CHANGE_EVENT 34 |
Definition at line 50 of file XhciSched.h.
#define TRB_TYPE_RESET_DEV 17 |
Definition at line 44 of file XhciSched.h.
#define TRB_TYPE_RESET_ENDPOINT 14 |
Definition at line 41 of file XhciSched.h.
#define TRB_TYPE_SET_TR_DEQUE 16 |
Definition at line 43 of file XhciSched.h.
#define TRB_TYPE_SETUP_STAGE 2 |
Definition at line 29 of file XhciSched.h.
#define TRB_TYPE_STATUS_STAGE 4 |
Definition at line 31 of file XhciSched.h.
#define TRB_TYPE_STOP_ENDPOINT 15 |
Definition at line 42 of file XhciSched.h.
#define TRB_TYPE_TRANS_EVENT 32 |
Definition at line 48 of file XhciSched.h.
#define XHC_BULK_TRANSFER 0x02 |
Definition at line 20 of file XhciSched.h.
#define XHC_CTRL_TRANSFER 0x01 |
Definition at line 19 of file XhciSched.h.
#define XHC_INIT_DEVICE_SLOT_RETRIES 1 |
Definition at line 14 of file XhciSched.h.
#define XHC_INT_ONLY_TRANSFER_ASYNC 0x10 |
Definition at line 23 of file XhciSched.h.
#define XHC_INT_TRANSFER_ASYNC 0x08 |
Definition at line 22 of file XhciSched.h.
#define XHC_INT_TRANSFER_SYNC 0x04 |
Definition at line 21 of file XhciSched.h.
#define XHC_URB_SIG SIGNATURE_32 ('U', 'S', 'B', 'R') |
Definition at line 13 of file XhciSched.h.
VOID CreateEventRing | ( | IN USB_XHCI_INSTANCE * | Xhc, |
OUT EVENT_RING * | EventRing | ||
) |
Create XHCI event ring.
Xhc | The XHCI Instance. |
EventRing | The created event ring. |
Definition at line 789 of file XhciSched.c.
VOID CreateTransferRing | ( | IN USB_XHCI_INSTANCE * | Xhc, |
IN UINTN | TrbNum, | ||
OUT TRANSFER_RING * | TransferRing | ||
) |
Create XHCI transfer ring.
Xhc | The XHCI Instance. |
TrbNum | The number of TRB in the ring. |
TransferRing | The created transfer ring. |
Definition at line 890 of file XhciSched.c.
EFI_STATUS RingIntTransferDoorBell | ( | IN USB_XHCI_INSTANCE * | Xhc, |
IN URB * | Urb | ||
) |
Ring the door bell to notify XHCI there is a transaction to be executed through URB.
Xhc | The XHCI Instance. |
Urb | The URB to be rung. |
EFI_SUCCESS | Successfully ring the door bell. |
Definition at line 2099 of file XhciSched.c.
UINT8 EFIAPI XhcBusDevAddrToSlotId | ( | IN USB_XHCI_INSTANCE * | Xhc, |
IN UINT8 | BusDevAddr | ||
) |
Find out the actual device address according to the requested device address from UsbBus.
Xhc | The XHCI Instance. |
BusDevAddr | The requested device address by UsbBus upper driver. |
Definition at line 1853 of file XhciSched.c.
EFI_STATUS EFIAPI XhcCheckNewEvent | ( | IN USB_XHCI_INSTANCE * | Xhc, |
IN EVENT_RING * | EvtRing, | ||
OUT TRB_TEMPLATE ** | NewEvtTrb | ||
) |
Check if there is a new generated event.
Xhc | The XHCI Instance. |
EvtRing | The event ring to check. |
NewEvtTrb | The new event TRB found. |
EFI_SUCCESS | Found a new event TRB at the event ring. |
EFI_NOT_READY | The event ring has no new event. |
Definition at line 2037 of file XhciSched.c.
VOID XhcClearBiosOwnership | ( | IN USB_XHCI_INSTANCE * | Xhc | ) |
EFI_STATUS XhcConfigHubContext | ( | IN USB_XHCI_INSTANCE * | Xhc, |
IN UINT8 | SlotId, | ||
IN UINT8 | PortNum, | ||
IN UINT8 | TTT, | ||
IN UINT8 | MTT | ||
) |
Evaluate the slot context for hub device through XHCI's Configure_Endpoint cmd.
Xhc | The XHCI Instance. |
SlotId | The slot id to be configured. |
PortNum | The total number of downstream port supported by the hub. |
TTT | The TT think time of the hub device. |
MTT | The multi-TT of the hub device. |
EFI_SUCCESS | Successfully configure the hub device's slot context. |
Definition at line 4134 of file XhciSched.c.
EFI_STATUS XhcConfigHubContext64 | ( | IN USB_XHCI_INSTANCE * | Xhc, |
IN UINT8 | SlotId, | ||
IN UINT8 | PortNum, | ||
IN UINT8 | TTT, | ||
IN UINT8 | MTT | ||
) |
Evaluate the slot context for hub device through XHCI's Configure_Endpoint cmd.
Xhc | The XHCI Instance. |
SlotId | The slot id to be configured. |
PortNum | The total number of downstream port supported by the hub. |
TTT | The TT think time of the hub device. |
MTT | The multi-TT of the hub device. |
EFI_SUCCESS | Successfully configure the hub device's slot context. |
Definition at line 4204 of file XhciSched.c.
EFI_STATUS XhcCreateTransferTrb | ( | IN USB_XHCI_INSTANCE * | Xhc, |
IN URB * | Urb | ||
) |
Create a transfer TRB.
Xhc | The XHCI Instance |
Urb | The urb used to construct the transfer TRB. |
Definition at line 218 of file XhciSched.c.
URB * XhcCreateUrb | ( | IN USB_XHCI_INSTANCE * | Xhc, |
IN UINT8 | BusAddr, | ||
IN UINT8 | EpAddr, | ||
IN UINT8 | DevSpeed, | ||
IN UINTN | MaxPacket, | ||
IN UINTN | Type, | ||
IN EFI_USB_DEVICE_REQUEST * | Request, | ||
IN VOID * | Data, | ||
IN UINTN | DataLen, | ||
IN EFI_ASYNC_USB_TRANSFER_CALLBACK | Callback, | ||
IN VOID * | Context | ||
) |
Create a new URB for a new transaction.
Xhc | The XHCI Instance |
DevAddr | The device address |
EpAddr | Endpoint addrress |
DevSpeed | The device speed |
MaxPacket | The max packet length of the endpoint |
Type | The transaction type |
Request | The standard USB request for control transfer |
Data | The user data to transfer |
DataLen | The length of data buffer |
Callback | The function to call when data is transferred |
Context | The context to the callback |
Create a new URB for a new transaction.
Xhc | The XHCI Instance |
BusAddr | The logical device address assigned by UsbBus driver |
EpAddr | Endpoint addrress |
DevSpeed | The device speed |
MaxPacket | The max packet length of the endpoint |
Type | The transaction type |
Request | The standard USB request for control transfer |
Data | The user data to transfer |
DataLen | The length of data buffer |
Callback | The function to call when data is transferred |
Context | The context to the callback |
Definition at line 134 of file XhciSched.c.
EFI_STATUS EFIAPI XhcDequeueTrbFromEndpoint | ( | IN USB_XHCI_INSTANCE * | Xhc, |
IN URB * | Urb | ||
) |
System software shall use a Stop Endpoint Command (section 4.6.9) and the Set TR Dequeue Pointer Command (section 4.6.10) to remove the timed-out TDs from the xHC transfer ring. The next write to the Doorbell of the Endpoint will transition the Endpoint Context from the Stopped to the Running state.
Xhc | The XHCI Instance. |
Urb | The urb which doesn't get completed in a specified timeout range. |
EFI_SUCCESS | The dequeuing of the TDs is successful. |
Others | Failed to stop the endpoint and dequeue the TDs. |
System software shall use a Stop Endpoint Command (section 4.6.9) and the Set TR Dequeue Pointer Command (section 4.6.10) to remove the timed-out TDs from the xHC transfer ring. The next write to the Doorbell of the Endpoint will transition the Endpoint Context from the Stopped to the Running state.
Xhc | The XHCI Instance. |
Urb | The urb which doesn't get completed in a specified timeout range. |
EFI_SUCCESS | The dequeuing of the TDs is successful. |
EFI_ALREADY_STARTED | The Urb is finished so no deque is needed. |
Others | Failed to stop the endpoint and dequeue the TDs. |
Definition at line 724 of file XhciSched.c.
EFI_STATUS EFIAPI XhcDisableSlotCmd | ( | IN USB_XHCI_INSTANCE * | Xhc, |
IN UINT8 | SlotId | ||
) |
Disable the specified device slot.
Xhc | The XHCI Instance. |
SlotId | The slot id to be disabled. |
EFI_SUCCESS | Successfully disable the device slot. |
Definition at line 2596 of file XhciSched.c.
EFI_STATUS EFIAPI XhcDisableSlotCmd64 | ( | IN USB_XHCI_INSTANCE * | Xhc, |
IN UINT8 | SlotId | ||
) |
Disable the specified device slot.
Xhc | The XHCI Instance. |
SlotId | The slot id to be disabled. |
EFI_SUCCESS | Successfully disable the device slot. |
Definition at line 2709 of file XhciSched.c.
Calculate the device context index by endpoint address and direction.
EpAddr | The target endpoint number. |
Direction | The direction of the target endpoint. |
Definition at line 1823 of file XhciSched.c.
EFI_STATUS EFIAPI XhcEvaluateContext | ( | IN USB_XHCI_INSTANCE * | Xhc, |
IN UINT8 | SlotId, | ||
IN UINT32 | MaxPacketSize | ||
) |
Evaluate the endpoint 0 context through XHCI's Evaluate_Context cmd.
Xhc | The XHCI Instance. |
SlotId | The slot id to be evaluated. |
MaxPacketSize | The max packet size supported by the device control transfer. |
EFI_SUCCESS | Successfully evaluate the device endpoint 0. |
Definition at line 4007 of file XhciSched.c.
EFI_STATUS EFIAPI XhcEvaluateContext64 | ( | IN USB_XHCI_INSTANCE * | Xhc, |
IN UINT8 | SlotId, | ||
IN UINT32 | MaxPacketSize | ||
) |
Evaluate the endpoint 0 context through XHCI's Evaluate_Context cmd.
Xhc | The XHCI Instance. |
SlotId | The slot id to be evaluated. |
MaxPacketSize | The max packet size supported by the device control transfer. |
EFI_SUCCESS | Successfully evaluate the device endpoint 0. |
Definition at line 4070 of file XhciSched.c.
EFI_STATUS XhcExecTransfer | ( | IN USB_XHCI_INSTANCE * | Xhc, |
IN BOOLEAN | CmdTransfer, | ||
IN URB * | Urb, | ||
IN UINTN | Timeout | ||
) |
Execute the transfer by polling the URB. This is a synchronous operation.
Xhc | The XHCI Instance. |
CmdTransfer | The executed URB is for cmd transfer or not. |
Urb | The URB to execute. |
Timeout | The time to wait before abort, in millisecond. |
Definition at line 1294 of file XhciSched.c.
VOID XhcFreeSched | ( | IN USB_XHCI_INSTANCE * | Xhc | ) |
Free the resouce allocated at initializing schedule.
Xhc | The XHCI Instance. |
Definition at line 967 of file XhciSched.c.
VOID XhcFreeUrb | ( | IN USB_XHCI_INSTANCE * | Xhc, |
IN URB * | Urb | ||
) |
Free an allocated URB.
Xhc | The XHCI device. |
Urb | The URB to free. |
Definition at line 192 of file XhciSched.c.
VOID XhciDelAllAsyncIntTransfers | ( | IN USB_XHCI_INSTANCE * | Xhc | ) |
Remove all the asynchronous interrupt transfers.
Xhc | The XHCI Instance. |
Remove all the asynchronous interrutp transfers.
Xhc | The XHCI Instance. |
Definition at line 1430 of file XhciSched.c.
EFI_STATUS XhciDelAsyncIntTransfer | ( | IN USB_XHCI_INSTANCE * | Xhc, |
IN UINT8 | BusAddr, | ||
IN UINT8 | EpNum | ||
) |
Delete a single asynchronous interrupt transfer for the device and endpoint.
Xhc | The XHCI Instance. |
BusAddr | The logical device address assigned by UsbBus driver. |
EpNum | The endpoint of the target. |
EFI_SUCCESS | An asynchronous transfer is removed. |
EFI_NOT_FOUND | No transfer for the device is found. |
Definition at line 1381 of file XhciSched.c.
URB * XhciInsertAsyncIntTransfer | ( | IN USB_XHCI_INSTANCE * | Xhc, |
IN UINT8 | BusAddr, | ||
IN UINT8 | EpAddr, | ||
IN UINT8 | DevSpeed, | ||
IN UINTN | MaxPacket, | ||
IN UINTN | DataLen, | ||
IN EFI_ASYNC_USB_TRANSFER_CALLBACK | Callback, | ||
IN VOID * | Context | ||
) |
Insert a single asynchronous interrupt transfer for the device and endpoint.
Xhc | The XHCI Instance |
BusAddr | The logical device address assigned by UsbBus driver |
EpAddr | Endpoint addrress |
DevSpeed | The device speed |
MaxPacket | The max packet length of the endpoint |
DataLen | The length of data buffer |
Callback | The function to call when data is transferred |
Context | The context to the callback |
Definition at line 1474 of file XhciSched.c.
EFI_STATUS EFIAPI XhcInitializeDeviceSlot | ( | IN USB_XHCI_INSTANCE * | Xhc, |
IN USB_DEV_ROUTE | ParentRouteChart, | ||
IN UINT16 | ParentPort, | ||
IN USB_DEV_ROUTE | RouteChart, | ||
IN UINT8 | DeviceSpeed | ||
) |
Assign and initialize the device slot for a new device.
Xhc | The XHCI Instance. |
ParentRouteChart | The route string pointed to the parent device. |
ParentPort | The port at which the device is located. |
RouteChart | The route string pointed to the device. |
DeviceSpeed | The device speed. |
EFI_SUCCESS | Successfully assign a slot to the device and assign an address to it. |
Definition at line 2147 of file XhciSched.c.
EFI_STATUS EFIAPI XhcInitializeDeviceSlot64 | ( | IN USB_XHCI_INSTANCE * | Xhc, |
IN USB_DEV_ROUTE | ParentRouteChart, | ||
IN UINT16 | ParentPort, | ||
IN USB_DEV_ROUTE | RouteChart, | ||
IN UINT8 | DeviceSpeed | ||
) |
Assign and initialize the device slot for a new device.
Xhc | The XHCI Instance. |
ParentRouteChart | The route string pointed to the parent device. |
ParentPort | The port at which the device is located. |
RouteChart | The route string pointed to the device. |
DeviceSpeed | The device speed. |
EFI_SUCCESS | Successfully assign a slot to the device and assign an address to it. |
Definition at line 2373 of file XhciSched.c.
VOID XhcInitSched | ( | IN USB_XHCI_INSTANCE * | Xhc | ) |
Initialize the XHCI host controller for schedule.
Xhc | The XHCI Instance to be initialized. |
Definition at line 475 of file XhciSched.c.
Interrupt transfer periodic check handler.
Event | Interrupt event. |
Context | Pointer to USB_XHCI_INSTANCE. |
Definition at line 1614 of file XhciSched.c.
EFI_STATUS EFIAPI XhcPollPortStatusChange | ( | IN USB_XHCI_INSTANCE * | Xhc, |
IN USB_DEV_ROUTE | ParentRouteChart, | ||
IN UINT8 | Port, | ||
IN EFI_USB_PORT_STATUS * | PortState | ||
) |
Monitor the port status change. Enable/Disable device slot if there is a device attached/detached.
Xhc | The XHCI Instance. |
ParentRouteChart | The route string pointed to the parent device if it exists. |
Port | The port to be polled. |
PortState | The port state. |
EFI_SUCCESS | Successfully enable/disable device slot according to port state. |
Others | Should not appear. |
Definition at line 1727 of file XhciSched.c.
EFI_STATUS EFIAPI XhcRecoverHaltedEndpoint | ( | IN USB_XHCI_INSTANCE * | Xhc, |
IN URB * | Urb | ||
) |
System software shall use a Reset Endpoint Command (section 4.11.4.7) to remove the Halted condition in the xHC. After the successful completion of the Reset Endpoint Command, the Endpoint Context is transitioned from the Halted to the Stopped state and the Transfer Ring of the endpoint is reenabled. The next write to the Doorbell of the Endpoint will transition the Endpoint Context from the Stopped to the Running state.
Xhc | The XHCI Instance. |
Urb | The urb which makes the endpoint halted. |
EFI_SUCCESS | The recovery is successful. |
Others | Failed to recovery halted endpoint. |
Definition at line 661 of file XhciSched.c.
EFI_STATUS EFIAPI XhcResetEndpoint | ( | IN USB_XHCI_INSTANCE * | Xhc, |
IN UINT8 | SlotId, | ||
IN UINT8 | Dci | ||
) |
Reset endpoint through XHCI's Reset_Endpoint cmd.
Xhc | The XHCI Instance. |
SlotId | The slot id to be configured. |
Dci | The device context index of endpoint. |
EFI_SUCCESS | Reset endpoint successfully. |
Others | Failed to reset endpoint. |
Definition at line 3491 of file XhciSched.c.
EFI_STATUS EFIAPI XhcRingDoorBell | ( | IN USB_XHCI_INSTANCE * | Xhc, |
IN UINT8 | SlotId, | ||
IN UINT8 | Dci | ||
) |
Ring the door bell to notify XHCI there is a transaction to be executed.
Xhc | The XHCI Instance. |
SlotId | The slot id of the target device. |
Dci | The device context index of the target slot or endpoint. |
EFI_SUCCESS | Successfully ring the door bell. |
Definition at line 2074 of file XhciSched.c.
UINT8 EFIAPI XhcRouteStringToSlotId | ( | IN USB_XHCI_INSTANCE * | Xhc, |
IN USB_DEV_ROUTE | RouteString | ||
) |
Find out the slot id according to the device's route string.
Xhc | The XHCI Instance. |
RouteString | The route string described the device location. |
Definition at line 1887 of file XhciSched.c.
VOID XhcSetBiosOwnership | ( | IN USB_XHCI_INSTANCE * | Xhc | ) |
EFI_STATUS EFIAPI XhcSetConfigCmd | ( | IN USB_XHCI_INSTANCE * | Xhc, |
IN UINT8 | SlotId, | ||
IN UINT8 | DeviceSpeed, | ||
IN USB_CONFIG_DESCRIPTOR * | ConfigDesc | ||
) |
Configure all the device endpoints through XHCI's Configure_Endpoint cmd.
Xhc | The XHCI Instance. |
SlotId | The slot id to be configured. |
DeviceSpeed | The device's speed. |
ConfigDesc | The pointer to the usb device configuration descriptor. |
EFI_SUCCESS | Successfully configure all the device endpoints. |
Definition at line 3230 of file XhciSched.c.
EFI_STATUS EFIAPI XhcSetConfigCmd64 | ( | IN USB_XHCI_INSTANCE * | Xhc, |
IN UINT8 | SlotId, | ||
IN UINT8 | DeviceSpeed, | ||
IN USB_CONFIG_DESCRIPTOR * | ConfigDesc | ||
) |
Configure all the device endpoints through XHCI's Configure_Endpoint cmd.
Xhc | The XHCI Instance. |
SlotId | The slot id to be configured. |
DeviceSpeed | The device's speed. |
ConfigDesc | The pointer to the usb device configuration descriptor. |
EFI_SUCCESS | Successfully configure all the device endpoints. |
Definition at line 3323 of file XhciSched.c.
EFI_STATUS EFIAPI XhcSetInterface | ( | IN USB_XHCI_INSTANCE * | Xhc, |
IN UINT8 | SlotId, | ||
IN UINT8 | DeviceSpeed, | ||
IN USB_CONFIG_DESCRIPTOR * | ConfigDesc, | ||
IN EFI_USB_DEVICE_REQUEST * | Request | ||
) |
Set interface through XHCI's Configure_Endpoint cmd.
Xhc | The XHCI Instance. |
SlotId | The slot id to be configured. |
DeviceSpeed | The device's speed. |
ConfigDesc | The pointer to the usb device configuration descriptor. |
Request | USB device request to send. |
EFI_SUCCESS | Successfully set interface. |
Definition at line 3595 of file XhciSched.c.
EFI_STATUS EFIAPI XhcSetInterface64 | ( | IN USB_XHCI_INSTANCE * | Xhc, |
IN UINT8 | SlotId, | ||
IN UINT8 | DeviceSpeed, | ||
IN USB_CONFIG_DESCRIPTOR * | ConfigDesc, | ||
IN EFI_USB_DEVICE_REQUEST * | Request | ||
) |
Set interface through XHCI's Configure_Endpoint cmd.
Xhc | The XHCI Instance. |
SlotId | The slot id to be configured. |
DeviceSpeed | The device's speed. |
ConfigDesc | The pointer to the usb device configuration descriptor. |
Request | USB device request to send. |
EFI_SUCCESS | Successfully set interface. |
Definition at line 3802 of file XhciSched.c.
EFI_STATUS EFIAPI XhcSetTrDequeuePointer | ( | IN USB_XHCI_INSTANCE * | Xhc, |
IN UINT8 | SlotId, | ||
IN UINT8 | Dci, | ||
IN URB * | Urb | ||
) |
Set transfer ring dequeue pointer through XHCI's Set_Tr_Dequeue_Pointer cmd.
Xhc | The XHCI Instance. |
SlotId | The slot id to be configured. |
Dci | The device context index of endpoint. |
Urb | The dequeue pointer of the transfer ring specified by the urb to be updated. |
EFI_SUCCESS | Set transfer ring dequeue pointer succeeds. |
Others | Failed to set transfer ring dequeue pointer. |
Definition at line 3541 of file XhciSched.c.
EFI_STATUS EFIAPI XhcStopEndpoint | ( | IN USB_XHCI_INSTANCE * | Xhc, |
IN UINT8 | SlotId, | ||
IN UINT8 | Dci, | ||
IN URB *PendingUrb | OPTIONAL | ||
) |
Stop endpoint through XHCI's Stop_Endpoint cmd.
Xhc | The XHCI Instance. |
SlotId | The slot id to be configured. |
Dci | The device context index of endpoint. |
PendingUrb | The pending URB to check completion status when stopping the end point. |
EFI_SUCCESS | Stop endpoint successfully. |
Others | Failed to stop endpoint. |
Definition at line 3417 of file XhciSched.c.
EFI_STATUS EFIAPI XhcSyncEventRing | ( | IN USB_XHCI_INSTANCE * | Xhc, |
EVENT_RING * | EvtRing | ||
) |
Synchronize the specified event ring to update the enqueue and dequeue pointer.
Xhc | The XHCI Instance. |
EvtRing | The event ring to sync. |
EFI_SUCCESS | The event ring is synchronized successfully. |
EFI_STATUS EFIAPI XhcSyncTrsRing | ( | IN USB_XHCI_INSTANCE * | Xhc, |
TRANSFER_RING * | TrsRing | ||
) |
Synchronize the specified transfer ring to update the enqueue and dequeue pointer.
Xhc | The XHCI Instance. |
TrsRing | The transfer ring to sync. |
EFI_SUCCESS | The transfer ring is synchronized successfully. |