From 20734594f94f048d74d9ee9ce3b7d93c83beb630 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Mon, 1 Sep 2014 22:54:19 +0200 Subject: via/epia-n: Switch to per-device ACPI Change-Id: Ica4d49b9f4f192b1544ba8cbd5f28a4019259be0 Signed-off-by: Vladimir Serbinenko Reviewed-on: http://review.coreboot.org/6942 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich Reviewed-by: Edward O'Callaghan --- src/mainboard/via/epia-n/Kconfig | 1 + src/mainboard/via/epia-n/acpi_tables.c | 68 ---------------------------------- 2 files changed, 1 insertion(+), 68 deletions(-) (limited to 'src') 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 #include "southbridge/via/vt8237r/vt8237r.h" -extern const unsigned char AmlCode[]; - /* * These 8 macros are copied from , 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; -} -- cgit v1.2.3