]> git.proxmox.com Git - mirror_edk2.git/commit - MdeModulePkg/MdeModulePkg.dec
MdeModulePkg/Include: Add IOMMU protocol definition.
authorJiewen Yao <jiewen.yao@intel.com>
Sat, 25 Mar 2017 02:53:28 +0000 (10:53 +0800)
committerJiewen Yao <jiewen.yao@intel.com>
Wed, 17 May 2017 08:05:12 +0000 (16:05 +0800)
commitd1fddc4533bf084eff172ff920619197da53b48e
tree2be0705ac019feb1f167adb173f0a58314584ef0
parenta8321feebb6af978478e0da559806602bd2dcc7d
MdeModulePkg/Include: Add IOMMU protocol definition.

This protocol is to abstract DMA access from IOMMU.
1) Intel "DMAR" ACPI table.
2) AMD "IVRS" ACPI table
3) ARM "IORT" ACPI table.

There might be multiple IOMMU engines on one platform.
For example, one for graphic and one for rest PCI devices
(such as ATA/USB).
All IOMMU engines are reported by one ACPI table.

All IOMMU protocol provider should be based upon ACPI table.
This single IOMMU protocol can handle multiple IOMMU engines on one system.

This IOMMU protocol provider can use UEFI device path to distinguish
if the device is graphic or ATA/USB, and find out corresponding
IOMMU engine.

The IOMMU protocol provides 2 capabilities:
A) Set DMA access attribute - such as write/read control.
B) Remap DMA memory - such as remap above 4GiB system memory address
to below 4GiB device address.
It provides AllocateBuffer/FreeBuffer/Map/Unmap for DMA memory.
The remapping can be static (fixed at build time) or dynamic (allocate
at runtime).

4) AMD "SEV" feature.
We can have an AMD SEV specific IOMMU driver to produce IOMMU protocol,
and manage SEV bit.

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Leo Duran <leo.duran@amd.com>
Cc: Brijesh Singh <brijesh.singh@amd.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Previous patch Tested-by: Brijesh Singh <brijesh.singh@amd.com>
Previous patch Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Leo Duran <leo.duran@amd.com>
MdeModulePkg/Include/Protocol/IoMmu.h [new file with mode: 0644]
MdeModulePkg/MdeModulePkg.dec