public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Wu, Hao A" <hao.a.wu@intel.com>
To: "Zeng, Star" <star.zeng@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Ni, Ruiyu" <ruiyu.ni@intel.com>, "Zeng, Star" <star.zeng@intel.com>
Subject: Re: [PATCH V2 0/6] SourceLevelDebugPkg DebugUsb3: Re-Support IOMMU
Date: Wed, 14 Mar 2018 11:35:12 +0000	[thread overview]
Message-ID: <B80AF82E9BFB8E4FBD8C89DA810C6A0931D67474@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <1521020038-102684-1-git-send-email-star.zeng@intel.com>

The series is good to me.
Reviewed-by: Hao Wu <hao.a.wu@intel.com>


Best Regards,
Hao Wu


> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Star
> Zeng
> Sent: Wednesday, March 14, 2018 5:34 PM
> To: edk2-devel@lists.01.org
> Cc: Ni, Ruiyu; Wu, Hao A; Zeng, Star
> Subject: [edk2] [PATCH V2 0/6] SourceLevelDebugPkg DebugUsb3: Re-Support
> IOMMU
> 
> 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(-)
> 
> --
> 2.7.0.windows.1
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


      parent reply	other threads:[~2018-03-14 11:28 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 ` [PATCH V2 0/6] " Ni, Ruiyu
2018-03-14 11:35 ` Wu, Hao A [this message]

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=B80AF82E9BFB8E4FBD8C89DA810C6A0931D67474@SHSMSX104.ccr.corp.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