diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-13 11:35:50 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-13 11:35:50 -0700 |
commit | 7b11428d37fe65643172feff66cd0a4d72d1932a (patch) | |
tree | b8eddab4b0170dfa2ff7c208431956efe7a616c0 /drivers/pci/dmar.c | |
parent | b8256b45d1245ad16221e8f965241267bd26c79d (diff) | |
parent | e523b38e2f568af58baa13120a994cbf24e6dee0 (diff) |
Merge git://git.infradead.org/iommu-2.6
* git://git.infradead.org/iommu-2.6:
intel-iommu: Avoid panic() for DRHD at address zero.
Intel-IOMMU Alignment Issue in dma_pte_clear_range()
Diffstat (limited to 'drivers/pci/dmar.c')
-rw-r--r-- | drivers/pci/dmar.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/pci/dmar.c b/drivers/pci/dmar.c index 25a00ce4f24..fa3a11365ec 100644 --- a/drivers/pci/dmar.c +++ b/drivers/pci/dmar.c @@ -173,12 +173,21 @@ dmar_parse_one_drhd(struct acpi_dmar_header *header) struct dmar_drhd_unit *dmaru; int ret = 0; + drhd = (struct acpi_dmar_hardware_unit *)header; + if (!drhd->address) { + /* Promote an attitude of violence to a BIOS engineer today */ + WARN(1, "Your BIOS is broken; DMAR reported at address zero!\n" + "BIOS vendor: %s; Ver: %s; Product Version: %s\n", + dmi_get_system_info(DMI_BIOS_VENDOR), + dmi_get_system_info(DMI_BIOS_VERSION), + dmi_get_system_info(DMI_PRODUCT_VERSION)); + return -ENODEV; + } dmaru = kzalloc(sizeof(*dmaru), GFP_KERNEL); if (!dmaru) return -ENOMEM; dmaru->hdr = header; - drhd = (struct acpi_dmar_hardware_unit *)header; dmaru->reg_base_addr = drhd->address; dmaru->segment = drhd->segment; dmaru->include_all = drhd->flags & 0x1; /* BIT0: INCLUDE_ALL */ |