TianoCore EDK2 master
|
#include <Base.h>
#include <PiDxe.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/HobLib.h>
#include <Protocol/PciIo.h>
#include <Protocol/IoMmu.h>
#include <Protocol/DxeSmmReadyToLock.h>
#include "DebugCommunicationLibUsb3Internal.h"
Go to the source code of this file.
Functions | |
EFI_STATUS EFIAPI | Usb3NamedEventListen (IN CONST EFI_GUID *Name, IN EFI_TPL NotifyTpl, IN EFI_EVENT_NOTIFY NotifyFunction, IN EFI_EVENT *Event) |
VOID | Usb3MapOneDmaBuffer (IN EFI_PCI_IO_PROTOCOL *PciIo, IN EFI_PHYSICAL_ADDRESS Address, IN UINTN NumberOfBytes) |
VOID | Usb3MapDmaBuffers (IN USB3_DEBUG_PORT_HANDLE *Instance, IN EFI_PCI_IO_PROTOCOL *PciIo) |
VOID EFIAPI | Usb3DxeSmmReadyToLockNotify (IN EFI_EVENT Event, IN VOID *Context) |
EDKII_IOMMU_PROTOCOL * | Usb3GetIoMmu (VOID) |
VOID EFIAPI | Usb3PciIoNotify (IN EFI_EVENT Event, IN VOID *Context) |
EFI_PHYSICAL_ADDRESS * | GetUsb3DebugPortInstanceAddrPtr (VOID) |
EFI_STATUS | Usb3AllocateDmaBuffer (IN EFI_PCI_IO_PROTOCOL *PciIo, IN UINTN Pages, OUT VOID **Address) |
VOID * | AllocateAlignBuffer (IN UINTN BufferSize) |
EFI_STATUS EFIAPI | DebugCommunicationUsb3DxeConstructor (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable) |
EFI_STATUS EFIAPI | DebugCommunicationUsb3DxeDestructor (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable) |
Variables | |
GUID | gUsb3DbgGuid = USB3_DBG_GUID |
USB3_DEBUG_PORT_HANDLE | mUsb3Instance = { USB3DBG_UNINITIALIZED } |
EFI_PHYSICAL_ADDRESS | mUsb3InstanceAddr = 0 |
EFI_PHYSICAL_ADDRESS * | mUsb3InstanceAddrPtr = NULL |
EFI_PCI_IO_PROTOCOL * | mUsb3PciIo = NULL |
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 DebugCommunicationLibUsb3Dxe.c.
Allocate aligned memory for XHC's usage.
BufferSize | The size, in bytes, of the Buffer. |
Definition at line 397 of file DebugCommunicationLibUsb3Dxe.c.
EFI_STATUS EFIAPI DebugCommunicationUsb3DxeConstructor | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
The constructor function initialize USB3 debug port.
ImageHandle | The firmware allocated handle for the EFI image. |
SystemTable | A pointer to the EFI System Table. |
EFI_SUCCESS | The constructor always returns EFI_SUCCESS. |
Definition at line 442 of file DebugCommunicationLibUsb3Dxe.c.
EFI_STATUS EFIAPI DebugCommunicationUsb3DxeDestructor | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
The destructor function.
ImageHandle | The firmware allocated handle for the EFI image. |
SystemTable | A pointer to the EFI System Table. |
EFI_SUCCESS | The destructor always returns EFI_SUCCESS. |
Definition at line 517 of file DebugCommunicationLibUsb3Dxe.c.
EFI_PHYSICAL_ADDRESS * GetUsb3DebugPortInstanceAddrPtr | ( | VOID | ) |
Return USB3 debug instance address pointer.
Definition at line 328 of file DebugCommunicationLibUsb3Dxe.c.
EFI_STATUS Usb3AllocateDmaBuffer | ( | IN EFI_PCI_IO_PROTOCOL * | PciIo, |
IN UINTN | Pages, | ||
OUT VOID ** | Address | ||
) |
Allocates pages that are suitable for an OperationBusMasterCommonBuffer or OperationBusMasterCommonBuffer64 mapping.
PciIo | Pointer to PciIo for USB3 debug port. |
Pages | The number of pages to allocate. |
Address | A pointer to store the base system memory address of the allocated range. |
EFI_SUCCESS | The requested memory pages were allocated. |
EFI_UNSUPPORTED | Attributes is unsupported. The only legal attribute bits are MEMORY_WRITE_COMBINE and MEMORY_CACHED. |
EFI_INVALID_PARAMETER | One or more parameters are invalid. |
EFI_OUT_OF_RESOURCES | The memory pages could not be allocated. |
Definition at line 360 of file DebugCommunicationLibUsb3Dxe.c.
Invoke a notification event
[in] | Event | Event whose notification function is being invoked. |
[in] | Context | The pointer to the notification function's context, which is implementation-dependent. |
Definition at line 182 of file DebugCommunicationLibUsb3Dxe.c.
EDKII_IOMMU_PROTOCOL * Usb3GetIoMmu | ( | VOID | ) |
USB3 get IOMMU protocol.
Definition at line 220 of file DebugCommunicationLibUsb3Dxe.c.
VOID Usb3MapDmaBuffers | ( | IN USB3_DEBUG_PORT_HANDLE * | Instance, |
IN EFI_PCI_IO_PROTOCOL * | PciIo | ||
) |
USB3 map DMA buffers.
Instance | Pointer to USB3 debug port instance. |
PciIo | Pointer to PciIo for USB3 debug port. |
Definition at line 124 of file DebugCommunicationLibUsb3Dxe.c.
VOID Usb3MapOneDmaBuffer | ( | IN EFI_PCI_IO_PROTOCOL * | PciIo, |
IN EFI_PHYSICAL_ADDRESS | Address, | ||
IN UINTN | NumberOfBytes | ||
) |
USB3 map one DMA buffer.
PciIo | Pointer to PciIo for USB3 debug port. |
Address | DMA buffer address to be mapped. |
NumberOfBytes | Number of bytes to be mapped. |
Definition at line 92 of file DebugCommunicationLibUsb3Dxe.c.
EFI_STATUS EFIAPI Usb3NamedEventListen | ( | IN CONST EFI_GUID * | Name, |
IN EFI_TPL | NotifyTpl, | ||
IN EFI_EVENT_NOTIFY | NotifyFunction, | ||
IN EFI_EVENT * | Event | ||
) |
Creates a named event that can be signaled.
This function creates an event using NotifyTpl, NotifyFunction. If Name is NULL, then ASSERT(). If NotifyTpl is not a legal TPL value, then ASSERT(). If NotifyFunction is NULL, then ASSERT().
Name | Supplies the GUID name of the event. |
NotifyTpl | Supplies the task priority level of the event notifications. |
NotifyFunction | Supplies the function to notify when the event is signaled. |
Event | A pointer to the event created. |
EFI_SUCCESS | A named event was created. |
EFI_OUT_OF_RESOURCES | There are not enough resource to create the named event. |
Definition at line 44 of file DebugCommunicationLibUsb3Dxe.c.
Invoke a notification event
[in] | Event | Event whose notification function is being invoked. |
[in] | Context | The pointer to the notification function's context, which is implementation-dependent. |
Definition at line 250 of file DebugCommunicationLibUsb3Dxe.c.
GUID gUsb3DbgGuid = USB3_DBG_GUID |
Definition at line 18 of file DebugCommunicationLibUsb3Dxe.c.
USB3_DEBUG_PORT_HANDLE mUsb3Instance = { USB3DBG_UNINITIALIZED } |
Definition at line 20 of file DebugCommunicationLibUsb3Dxe.c.
EFI_PHYSICAL_ADDRESS mUsb3InstanceAddr = 0 |
Definition at line 21 of file DebugCommunicationLibUsb3Dxe.c.
EFI_PHYSICAL_ADDRESS* mUsb3InstanceAddrPtr = NULL |
Definition at line 22 of file DebugCommunicationLibUsb3Dxe.c.
EFI_PCI_IO_PROTOCOL* mUsb3PciIo = NULL |
Definition at line 23 of file DebugCommunicationLibUsb3Dxe.c.