提交 ae7877de 编写于 作者: J Joerg Roedel 提交者: Ingo Molnar

x86, AMD IOMMU: add early detection code

This patch adds code to detect an AMD IOMMU early during boot before the early
detection code of other IOMMUs run.
Signed-off-by: NJoerg Roedel <joerg.roedel@amd.com>
Cc: iommu@lists.linux-foundation.org
Cc: bhavna.sarathy@amd.com
Cc: Sebastian.Biemueller@amd.com
Cc: robert.richter@amd.com
Cc: joro@8bytes.org
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 fe74c9cf
......@@ -769,3 +769,23 @@ int __init amd_iommu_init(void)
goto out;
}
static int __init early_amd_iommu_detect(struct acpi_table_header *table)
{
return 0;
}
void __init amd_iommu_detect(void)
{
if (swiotlb || no_iommu || iommu_detected)
return;
if (amd_iommu_disable)
return;
if (acpi_table_parse("IVRS", early_amd_iommu_detect) == 0) {
iommu_detected = 1;
gart_iommu_aperture_disabled = 1;
gart_iommu_aperture = 0;
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册