TianoCore EDK2 master
Loading...
Searching...
No Matches
DebugCommunicationLibUsb3Pei.c File Reference

Go to the source code of this file.

Functions

EFI_STATUS EFIAPI Usb3IoMmuPpiNotify (IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDesc, IN VOID *Ppi)
 
EFI_STATUS IoMmuAllocateBuffer (IN EDKII_IOMMU_PPI *IoMmu, IN UINTN Pages, OUT VOID **HostAddress, OUT EFI_PHYSICAL_ADDRESS *DeviceAddress, OUT VOID **Mapping)
 
EDKII_IOMMU_PPIUsb3GetIoMmu (VOID)
 
EFI_PHYSICAL_ADDRESSGetUsb3DebugPortInstanceAddrPtr (VOID)
 
VOID * AllocateAlignBuffer (IN UINTN BufferSize)
 

Variables

GUID gUsb3DbgGuid = USB3_DBG_GUID
 
EFI_PEI_NOTIFY_DESCRIPTOR mUsb3IoMmuPpiNotifyDesc
 

Detailed Description

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 DebugCommunicationLibUsb3Pei.c.

Function Documentation

◆ AllocateAlignBuffer()

VOID * AllocateAlignBuffer ( IN UINTN  BufferSize)

Allocate aligned memory for XHC's usage.

Parameters
BufferSizeThe size, in bytes, of the Buffer.
Returns
A pointer to the allocated buffer or NULL if allocation fails.

Definition at line 224 of file DebugCommunicationLibUsb3Pei.c.

◆ GetUsb3DebugPortInstanceAddrPtr()

EFI_PHYSICAL_ADDRESS * GetUsb3DebugPortInstanceAddrPtr ( VOID  )

Return USB3 debug instance address pointer.

Definition at line 179 of file DebugCommunicationLibUsb3Pei.c.

◆ IoMmuAllocateBuffer()

EFI_STATUS IoMmuAllocateBuffer ( IN EDKII_IOMMU_PPI IoMmu,
IN UINTN  Pages,
OUT VOID **  HostAddress,
OUT EFI_PHYSICAL_ADDRESS DeviceAddress,
OUT VOID **  Mapping 
)

Allocates pages that are suitable for an OperationBusMasterCommonBuffer or OperationBusMasterCommonBuffer64 mapping.

Parameters
IoMmuPointer to IOMMU PPI.
PagesThe number of pages to allocate.
HostAddressA pointer to store the base system memory address of the allocated range.
DeviceAddressThe resulting map address for the bus master PCI controller to use to access the hosts HostAddress.
MappingA resulting value to pass to Unmap().
Return values
EFI_SUCCESSThe requested memory pages were allocated.
EFI_UNSUPPORTEDAttributes is unsupported. The only legal attribute bits are MEMORY_WRITE_COMBINE and MEMORY_CACHED.
EFI_INVALID_PARAMETEROne or more parameters are invalid.
EFI_OUT_OF_RESOURCESThe memory pages could not be allocated.

Definition at line 89 of file DebugCommunicationLibUsb3Pei.c.

◆ Usb3GetIoMmu()

EDKII_IOMMU_PPI * Usb3GetIoMmu ( VOID  )

USB3 get IOMMU PPI.

Returns
Pointer to IOMMU PPI.

Definition at line 153 of file DebugCommunicationLibUsb3Pei.c.

◆ Usb3IoMmuPpiNotify()

EFI_STATUS EFIAPI Usb3IoMmuPpiNotify ( IN EFI_PEI_SERVICES **  PeiServices,
IN EFI_PEI_NOTIFY_DESCRIPTOR NotifyDesc,
IN VOID *  Ppi 
)

USB3 IOMMU PPI notify.

Parameters
[in]PeiServicesPointer to PEI Services Table.
[in]NotifyDescPointer to the descriptor for the Notification event that caused this function to execute.
[in]PpiPointer to the PPI data associated with this function.
Return values
EFI_STATUSAlways return EFI_SUCCESS

Definition at line 30 of file DebugCommunicationLibUsb3Pei.c.

Variable Documentation

◆ gUsb3DbgGuid

GUID gUsb3DbgGuid = USB3_DBG_GUID

Definition at line 16 of file DebugCommunicationLibUsb3Pei.c.

◆ mUsb3IoMmuPpiNotifyDesc

EFI_PEI_NOTIFY_DESCRIPTOR mUsb3IoMmuPpiNotifyDesc
Initial value:
= {
(EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
}
EFI_STATUS EFIAPI Usb3IoMmuPpiNotify(IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDesc, IN VOID *Ppi)
EFI_GUID gEdkiiIoMmuPpiGuid

Definition at line 63 of file DebugCommunicationLibUsb3Pei.c.