summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/acpi/acpi.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/acpi/acpi.c b/src/acpi/acpi.c
index 39eadc3a7f..06aa038caa 100644
--- a/src/acpi/acpi.c
+++ b/src/acpi/acpi.c
@@ -1489,6 +1489,16 @@ unsigned long write_acpi_tables(const unsigned long start)
current = fw;
current = acpi_align_current(current);
if (rsdp->xsdt_address == 0) {
+ acpi_rsdt_t *existing_rsdt = (acpi_rsdt_t *)(uintptr_t)rsdp->rsdt_address;
+
+ /*
+ * Qemu only provides a smaller ACPI 1.0 RSDP, thus
+ * allocate a bigger ACPI 2.0 RSDP structure.
+ */
+ rsdp = (acpi_rsdp_t *)current;
+ current += sizeof(acpi_rsdp_t);
+ coreboot_rsdp = (uintptr_t)rsdp;
+
xsdt = (acpi_xsdt_t *)current;
current += sizeof(acpi_xsdt_t);
current = acpi_align_current(current);
@@ -1497,7 +1507,6 @@ unsigned long write_acpi_tables(const unsigned long start)
* Qemu only creates an RSDT.
* Add an XSDT based on the existing RSDT entries.
*/
- acpi_rsdt_t *existing_rsdt = (acpi_rsdt_t *)(uintptr_t)rsdp->rsdt_address;
acpi_write_rsdp(rsdp, existing_rsdt, xsdt, oem_id);
acpi_write_xsdt(xsdt, oem_id, oem_table_id);
/*
@@ -1537,7 +1546,7 @@ unsigned long write_acpi_tables(const unsigned long start)
acpi_add_table(rsdp, ssdt);
- return fw;
+ return current;
}
dsdt_file = cbfs_map(CONFIG_CBFS_PREFIX "/dsdt.aml", &dsdt_size);