diff -Napur -X /home/jbarnes/dontdiff linux-2.6.19-mmconfig.orig/arch/i386/pci/mmconfig-shared.c linux-2.6.19-mmconfig/arch/i386/pci/mmconfig-shared.c --- linux-2.6.19-mmconfig.orig/arch/i386/pci/mmconfig-shared.c 2007-01-07 10:10:29.000000000 -0800 +++ linux-2.6.19-mmconfig/arch/i386/pci/mmconfig-shared.c 2007-01-07 10:09:34.000000000 -0800 @@ -71,6 +71,25 @@ static __init const char *pci_mmcfg_e752 return "Intel Corporation E7520 Memory Controller Hub"; } +static __init const char *pci_mmcfg_intel_915(void) +{ + u32 pciexbar, len = 0; + + pci_conf1_read(0, 0, PCI_DEVFN(0,0), 0x48, 4, &pciexbar); + + /* No enable bit or size field, so assume 256M range is enabled. */ + len = 0x10000000U; + pci_mmcfg_config_num = 1; + + pci_mmcfg_config = kzalloc(sizeof(pci_mmcfg_config[0]), GFP_KERNEL); + pci_mmcfg_config[0].base_address = pciexbar; + pci_mmcfg_config[0].pci_segment_group_number = 0; + pci_mmcfg_config[0].start_bus_number = 0; + pci_mmcfg_config[0].end_bus_number = (len >> 20) - 1; + + return "Intel Corporation 915PM/GM/GMS Express Memory Controller Hub"; +} + static __init const char *pci_mmcfg_intel_945(void) { u32 pciexbar, mask = 0, len = 0; @@ -118,6 +137,48 @@ static __init const char *pci_mmcfg_inte return "Intel Corporation 945G/GZ/P/PL Express Memory Controller Hub"; } +static __init const char *pci_mmcfg_intel_965(void) +{ + u64 pciexbar, mask = 0, len = 0; + + pci_mmcfg_config_num = 1; + + pci_conf1_read(0, 0, PCI_DEVFN(0,0), 0x48, 8, &pciexbar); + + /* Enable bit */ + if (!(pciexbar & 1)) + pci_mmcfg_config_num = 0; + + /* Size bits */ + switch ((pciexbar >> 1) & 3) { + case 0: + mask = 0xff0000000UL; + len = 0x10000000U; + break; + case 1: + mask = 0xff8000000UL; + len = 0x08000000U; + break; + case 2: + mask = 0xffc000000UL; + len = 0x04000000U; + break; + default: + pci_mmcfg_config_num = 0; + } + + if (pci_mmcfg_config_num) { + pci_mmcfg_config = kzalloc(sizeof(pci_mmcfg_config[0]), + GFP_KERNEL); + pci_mmcfg_config[0].base_address = pciexbar & mask; + pci_mmcfg_config[0].pci_segment_group_number = 0; + pci_mmcfg_config[0].start_bus_number = 0; + pci_mmcfg_config[0].end_bus_number = (len >> 20) - 1; + } + + return "Intel Corporation G965 Express Memory Controller Hub"; +} + struct pci_mmcfg_hostbridge_probe { u32 vendor; u32 device; @@ -126,7 +187,9 @@ struct pci_mmcfg_hostbridge_probe { static __initdata struct pci_mmcfg_hostbridge_probe pci_mmcfg_probes[] = { { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7520_MCH, pci_mmcfg_e7520 }, + { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82915GM_HB, pci_mmcfg_intel_915 }, { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82945G_HB, pci_mmcfg_intel_945 }, + { PCI_VENDOR_ID_INTEL, 0x29a0, pci_mmcfg_intel_965 }, }; static int __init pci_mmcfg_check_hostbridge(void)