Skip to content

Commit

Permalink
x86, AMD IOMMU: add early detection code
Browse files Browse the repository at this point in the history
This patch adds code to detect an AMD IOMMU early during boot before the early
detection code of other IOMMUs run.

Signed-off-by: Joerg 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: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Joerg Roedel authored and Ingo Molnar committed Jun 27, 2008
1 parent fe74c9c commit ae7877d
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions arch/x86/kernel/amd_iommu_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

0 comments on commit ae7877d

Please sign in to comment.