summaryrefslogtreecommitdiff
path: root/src/mainboard/via
diff options
context:
space:
mode:
authorVladimir Serbinenko <phcoder@gmail.com>2014-09-01 22:54:19 +0200
committerVladimir Serbinenko <phcoder@gmail.com>2014-12-04 08:59:16 +0100
commit20734594f94f048d74d9ee9ce3b7d93c83beb630 (patch)
tree102d85e7cb296076cda4c661db10619296f8b848 /src/mainboard/via
parent5cb29b8f34feba617a358639eacc4f8d3d15b135 (diff)
via/epia-n: Switch to per-device ACPI
Change-Id: Ica4d49b9f4f192b1544ba8cbd5f28a4019259be0 Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com> Reviewed-on: http://review.coreboot.org/6942 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com> Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Diffstat (limited to 'src/mainboard/via')
-rw-r--r--src/mainboard/via/epia-n/Kconfig1
-rw-r--r--src/mainboard/via/epia-n/acpi_tables.c68
2 files changed, 1 insertions, 68 deletions
diff --git a/src/mainboard/via/epia-n/Kconfig b/src/mainboard/via/epia-n/Kconfig
index 3ea6878df9..9b30bebf6e 100644
--- a/src/mainboard/via/epia-n/Kconfig
+++ b/src/mainboard/via/epia-n/Kconfig
@@ -13,6 +13,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
select HAVE_ACPI_TABLES
select BOARD_ROMSIZE_KB_512
select ROMCC
+ select PER_DEVICE_ACPI_TABLES
config MAINBOARD_DIR
string
diff --git a/src/mainboard/via/epia-n/acpi_tables.c b/src/mainboard/via/epia-n/acpi_tables.c
index 82dac53b72..a48a438673 100644
--- a/src/mainboard/via/epia-n/acpi_tables.c
+++ b/src/mainboard/via/epia-n/acpi_tables.c
@@ -36,8 +36,6 @@
#include <device/pci_ids.h>
#include "southbridge/via/vt8237r/vt8237r.h"
-extern const unsigned char AmlCode[];
-
/*
* These 8 macros are copied from <arch/smp/mpspec.h>, I have to do this
* since the "CONFIG_GENERATE_MP_TABLE = 0", and also since
@@ -117,69 +115,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_madt_t *madt;
- 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");
- current = ALIGN(current, 64);
- facs = (acpi_facs_t *) current;
- current += sizeof(acpi_facs_t);
- acpi_create_facs(facs);
-
- printk(BIOS_DEBUG, "ACPI: * DSDT\n");
- dsdt = (acpi_header_t *)current;
- memcpy(dsdt, &AmlCode, sizeof(acpi_header_t));
- current += dsdt->length;
- memcpy(dsdt, &AmlCode, dsdt->length);
-#if 0
- dsdt->checksum = 0; // don't trust intel iasl compiler to get this right
- dsdt->checksum = acpi_checksum(dsdt,dsdt->length);
-#endif
- 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);
-
- /* If we want IOAPIC Support Linux wants it in MADT. */
- printk(BIOS_DEBUG, "ACPI: * MADT\n");
- madt = (acpi_madt_t *) current;
- acpi_create_madt(madt);
- current += madt->header.length;
- acpi_add_table(rsdp, madt);
-
- printk(BIOS_INFO, "ACPI: done.\n");
- return current;
-}