From: "Ni, Ruiyu" <ruiyu.ni@Intel.com>
To: Star Zeng <star.zeng@intel.com>, edk2-devel@lists.01.org
Cc: Hao Wu <hao.a.wu@intel.com>
Subject: Re: [PATCH V2 0/6] SourceLevelDebugPkg DebugUsb3: Re-Support IOMMU
Date: Wed, 14 Mar 2018 17:47:54 +0800 [thread overview]
Message-ID: <f9c75fd3-8963-cf41-9566-1c6d0c52d4fb@Intel.com> (raw)
In-Reply-To: <1521020038-102684-1-git-send-email-star.zeng@intel.com>
On 3/14/2018 5:33 PM, Star Zeng wrote:
> The patch series is also at
> https://github.com/lzeng14/edk2 DebugCommUsb3AfterIOMMUV2 branch.
>
> Based on the feedbacks from Ray and Hao.
> It is V2 of
> https://lists.01.org/pipermail/edk2-devel/2018-March/022586.html.
> It has no essential difference with V1 about the final code, but
> re-arranges the patches to revert old IOMMU support patches and
> then re-support IOMMU.
>
> de8373fa07f87ca735139bb86c51e2c29fb1d956 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>
>
> Star Zeng (6):
> Revert "DebugUsb3: Check mUsb3Instance before dereferencing it"
> Revert "DebugUsb3: Fix GCC build failures"
> Revert "DebugUsb3: Support IOMMU"
> SourceLevelDebugPkg DebugUsb3: Re-Fix GCC build failures
> SourceLevelDebugPkg DebugCommUsb3: Refine some formats/comments
> SourceLevelDebugPkg DebugUsb3: Re-Support IOMMU
>
> .../DebugCommunicationLibUsb3Common.c | 110 +++++-
> .../DebugCommunicationLibUsb3Dxe.c | 375 ++++++++++++---------
> .../DebugCommunicationLibUsb3Dxe.inf | 11 +-
> .../DebugCommunicationLibUsb3Internal.h | 60 +---
> .../DebugCommunicationLibUsb3Pei.c | 50 ++-
> .../DebugCommunicationLibUsb3Pei.inf | 4 +-
> 6 files changed, 351 insertions(+), 259 deletions(-)
>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
--
Thanks,
Ray
next prev parent reply other threads:[~2018-03-14 9:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-14 9:33 [PATCH V2 0/6] SourceLevelDebugPkg DebugUsb3: Re-Support IOMMU Star Zeng
2018-03-14 9:33 ` [PATCH V2 1/6] Revert "DebugUsb3: Check mUsb3Instance before dereferencing it" Star Zeng
2018-03-14 9:33 ` [PATCH V2 2/6] Revert "DebugUsb3: Fix GCC build failures" Star Zeng
2018-03-14 9:33 ` [PATCH V2 3/6] Revert "DebugUsb3: Support IOMMU" Star Zeng
2018-03-14 9:33 ` [PATCH V2 4/6] SourceLevelDebugPkg DebugUsb3: Re-Fix GCC build failures Star Zeng
2018-03-14 9:33 ` [PATCH V2 5/6] SourceLevelDebugPkg DebugCommUsb3: Refine some formats/comments Star Zeng
2018-03-14 9:33 ` [PATCH V2 6/6] SourceLevelDebugPkg DebugUsb3: Re-Support IOMMU Star Zeng
2018-03-14 9:47 ` Ni, Ruiyu [this message]
2018-03-14 11:35 ` [PATCH V2 0/6] " Wu, Hao A
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f9c75fd3-8963-cf41-9566-1c6d0c52d4fb@Intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox