audk/SourceLevelDebugPkg
Star Zeng 75787f6580 SourceLevelDebugPkg DebugUsb3: Re-Support IOMMU
de8373fa07 could not handle two cases.
1. For the case that the USB3 debug port instance and DMA buffers are
from PEI HOB with IOMMU enabled, it was to reallocate the DMA buffers
by AllocateAddress with the memory type accessible by SMM environment.
But reallocating the DMA buffers by AllocateAddress may fail.

2. At S3 resume, after the code is transferred to PiSmmCpuDxeSmm from
S3Resume2Pei, HOB is still needed to be used for DMA operation, but
PiSmmCpuDxeSmm has no way to get the HOB at S3 resume.

The patch is to re-support IOMMU.
For PEI, allocate granted DMA buffer from IOMMU PPI, register IOMMU PPI
notification to reinitialize hardware with granted DMA buffer if IOMMU
PPI is not present yet.
For DXE, map DMA buffer by PciIo in PciIo notification for early DXE,
and register DxeSmmReadyToLock notification to reinitialize hardware
with granted DXE DMA buffer accessible by SMM environment for late DXE.

DebugAgentLib has been managing the instance as Handle in
HOB/SystemTable. The Handle(instance) from DebugAgentLib can be used
directly in DebugCommunicationLibUsb3. Then DebugCommunicationLibUsb3
could get consistent Handle(instance) from DebugAgentLib.

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>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
2018-03-15 14:14:26 +08:00
..
DebugAgentDxe SourceLevelDebugPkg: Convert all .uni files to utf-8 2015-12-15 04:58:48 +00:00
DebugAgentPei SourceLevelDebugPkg: Convert all .uni files to utf-8 2015-12-15 04:58:48 +00:00
Include SourceLevelDebugPkg DebugUsb3: Fix some typos 2018-02-08 16:43:55 +08:00
Library SourceLevelDebugPkg DebugUsb3: Re-Support IOMMU 2018-03-15 14:14:26 +08:00
Readme.txt Correct the location where the HOST software can be downloaded. 2013-03-27 05:50:20 +00:00
SourceLevelDebugPkg.dec SourceLevelDebugPkg DebugUsb3: Fix some typos 2018-02-08 16:43:55 +08:00
SourceLevelDebugPkg.dsc SourceLevelDebugPkg DSC: Add build option to disable deprecated APIs 2016-08-08 11:00:11 +08:00
SourceLevelDebugPkg.uni SourceLevelDebugPkg DebugUsb3: Fix some typos 2018-02-08 16:43:55 +08:00
SourceLevelDebugPkgExtra.uni SourceLevelDebugPkg: Convert all .uni files to utf-8 2015-12-15 04:58:48 +00:00

Readme.txt

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

UDK based firmware on UEFI IA-32 and UEFI x64 platforms can be debugged with
SourceLevelDebugPkg in conjunction with Intel(R) UEFI Development Kit Debugger
Tool (Intel (R) UDK Debugger Tool).

The Intel(R) UDK Debugger Tool and its detailed user manual can be obtained
from: http://www.uefidk.com/develop.