aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/intel-iommu.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/intel-iommu.c')
-rw-r--r--drivers/pci/intel-iommu.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
index dee88c6cb3ef..4dfce3dad6ab 100644
--- a/drivers/pci/intel-iommu.c
+++ b/drivers/pci/intel-iommu.c
@@ -3761,14 +3761,24 @@ static void __devinit quirk_iommu_rwbf(struct pci_dev *dev)
3761 3761
3762DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2a40, quirk_iommu_rwbf); 3762DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2a40, quirk_iommu_rwbf);
3763 3763
3764#define GGC 0x52
3765#define GGC_MEMORY_SIZE_MASK (0xf << 8)
3766#define GGC_MEMORY_SIZE_NONE (0x0 << 8)
3767#define GGC_MEMORY_SIZE_1M (0x1 << 8)
3768#define GGC_MEMORY_SIZE_2M (0x3 << 8)
3769#define GGC_MEMORY_VT_ENABLED (0x8 << 8)
3770#define GGC_MEMORY_SIZE_2M_VT (0x9 << 8)
3771#define GGC_MEMORY_SIZE_3M_VT (0xa << 8)
3772#define GGC_MEMORY_SIZE_4M_VT (0xb << 8)
3773
3764static void __devinit quirk_calpella_no_shadow_gtt(struct pci_dev *dev) 3774static void __devinit quirk_calpella_no_shadow_gtt(struct pci_dev *dev)
3765{ 3775{
3766 unsigned short ggc; 3776 unsigned short ggc;
3767 3777
3768 if (pci_read_config_word(dev, 0x52, &ggc)) 3778 if (pci_read_config_word(dev, GGC, &ggc))
3769 return; 3779 return;
3770 3780
3771 if (!(ggc & 0x800)) { 3781 if (!(ggc & GGC_MEMORY_VT_ENABLED)) {
3772 printk(KERN_INFO "DMAR: BIOS has allocated no shadow GTT; disabling IOMMU for graphics\n"); 3782 printk(KERN_INFO "DMAR: BIOS has allocated no shadow GTT; disabling IOMMU for graphics\n");
3773 dmar_map_gfx = 0; 3783 dmar_map_gfx = 0;
3774 } 3784 }