TianoCore EDK2 master
|
#include "DebugCommunicationLibUsb3Internal.h"
Go to the source code of this file.
Debug Port Library implementation based on usb3 debug port.
Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file DebugCommunicationLibUsb3Transfer.c.
BOOLEAN IsTrbInTrsRing | ( | IN TRANSFER_RING * | Ring, |
IN TRB_TEMPLATE * | Trb | ||
) |
Check if the Trb is a transaction of the URB.
Ring | The transfer ring to be checked. |
Trb | The TRB to be checked. |
TRUE | It is a transaction of the URB. |
FALSE | It is not any transaction of the URB. |
Definition at line 177 of file DebugCommunicationLibUsb3Transfer.c.
EFI_STATUS EFIAPI XhcCheckNewEvent | ( | IN USB3_DEBUG_PORT_HANDLE * | Handle, |
IN EVENT_RING * | EvtRing, | ||
OUT TRB_TEMPLATE ** | NewEvtTrb | ||
) |
Check if there is a new generated event.
Handle | Debug port handle. |
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 137 of file DebugCommunicationLibUsb3Transfer.c.
VOID XhcCheckUrbResult | ( | IN USB3_DEBUG_PORT_HANDLE * | Handle, |
IN URB * | Urb | ||
) |
Check the URB's execution result and update the URB's result accordingly.
Handle | Debug port handle. |
Urb | The URB to check result. |
Definition at line 209 of file DebugCommunicationLibUsb3Transfer.c.
EFI_STATUS XhcCreateTransferTrb | ( | IN USB3_DEBUG_PORT_HANDLE * | Handle, |
IN URB * | Urb | ||
) |
Create a transfer TRB.
Handle | Debug port handle. |
Urb | The urb used to construct the transfer TRB. |
Definition at line 417 of file DebugCommunicationLibUsb3Transfer.c.
URB * XhcCreateUrb | ( | IN USB3_DEBUG_PORT_HANDLE * | Handle, |
IN EFI_USB_DATA_DIRECTION | Direction, | ||
IN VOID * | Data, | ||
IN UINTN | DataLen | ||
) |
Create a new URB for a new transaction.
Handle | Debug port handle. |
Direction | The direction of data flow. |
Data | The user data to transfer |
DataLen | The length of data buffer |
Definition at line 465 of file DebugCommunicationLibUsb3Transfer.c.
EFI_STATUS EFIAPI XhcDataTransfer | ( | IN USB3_DEBUG_PORT_HANDLE * | Handle, |
IN EFI_USB_DATA_DIRECTION | Direction, | ||
IN OUT VOID * | Data, | ||
IN OUT UINTN * | DataLength, | ||
IN UINTN | Timeout | ||
) |
Submits bulk transfer to a bulk endpoint of a USB device.
Handle | Debug port handle. |
Direction | The direction of data transfer. |
Data | Array of pointers to the buffers of data to transmit from or receive into. |
DataLength | The length of the data buffer. |
Timeout | Indicates the maximum time, in microsecond, which the transfer is allowed to complete. |
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. |
Definition at line 534 of file DebugCommunicationLibUsb3Transfer.c.
Execute the transfer by polling the URB. This is a synchronous operation.
Handle | Debug port handle. |
Urb | The URB to execute. |
Timeout | The time to wait before abort, in microsecond. |
Definition at line 348 of file DebugCommunicationLibUsb3Transfer.c.
EFI_STATUS EFIAPI XhcRingDoorBell | ( | IN USB3_DEBUG_PORT_HANDLE * | Handle, |
IN URB * | Urb | ||
) |
Ring the door bell to notify XHCI there is a transaction to be executed.
Handle | Debug port handle. |
Urb | The pointer to URB. |
EFI_SUCCESS | Successfully ring the door bell. |
Definition at line 318 of file DebugCommunicationLibUsb3Transfer.c.
EFI_STATUS EFIAPI XhcSyncEventRing | ( | IN USB3_DEBUG_PORT_HANDLE * | Handle, |
IN EVENT_RING * | EvtRing | ||
) |
Synchronize the specified event ring to update the enqueue and dequeue pointer.
Handle | Debug port handle. |
EvtRing | The event ring to sync. |
EFI_SUCCESS | The event ring is synchronized successfully. |
Definition at line 86 of file DebugCommunicationLibUsb3Transfer.c.
EFI_STATUS EFIAPI XhcSyncTrsRing | ( | IN USB3_DEBUG_PORT_HANDLE * | Handle, |
IN TRANSFER_RING * | TrsRing | ||
) |
Synchronize the specified transfer ring to update the enqueue and dequeue pointer.
Handle | Debug port handle. |
TrsRing | The transfer ring to sync. |
EFI_SUCCESS | The transfer ring is synchronized successfully. |
Definition at line 21 of file DebugCommunicationLibUsb3Transfer.c.