*/
#include <linux/init.h>
+#include <linux/config.h>
#include <linux/acpi.h>
#include <linux/efi.h>
#include <linux/module.h>
#define BAD_MADT_ENTRY(entry, end) ( \
(!entry) || (unsigned long)entry + sizeof(*entry) > end || \
- ((acpi_table_entry_header *)entry)->length < sizeof(*entry))
+ ((acpi_table_entry_header *)entry)->length != sizeof(*entry))
#define PREFIX "ACPI: "
if (mcfg->config[i].base_reserved) {
printk(KERN_ERR PREFIX
"MMCONFIG not in low 4GB of memory\n");
- kfree(pci_mmcfg_config);
- pci_mmcfg_config_num = 0;
return -ENODEV;
}
}
{
struct acpi_table_madt *madt = NULL;
- if (!phys_addr || !size || !cpu_has_apic)
+ if (!phys_addr || !size)
return -EINVAL;
madt = (struct acpi_table_madt *)__acpi_map_table(phys_addr, size);
static int __init acpi_parse_fadt(unsigned long phys, unsigned long size)
{
- struct fadt_descriptor *fadt = NULL;
+ struct fadt_descriptor_rev2 *fadt = NULL;
- fadt = (struct fadt_descriptor *)__acpi_map_table(phys, size);
+ fadt = (struct fadt_descriptor_rev2 *)__acpi_map_table(phys, size);
if (!fadt) {
printk(KERN_WARNING PREFIX "Unable to map FADT\n");
return 0;
unsigned long rsdp_phys = 0;
if (efi_enabled) {
- if (efi.acpi20 != EFI_INVALID_TABLE_ADDR)
- return efi.acpi20;
- else if (efi.acpi != EFI_INVALID_TABLE_ADDR)
- return efi.acpi;
+ if (efi.acpi20)
+ return __pa(efi.acpi20);
+ else if (efi.acpi)
+ return __pa(efi.acpi);
}
/*
* Scan memory looking for the RSDP signature. First search EBDA (low
{
int count;
- if (!cpu_has_apic)
- return -ENODEV;
-
/*
* Note that the LAPIC address is obtained from the MADT (32-bit value)
* and (optionally) overriden by a LAPIC_ADDR_OVR entry (64-bit value).
return -ENODEV;
}
- if (!cpu_has_apic)
- return -ENODEV;
-
/*
* if "noapic" boot option, don't look for IO-APICs
*/