summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDavid Woodhouse <David.Woodhouse@intel.com>2009-08-26 14:25:41 +0100
committerDavid Woodhouse <David.Woodhouse@intel.com>2009-08-26 14:25:41 +0100
commit2ff729f5445cc47d1910386c36e53fc6b1c5e47a (patch)
treeb94951ac7215f36399395e0e1f34374251bc0d11 /drivers
parent94a91b5051a77d8a71d4f11a3240f0d9c51b6cf2 (diff)
downloadop-kernel-dev-2ff729f5445cc47d1910386c36e53fc6b1c5e47a.zip
op-kernel-dev-2ff729f5445cc47d1910386c36e53fc6b1c5e47a.tar.gz
intel-iommu: Cope with yet another BIOS screwup causing crashes
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pci/intel-iommu.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
index beb5ccf..d36fa80 100644
--- a/drivers/pci/intel-iommu.c
+++ b/drivers/pci/intel-iommu.c
@@ -1974,6 +1974,17 @@ static int iommu_prepare_identity_map(struct pci_dev *pdev,
printk(KERN_INFO
"IOMMU: Setting identity map for device %s [0x%Lx - 0x%Lx]\n",
pci_name(pdev), start, end);
+
+ if (end >> agaw_to_width(domain->agaw)) {
+ WARN(1, "Your BIOS is broken; RMRR exceeds permitted address width (%d bits)\n"
+ "BIOS vendor: %s; Ver: %s; Product Version: %s\n",
+ agaw_to_width(domain->agaw),
+ dmi_get_system_info(DMI_BIOS_VENDOR),
+ dmi_get_system_info(DMI_BIOS_VERSION),
+ dmi_get_system_info(DMI_PRODUCT_VERSION));
+ ret = -EIO;
+ goto error;
+ }
ret = iommu_domain_identity_map(domain, start, end);
if (ret)
OpenPOWER on IntegriCloud