summaryrefslogtreecommitdiff
path: root/src/mainboard/via/epia-m
diff options
context:
space:
mode:
authorVladimir Serbinenko <phcoder@gmail.com>2014-09-01 22:52:02 +0200
committerVladimir Serbinenko <phcoder@gmail.com>2014-10-10 20:19:10 +0200
commit9215a89f1cf8dfdb62a6b8a55a2e89e4e322a2d3 (patch)
treead24a7ab04e5d4ec736c00241c5a29d82e8bd298 /src/mainboard/via/epia-m
parent6b330f2a2462a72c2d10940b5e06b99f02b20297 (diff)
via/epia-m: Switch to per-device ACPI
Change-Id: Ic63fc1f933fff5cd58adcd4299c4ac2a62c4bb68 Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com> Reviewed-on: http://review.coreboot.org/6941 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src/mainboard/via/epia-m')
-rw-r--r--src/mainboard/via/epia-m/Kconfig1
-rw-r--r--src/mainboard/via/epia-m/acpi_tables.c56
2 files changed, 1 insertions, 56 deletions
diff --git a/src/mainboard/via/epia-m/Kconfig b/src/mainboard/via/epia-m/Kconfig
index 5b43921d1b..843b7f443c 100644
--- a/src/mainboard/via/epia-m/Kconfig
+++ b/src/mainboard/via/epia-m/Kconfig
@@ -12,6 +12,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
select HAVE_ACPI_TABLES
select BOARD_ROMSIZE_KB_256
select ROMCC
+ select PER_DEVICE_ACPI_TABLES
config MAINBOARD_DIR
string
diff --git a/src/mainboard/via/epia-m/acpi_tables.c b/src/mainboard/via/epia-m/acpi_tables.c
index 20c0e6a1be..d02bac2bc6 100644
--- a/src/mainboard/via/epia-m/acpi_tables.c
+++ b/src/mainboard/via/epia-m/acpi_tables.c
@@ -11,8 +11,6 @@
#include <string.h>
#include <arch/acpi.h>
-extern const unsigned char AmlCode[];
-
unsigned long acpi_fill_mcfg(unsigned long current)
{
/* Nothing to do */
@@ -36,57 +34,3 @@ unsigned long acpi_fill_srat(unsigned long current)
/* No NUMA, no SRAT */
return current;
}
-
-unsigned long write_acpi_tables(unsigned long start)
-{
- unsigned long current;
- acpi_rsdp_t *rsdp;
- acpi_rsdt_t *rsdt;
- acpi_fadt_t *fadt;
- acpi_facs_t *facs;
- acpi_header_t *dsdt;
-
- /* Align ACPI tables to 16byte */
- start = ALIGN(start, 16);
- current = start;
-
- printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
-
- /* We need at least an RSDP and an RSDT Table */
- rsdp = (acpi_rsdp_t *) current;
- current += sizeof(acpi_rsdp_t);
- rsdt = (acpi_rsdt_t *) current;
- current += sizeof(acpi_rsdt_t);
-
- /* clear all table memory */
- memset((void *)start, 0, current - start);
-
- acpi_write_rsdp(rsdp, rsdt, NULL);
- acpi_write_rsdt(rsdt);
-
- /*
- * We explicitly add these tables later on:
- */
- printk(BIOS_DEBUG, "ACPI: * FACS\n");
- facs = (acpi_facs_t *) current;
- current += sizeof(acpi_facs_t);
- acpi_create_facs(facs);
-
- dsdt = (acpi_header_t *)current;
- memcpy(dsdt, &AmlCode, sizeof(acpi_header_t));
- current += dsdt->length;
- memcpy(dsdt, &AmlCode, dsdt->length);
- dsdt->checksum = 0; // don't trust intel iasl compiler to get this right
- dsdt->checksum = acpi_checksum((u8*)dsdt, dsdt->length);
- printk(BIOS_DEBUG, "ACPI: * DSDT @ %p Length %x\n",dsdt,dsdt->length);
- printk(BIOS_DEBUG, "ACPI: * FADT\n");
-
- fadt = (acpi_fadt_t *) current;
- current += sizeof(acpi_fadt_t);
-
- acpi_create_fadt(fadt,facs,dsdt);
- acpi_add_table(rsdp,fadt);
-
- printk(BIOS_INFO, "ACPI: done.\n");
- return current;
-}