From: Graeme Gregory graeme.gregory@linaro.org
Add handling for tables from EFI in addition to the handling already present for tables passed via FDT.
Signed-off-by: Graeme Gregory graeme.gregory@linaro.org --- drivers/acpi/plat/arm/boot.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-)
diff --git a/drivers/acpi/plat/arm/boot.c b/drivers/acpi/plat/arm/boot.c index 82b7bd6..67f983f2 100644 --- a/drivers/acpi/plat/arm/boot.c +++ b/drivers/acpi/plat/arm/boot.c @@ -740,19 +740,29 @@ void __init acpi_arm_blob_relocate(void) struct acpi_table_rsdp *rp; struct acpi_table_xsdt *xp; struct acpi_table_fadt *fp; - phys_addr_t paddress; + phys_addr_t paddress = 0; void *vaddress; u32 entries; u32 ii; u64 *tmp;
- if (!acpi_arm_rsdp_info.phys_address && !acpi_arm_rsdp_info.size) { - printk(KERN_ERR "(E) ACPI: failed to find rsdp info\n"); - return; + if (efi_enabled(EFI_CONFIG_TABLES)) { + if (efi.acpi20) + paddress = efi.acpi20; + else if (efi.acpi) + paddress = efi.acpi; + } + + if (!paddress) { + if (acpi_arm_rsdp_info.phys_address) { + paddress = acpi_arm_rsdp_info.phys_address + + ACPI_BLOB_HEADER_SIZE; + } else { + pr_err("ACPI: failed to find rsdp info\n"); + return; + } }
- paddress = acpi_arm_rsdp_info.phys_address; - paddress += ACPI_BLOB_HEADER_SIZE; vaddress = phys_to_virt(paddress);
/* fixups for the rsdp */