aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2009-05-20 10:24:21 -0400
committerJoerg Roedel <joerg.roedel@amd.com>2009-05-28 11:53:30 -0400
commit02acc43a294098c2a4cd22cf24e9c988644f9f7f (patch)
treeb87fd425ff56d1378eccb9a10ba4efc6e097ed37 /arch
parent42a698f40a0946f5517308411b9e003ae031414d (diff)
amd-iommu: print ivmd information to dmesg when requested
Add information about device memory mapping requirements for the IOMMU as described in the IVRS ACPI table to the kernel log if amd_iommu_dump was specified on the kernel command line. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/amd_iommu_init.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/x86/kernel/amd_iommu_init.c b/arch/x86/kernel/amd_iommu_init.c
index fe3e6453cbf7..b90a78cfdcb8 100644
--- a/arch/x86/kernel/amd_iommu_init.c
+++ b/arch/x86/kernel/amd_iommu_init.c
@@ -983,6 +983,7 @@ static int __init init_exclusion_range(struct ivmd_header *m)
983static int __init init_unity_map_range(struct ivmd_header *m) 983static int __init init_unity_map_range(struct ivmd_header *m)
984{ 984{
985 struct unity_map_entry *e = 0; 985 struct unity_map_entry *e = 0;
986 char *s;
986 987
987 e = kzalloc(sizeof(*e), GFP_KERNEL); 988 e = kzalloc(sizeof(*e), GFP_KERNEL);
988 if (e == NULL) 989 if (e == NULL)
@@ -991,13 +992,16 @@ static int __init init_unity_map_range(struct ivmd_header *m)
991 switch (m->type) { 992 switch (m->type) {
992 default: 993 default:
993 case ACPI_IVMD_TYPE: 994 case ACPI_IVMD_TYPE:
995 s = "IVMD_TYPEi\t\t\t";
994 e->devid_start = e->devid_end = m->devid; 996 e->devid_start = e->devid_end = m->devid;
995 break; 997 break;
996 case ACPI_IVMD_TYPE_ALL: 998 case ACPI_IVMD_TYPE_ALL:
999 s = "IVMD_TYPE_ALL\t\t";
997 e->devid_start = 0; 1000 e->devid_start = 0;
998 e->devid_end = amd_iommu_last_bdf; 1001 e->devid_end = amd_iommu_last_bdf;
999 break; 1002 break;
1000 case ACPI_IVMD_TYPE_RANGE: 1003 case ACPI_IVMD_TYPE_RANGE:
1004 s = "IVMD_TYPE_RANGE\t\t";
1001 e->devid_start = m->devid; 1005 e->devid_start = m->devid;
1002 e->devid_end = m->aux; 1006 e->devid_end = m->aux;
1003 break; 1007 break;
@@ -1006,6 +1010,13 @@ static int __init init_unity_map_range(struct ivmd_header *m)
1006 e->address_end = e->address_start + PAGE_ALIGN(m->range_length); 1010 e->address_end = e->address_start + PAGE_ALIGN(m->range_length);
1007 e->prot = m->flags >> 1; 1011 e->prot = m->flags >> 1;
1008 1012
1013 DUMP_printk("%s devid_start: %02x:%02x.%x devid_end: %02x:%02x.%x"
1014 " range_start: %016llx range_end: %016llx flags: %x\n", s,
1015 PCI_BUS(e->devid_start), PCI_SLOT(e->devid_start),
1016 PCI_FUNC(e->devid_start), PCI_BUS(e->devid_end),
1017 PCI_SLOT(e->devid_end), PCI_FUNC(e->devid_end),
1018 e->address_start, e->address_end, m->flags);
1019
1009 list_add_tail(&e->list, &amd_iommu_unity_map); 1020 list_add_tail(&e->list, &amd_iommu_unity_map);
1010 1021
1011 return 0; 1022 return 0;