diff options
Diffstat (limited to 'arch/i386/pci/mmconfig-shared.c')
| -rw-r--r-- | arch/i386/pci/mmconfig-shared.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/arch/i386/pci/mmconfig-shared.c b/arch/i386/pci/mmconfig-shared.c index 747d8c63b0c4..c7cabeed4d7b 100644 --- a/arch/i386/pci/mmconfig-shared.c +++ b/arch/i386/pci/mmconfig-shared.c | |||
| @@ -60,14 +60,19 @@ static const char __init *pci_mmcfg_e7520(void) | |||
| 60 | u32 win; | 60 | u32 win; |
| 61 | pci_conf1_read(0, 0, PCI_DEVFN(0,0), 0xce, 2, &win); | 61 | pci_conf1_read(0, 0, PCI_DEVFN(0,0), 0xce, 2, &win); |
| 62 | 62 | ||
| 63 | pci_mmcfg_config_num = 1; | 63 | win = win & 0xf000; |
| 64 | pci_mmcfg_config = kzalloc(sizeof(pci_mmcfg_config[0]), GFP_KERNEL); | 64 | if(win == 0x0000 || win == 0xf000) |
| 65 | if (!pci_mmcfg_config) | 65 | pci_mmcfg_config_num = 0; |
| 66 | return NULL; | 66 | else { |
| 67 | pci_mmcfg_config[0].address = (win & 0xf000) << 16; | 67 | pci_mmcfg_config_num = 1; |
| 68 | pci_mmcfg_config[0].pci_segment = 0; | 68 | pci_mmcfg_config = kzalloc(sizeof(pci_mmcfg_config[0]), GFP_KERNEL); |
| 69 | pci_mmcfg_config[0].start_bus_number = 0; | 69 | if (!pci_mmcfg_config) |
| 70 | pci_mmcfg_config[0].end_bus_number = 255; | 70 | return NULL; |
| 71 | pci_mmcfg_config[0].address = win << 16; | ||
| 72 | pci_mmcfg_config[0].pci_segment = 0; | ||
| 73 | pci_mmcfg_config[0].start_bus_number = 0; | ||
| 74 | pci_mmcfg_config[0].end_bus_number = 255; | ||
| 75 | } | ||
| 71 | 76 | ||
| 72 | return "Intel Corporation E7520 Memory Controller Hub"; | 77 | return "Intel Corporation E7520 Memory Controller Hub"; |
| 73 | } | 78 | } |
| @@ -108,6 +113,10 @@ static const char __init *pci_mmcfg_intel_945(void) | |||
| 108 | if ((pciexbar & mask) & 0x0fffffffU) | 113 | if ((pciexbar & mask) & 0x0fffffffU) |
| 109 | pci_mmcfg_config_num = 0; | 114 | pci_mmcfg_config_num = 0; |
| 110 | 115 | ||
| 116 | /* Don't hit the APIC registers and their friends */ | ||
| 117 | if ((pciexbar & mask) >= 0xf0000000U) | ||
| 118 | pci_mmcfg_config_num = 0; | ||
| 119 | |||
| 111 | if (pci_mmcfg_config_num) { | 120 | if (pci_mmcfg_config_num) { |
| 112 | pci_mmcfg_config = kzalloc(sizeof(pci_mmcfg_config[0]), GFP_KERNEL); | 121 | pci_mmcfg_config = kzalloc(sizeof(pci_mmcfg_config[0]), GFP_KERNEL); |
| 113 | if (!pci_mmcfg_config) | 122 | if (!pci_mmcfg_config) |
