diff options
Diffstat (limited to 'arch/x86/kernel/acpi/boot.c')
-rw-r--r-- | arch/x86/kernel/acpi/boot.c | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index 817d6a5e115d..f54e0e557cd2 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c | |||
@@ -117,72 +117,6 @@ void __init __acpi_unmap_table(char *map, unsigned long size) | |||
117 | early_iounmap(map, size); | 117 | early_iounmap(map, size); |
118 | } | 118 | } |
119 | 119 | ||
120 | #ifdef CONFIG_PCI_MMCONFIG | ||
121 | |||
122 | static int acpi_mcfg_64bit_base_addr __initdata = FALSE; | ||
123 | |||
124 | /* The physical address of the MMCONFIG aperture. Set from ACPI tables. */ | ||
125 | struct acpi_mcfg_allocation *pci_mmcfg_config; | ||
126 | int pci_mmcfg_config_num; | ||
127 | |||
128 | static int __init acpi_mcfg_oem_check(struct acpi_table_mcfg *mcfg) | ||
129 | { | ||
130 | if (!strcmp(mcfg->header.oem_id, "SGI")) | ||
131 | acpi_mcfg_64bit_base_addr = TRUE; | ||
132 | |||
133 | return 0; | ||
134 | } | ||
135 | |||
136 | int __init acpi_parse_mcfg(struct acpi_table_header *header) | ||
137 | { | ||
138 | struct acpi_table_mcfg *mcfg; | ||
139 | unsigned long i; | ||
140 | int config_size; | ||
141 | |||
142 | if (!header) | ||
143 | return -EINVAL; | ||
144 | |||
145 | mcfg = (struct acpi_table_mcfg *)header; | ||
146 | |||
147 | /* how many config structures do we have */ | ||
148 | pci_mmcfg_config_num = 0; | ||
149 | i = header->length - sizeof(struct acpi_table_mcfg); | ||
150 | while (i >= sizeof(struct acpi_mcfg_allocation)) { | ||
151 | ++pci_mmcfg_config_num; | ||
152 | i -= sizeof(struct acpi_mcfg_allocation); | ||
153 | }; | ||
154 | if (pci_mmcfg_config_num == 0) { | ||
155 | printk(KERN_ERR PREFIX "MMCONFIG has no entries\n"); | ||
156 | return -ENODEV; | ||
157 | } | ||
158 | |||
159 | config_size = pci_mmcfg_config_num * sizeof(*pci_mmcfg_config); | ||
160 | pci_mmcfg_config = kmalloc(config_size, GFP_KERNEL); | ||
161 | if (!pci_mmcfg_config) { | ||
162 | printk(KERN_WARNING PREFIX | ||
163 | "No memory for MCFG config tables\n"); | ||
164 | return -ENOMEM; | ||
165 | } | ||
166 | |||
167 | memcpy(pci_mmcfg_config, &mcfg[1], config_size); | ||
168 | |||
169 | acpi_mcfg_oem_check(mcfg); | ||
170 | |||
171 | for (i = 0; i < pci_mmcfg_config_num; ++i) { | ||
172 | if ((pci_mmcfg_config[i].address > 0xFFFFFFFF) && | ||
173 | !acpi_mcfg_64bit_base_addr) { | ||
174 | printk(KERN_ERR PREFIX | ||
175 | "MMCONFIG not in low 4GB of memory\n"); | ||
176 | kfree(pci_mmcfg_config); | ||
177 | pci_mmcfg_config_num = 0; | ||
178 | return -ENODEV; | ||
179 | } | ||
180 | } | ||
181 | |||
182 | return 0; | ||
183 | } | ||
184 | #endif /* CONFIG_PCI_MMCONFIG */ | ||
185 | |||
186 | #ifdef CONFIG_X86_LOCAL_APIC | 120 | #ifdef CONFIG_X86_LOCAL_APIC |
187 | static int __init acpi_parse_madt(struct acpi_table_header *table) | 121 | static int __init acpi_parse_madt(struct acpi_table_header *table) |
188 | { | 122 | { |