public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Yao, Jiewen" <jiewen.yao@intel.com>
To: "Zeng, Star" <star.zeng@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: [PATCH 00/11] Add IOMMU PEI support.
Date: Wed, 13 Sep 2017 10:19:10 +0000	[thread overview]
Message-ID: <74D8A39837DF1E4DA445A8C0B3885C503A9ABAA4@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <0C09AFA07DD0434D9E2A0C6AEB0483103B940CE2@shsmsx102.ccr.corp.intel.com>

Good question.

Yes, I think we can put all VTd related components to IntelSiliconPkg/Feature/VTd.
Once we finished the review, I would submit another patch to move all components to the new location.

Thank you
Yao Jiewen


> -----Original Message-----
> From: Zeng, Star
> Sent: Wednesday, September 13, 2017 6:14 PM
> To: Yao, Jiewen <jiewen.yao@intel.com>; edk2-devel@lists.01.org
> Cc: Zeng, Star <star.zeng@intel.com>
> Subject: RE: [edk2] [PATCH 00/11] Add IOMMU PEI support.
> 
> I have been confused by where should new module be put for some time.
> When should a new module be put at XXXPkg/Universal? For example,
> MdeModule/Universal, UefiCpuPkg/Universal, ....
> When should a new module be put at XXXPkg/Feature? For example,
> UefiCpuPkg/Feature.
> When should a new module be put at the root of a package folder? For example,
> UefiCpuPkg/PiSmmCpuDxeSmm, IntelSiliconPkg/IntelVTdDxe, ....
> 
> Is it better or not to put IntelVTdDxe, PlatformVTdSampleDxe and new
> IntelVTdPmrPei, PlatformVTdInfoSamplePei in IntelSiliconPkg/Feature/VTd
> together?
> 
> 
> Thanks,
> Star
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Jiewen
> Yao
> Sent: Friday, September 8, 2017 11:04 PM
> To: edk2-devel@lists.01.org
> Subject: [edk2] [PATCH 00/11] Add IOMMU PEI support.
> 
> This series patch added IOMMU PEI support.
> It is also posted to https://github.com/jyao1/edk2/tree/IoMmuPpi.
> 
> 1) Patch 1 and 2 add EDKII_IOMMU_PPI.
> It is similar to EDKII_IOMMU_PROTOCOL.
> 
> 2) Patch 3 and 4 add Intel VTD PMR register support for DXE phase IntelVTdDxe.
> This is to prepare handle PMR usage in PEI phase.
> 
> 3) Patch 5 and 6 add EDKII_VTD_INFO_PPI.
> This PPI is to provide Intel VTD information in PEI.
> In DXE, the VTd driver can get VTD info from ACPI DMAR table.
> But in PEI, there is no way to get VTD info before.
> VTD_INFO_PPI is added to resolve the problem.
> 
> 4) Patch 7 and 8 add IntelVTdPmrPei driver.
> This driver consumes EDKII_VTD_INFO_PPI and produces IOMMU_PPI.
> It enables VTD PMR register to provide DMA protection.
> The PMR based DMA protection is a simple solution to mark 2 regions can be
> DMA protected.
> The IntelVTdPmrPei allocates a small chunk buffer for DMA and protect the rest
> memory.
> 
> 5) Patch 9 and 10 add a sample VTdInfo PEI driver.
> It provides a sample to show how to report VTd info in PEI phase.
> 
> 6) Patch 11 updates XhciPei driver to consume IOMMU_PPI.
> If the IOMMU_PPI is present, XhciPei will use IOMMU_PPI to allocate DMA
> buffer. Or the XhciPei will still use old way - PeiServiceAllocatePage to allocate
> DRAM as DMA buffer.
> This is the first PEI device driver consuming IOMMU_PPI to show the concept.
> The rest PEI device drivers will be updated in separated patches.
> 
> 
> This series patch is validated on Intel Kabylake Platform.
> 1) We can use XHCI to do file transfer in PEI phase,
> 2) We can still use XHCI in DXE phase, such as shell environment.
> 3) If the device driver does not consume IOMMU_PPI, the DMA fails.
> 
> Jiewen Yao (11):
>   MdeModulePkg/Include: Add IOMMU_PPI.
>   MdeModulePkg/Dec: Add IOMMU_PPI GUID.
>   IntelSiliconPkg/Vtd.h: Add definition for PMR.
>   IntelSiliconPkg/VTdDxe: Disable PMR
>   IntelSiliconPkg/include: Add VTD_INFO PPI.
>   IntelSiliconPkg/dec: Add VTD_INFO PPI GUID
>   IntelSiliconPkg: Add IntelVTdPmrPei.
>   IntelSiliconPkg/dsc: Add IntelVTdPmrPeim.
>   IntelSiliconPkg: Add PlatformVTdInfoSamplePei.
>   IntelSiliconPkg/dsc: Add PlatformVTdInfoSamplePei.
>   MdeModulePkg/XhciPei: Support IoMmu.
> 
>  IntelSiliconPkg/Include/IndustryStandard/Vtd.h
> |   6 +
>  IntelSiliconPkg/Include/Ppi/VtdInfo.h
> |  40 ++
>  IntelSiliconPkg/IntelSiliconPkg.dec
> |   3 +
>  IntelSiliconPkg/IntelSiliconPkg.dsc
> |  10 +
>  IntelSiliconPkg/IntelVTdDxe/VtdReg.c
> |  51 +-
>  IntelSiliconPkg/IntelVTdPmrPei/IntelVTdPmr.c
> | 314 ++++++++++
>  IntelSiliconPkg/IntelVTdPmrPei/IntelVTdPmrPei.c
> | 615 ++++++++++++++++++++
>  IntelSiliconPkg/IntelVTdPmrPei/IntelVTdPmrPei.h
> |  68 +++
>  IntelSiliconPkg/IntelVTdPmrPei/IntelVTdPmrPei.inf
> |  59 ++
>  IntelSiliconPkg/IntelVTdPmrPei/IntelVTdPmrPei.uni
> |  20 +
>  IntelSiliconPkg/IntelVTdPmrPei/IntelVTdPmrPeiExtra.uni
> |  20 +
>  IntelSiliconPkg/PlatformVTdInfoSamplePei/PlatformVTdInfoSamplePei.c
> |  65 +++
>  IntelSiliconPkg/PlatformVTdInfoSamplePei/PlatformVTdInfoSamplePei.inf
> |  51 ++
>  IntelSiliconPkg/PlatformVTdInfoSamplePei/PlatformVTdInfoSamplePei.uni
> |  20 +
>  IntelSiliconPkg/PlatformVTdInfoSamplePei/PlatformVTdInfoSamplePeiExtra.uni
> |  20 +
>  MdeModulePkg/Bus/Pci/XhciPei/DmaMem.c
> | 249 ++++++++
>  MdeModulePkg/Bus/Pci/XhciPei/UsbHcMem.c
> |  55 +-
>  MdeModulePkg/Bus/Pci/XhciPei/UsbHcMem.h
> |   9 +-
>  MdeModulePkg/Bus/Pci/XhciPei/XhcPeim.c
> |  55 +-
>  MdeModulePkg/Bus/Pci/XhciPei/XhcPeim.h
> | 107 ++++
>  MdeModulePkg/Bus/Pci/XhciPei/XhciPei.inf
> |   3 +
>  MdeModulePkg/Bus/Pci/XhciPei/XhciSched.c
> |  47 +-
>  MdeModulePkg/Bus/Pci/XhciPei/XhciSched.h
> |   1 +
>  MdeModulePkg/Include/Ppi/IoMmu.h
> | 196 +++++++
>  MdeModulePkg/MdeModulePkg.dec
> |   3 +
>  25 files changed, 2052 insertions(+), 35 deletions(-)  create mode 100644
> IntelSiliconPkg/Include/Ppi/VtdInfo.h
>  create mode 100644 IntelSiliconPkg/IntelVTdPmrPei/IntelVTdPmr.c
>  create mode 100644 IntelSiliconPkg/IntelVTdPmrPei/IntelVTdPmrPei.c
>  create mode 100644 IntelSiliconPkg/IntelVTdPmrPei/IntelVTdPmrPei.h
>  create mode 100644 IntelSiliconPkg/IntelVTdPmrPei/IntelVTdPmrPei.inf
>  create mode 100644 IntelSiliconPkg/IntelVTdPmrPei/IntelVTdPmrPei.uni
>  create mode 100644 IntelSiliconPkg/IntelVTdPmrPei/IntelVTdPmrPeiExtra.uni
>  create mode 100644
> IntelSiliconPkg/PlatformVTdInfoSamplePei/PlatformVTdInfoSamplePei.c
>  create mode 100644
> IntelSiliconPkg/PlatformVTdInfoSamplePei/PlatformVTdInfoSamplePei.inf
>  create mode 100644
> IntelSiliconPkg/PlatformVTdInfoSamplePei/PlatformVTdInfoSamplePei.uni
>  create mode 100644
> IntelSiliconPkg/PlatformVTdInfoSamplePei/PlatformVTdInfoSamplePeiExtra.uni
>  create mode 100644 MdeModulePkg/Bus/Pci/XhciPei/DmaMem.c
>  create mode 100644 MdeModulePkg/Include/Ppi/IoMmu.h
> 
> --
> 2.7.4.windows.1
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


  reply	other threads:[~2017-09-13 10:16 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-08 15:03 [PATCH 00/11] Add IOMMU PEI support Jiewen Yao
2017-09-08 15:03 ` [PATCH 01/11] MdeModulePkg/Include: Add IOMMU_PPI Jiewen Yao
2017-09-08 15:03 ` [PATCH 02/11] MdeModulePkg/Dec: Add IOMMU_PPI GUID Jiewen Yao
2017-09-08 15:03 ` [PATCH 03/11] IntelSiliconPkg/Vtd.h: Add definition for PMR Jiewen Yao
2017-09-08 15:03 ` [PATCH 04/11] IntelSiliconPkg/VTdDxe: Disable PMR Jiewen Yao
2017-09-14  5:35   ` Zeng, Star
2017-09-14  6:02     ` Yao, Jiewen
2017-09-14  6:10       ` Zeng, Star
2017-09-14  6:15         ` Yao, Jiewen
2017-09-08 15:03 ` [PATCH 05/11] IntelSiliconPkg/include: Add VTD_INFO PPI Jiewen Yao
2017-09-08 15:03 ` [PATCH 06/11] IntelSiliconPkg/dec: Add VTD_INFO PPI GUID Jiewen Yao
2017-09-08 15:03 ` [PATCH 07/11] IntelSiliconPkg: Add IntelVTdPmrPei Jiewen Yao
2017-09-08 15:03 ` [PATCH 08/11] IntelSiliconPkg/dsc: Add IntelVTdPmrPeim Jiewen Yao
2017-09-08 15:03 ` [PATCH 09/11] IntelSiliconPkg: Add PlatformVTdInfoSamplePei Jiewen Yao
2017-09-08 15:03 ` [PATCH 10/11] IntelSiliconPkg/dsc: " Jiewen Yao
2017-09-08 15:03 ` [PATCH 11/11] MdeModulePkg/XhciPei: Support IoMmu Jiewen Yao
2017-09-13 10:13 ` [PATCH 00/11] Add IOMMU PEI support Zeng, Star
2017-09-13 10:19   ` Yao, Jiewen [this message]
2017-09-14  6:32     ` Zeng, Star

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=74D8A39837DF1E4DA445A8C0B3885C503A9ABAA4@shsmsx102.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