summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorVladimir Serbinenko <phcoder@gmail.com>2014-09-01 22:18:01 +0200
committerVladimir Serbinenko <phcoder@gmail.com>2014-12-18 12:17:52 +0100
commit41877d8690c79ce1ff12272d4427e8ff4f5cfc74 (patch)
treed1f9fc5bb5a2fd581b850a7203d53d7514a9088d /src/arch
parentefb2a8f7f378d71f29ee3a1bfac9d9c46c753606 (diff)
i82371eb & qemu: Move to per-device ACPI.
This one is special because qemu is really far from anything real but shares some common features. Change-Id: Ia1631611724a074780e1fece50166730b2ee94ae Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com> Reviewed-on: http://review.coreboot.org/6939 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/x86/boot/acpi.c10
-rw-r--r--src/arch/x86/include/arch/acpi.h2
2 files changed, 12 insertions, 0 deletions
diff --git a/src/arch/x86/boot/acpi.c b/src/arch/x86/boot/acpi.c
index cbe9095ef9..5abc17849b 100644
--- a/src/arch/x86/boot/acpi.c
+++ b/src/arch/x86/boot/acpi.c
@@ -687,6 +687,11 @@ void acpi_create_fadt(acpi_fadt_t *fadt,acpi_facs_t *facs, void *dsdt)
extern const unsigned char AmlCode[];
+unsigned long __attribute__ ((weak)) fw_cfg_acpi_tables(unsigned long start)
+{
+ return 0;
+}
+
#define ALIGN_CURRENT current = (ALIGN(current, 16))
unsigned long write_acpi_tables(unsigned long start)
{
@@ -704,12 +709,17 @@ unsigned long write_acpi_tables(unsigned long start)
acpi_mcfg_t *mcfg;
acpi_madt_t *madt;
struct device *dev;
+ unsigned long fw;
current = start;
/* Align ACPI tables to 16byte */
ALIGN_CURRENT;
+ fw = fw_cfg_acpi_tables(current);
+ if (fw)
+ return fw;
+
printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx.\n", start);
/* We need at least an RSDP and an RSDT Table */
diff --git a/src/arch/x86/include/arch/acpi.h b/src/arch/x86/include/arch/acpi.h
index 9934d0b972..54217b3143 100644
--- a/src/arch/x86/include/arch/acpi.h
+++ b/src/arch/x86/include/arch/acpi.h
@@ -482,6 +482,8 @@ typedef struct acpi_tstate {
u32 status;
} __attribute__ ((packed)) acpi_tstate_t;
+unsigned long fw_cfg_acpi_tables(unsigned long start);
+
/* These are implemented by the target port or north/southbridge. */
unsigned long write_acpi_tables(unsigned long addr);
unsigned long acpi_fill_madt(unsigned long current);