[edk2] [PATCH 1/3] MdeModulePkg/Include: Add IOMMU protocol definition.

2017-03-25 Thread Jiewen Yao
This protocol is to abstract IOMMU access. Cc: Ruiyu Ni Cc: Leo Duran Cc: Brijesh Singh Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao --- MdeModulePkg/Include/Protocol/IoMmu.h | 132 MdeModulePkg/MdeModulePkg.dec | 3 + 2 file

[edk2] [RFC] [PATCH 3/3] MdeModulePkg/PciBus: Add IOMMU support.

2017-03-25 Thread Jiewen Yao
The responsibility of PciBus driver is to set IOMMU attribute, because only PciBus knows which device submits DMA access request. PciBus driver assumes that PciHostBridge driver can allocate IOMMU page aligned memory, if IOMMU protocol exists. Cc: Ruiyu Ni Cc: Leo Duran Cc: Brijesh Singh Contr

[edk2] [RFC] [PATCH 0/3] Add IOMMU support.

2017-03-25 Thread Jiewen Yao
This patch series adds IOMMU protocol and updates the consumer to support IOMMU based DMA access in UEFI. This patch series can support the BmDmaLib request for AMD SEV. submitted by Duran, Leo and Brijesh Singh . https://lists.01.org/pipermail/edk2-devel/2017-March/008109.html, and https://list

[edk2] [RFC] [PATCH 2/3] MdeModulePkg/PciHostBridge: Add IOMMU support.

2017-03-25 Thread Jiewen Yao
The responsibility of PciHostBridge is to allocate IOMMU page aligned memory for Map and AllocateBuffer, because PciHostBridge driver already handles Map() request to allocate another buffer for DMA read/write. PciHostBridge does not set IOMMU attribute because it does not know which device reques