SourceLevelDebugPkg DebugUsb3: Support IOMMU

For PEI, allocate granted DMA buffer from IOMMU PPI.
For DXE, map DMA buffer by PciIo.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
This commit is contained in:
Star Zeng
2018-01-31 15:17:05 +08:00
parent f4043414da
commit de8373fa07
6 changed files with 843 additions and 130 deletions

View File

@@ -1,7 +1,7 @@
## @file
# Debug Communication Library instance based on usb3 debug port.
#
# Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.<BR>
# Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -21,6 +21,8 @@
MODULE_TYPE = DXE_DRIVER
VERSION_STRING = 1.0
LIBRARY_CLASS = DebugCommunicationLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER SMM_CORE
CONSTRUCTOR = DebugCommunicationUsb3DxeConstructor
DESTRUCTOR = DebugCommunicationUsb3DxeDestructor
#
# The following information is for reference only and not required by the build tools.
@@ -54,7 +56,11 @@
# The value of data buffer size used for USB debug port handle.
# It should be equal to sizeof (USB3_DEBUG_PORT_HANDLE).
gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdDebugPortHandleBufferSize|239 ## SOMETIMES_CONSUMES
gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdDebugPortHandleBufferSize|250 ## SOMETIMES_CONSUMES
[Protocols]
gEfiPciIoProtocolGuid ## CONSUMES
gEdkiiIoMmuProtocolGuid ## CONSUMES
[LibraryClasses]
BaseLib
@@ -65,4 +71,4 @@
UefiBootServicesTableLib
UefiLib
BaseMemoryLib
HobLib