summaryrefslogtreecommitdiff
path: root/src/mainboard/via/epia-m700
diff options
context:
space:
mode:
authorVladimir Serbinenko <phcoder@gmail.com>2014-09-02 00:15:02 +0200
committerVladimir Serbinenko <phcoder@gmail.com>2014-10-18 22:06:25 +0200
commit6c71a684a43dfd05e8d4043039ee0ee621526461 (patch)
treedd603afeca2f4be025de61d836b36f992c0a4abc /src/mainboard/via/epia-m700
parente7ff9d8839b0f7718f208f31bb7e7e504a97c657 (diff)
downloadcoreboot-6c71a684a43dfd05e8d4043039ee0ee621526461.tar.xz
via/vx800: Migrate to collaborative ACPI
Change-Id: I00d0d0e2556d4cd0553a2b3351ace26bf747ff6a Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com> Reviewed-on: http://review.coreboot.org/6944 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/mainboard/via/epia-m700')
-rw-r--r--src/mainboard/via/epia-m700/Kconfig1
-rw-r--r--src/mainboard/via/epia-m700/acpi_tables.c89
2 files changed, 1 insertions, 89 deletions
diff --git a/src/mainboard/via/epia-m700/Kconfig b/src/mainboard/via/epia-m700/Kconfig
index c64f8d282f..7d21038d91 100644
--- a/src/mainboard/via/epia-m700/Kconfig
+++ b/src/mainboard/via/epia-m700/Kconfig
@@ -9,6 +9,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
# Note: For ACPI, you need to use the 'get_dsdt' script and uncomment
# the "select HAVE_ACPI_TABLES" line below.
# select HAVE_ACPI_TABLES
+ # select PER_DEVICE_ACPI_TABLES
select HAVE_OPTION_TABLE
select BOARD_ROMSIZE_KB_512
diff --git a/src/mainboard/via/epia-m700/acpi_tables.c b/src/mainboard/via/epia-m700/acpi_tables.c
index 7d956166b2..c841f2c01e 100644
--- a/src/mainboard/via/epia-m700/acpi_tables.c
+++ b/src/mainboard/via/epia-m700/acpi_tables.c
@@ -113,92 +113,3 @@ unsigned long acpi_fill_srat(unsigned long current)
/* No NUMA, no SRAT. */
return current;
}
-
-#define ALIGN(x,a) __ALIGN_MASK(x,(typeof(x))(a)-1)
-#define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask))
-
-unsigned long write_acpi_tables(unsigned long start)
-{
- unsigned long current;
- acpi_rsdp_t *rsdp;
- acpi_rsdt_t *rsdt;
- acpi_hpet_t *hpet;
- acpi_madt_t *madt;
- acpi_fadt_t *fadt;
- acpi_facs_t *facs;
- acpi_header_t *dsdt;
-#if 0
- acpi_header_t *ssdt;
-#endif
-
- /* Align ACPI tables to 16 byte. */
- 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_dsdt, sizeof(acpi_header_t));
- current += dsdt->length;
- memcpy(dsdt, &AmlCode_dsdt, dsdt->length);
- dsdt->checksum = 0; /* Don't trust iasl 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);
-
- /* If we want to use HPET timers 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);
-
- /* NO MCFG in VX855, no PCI-E. */
-
- printk(BIOS_DEBUG, "ACPI: * HPET\n");
- hpet = (acpi_hpet_t *) current;
- acpi_create_hpet(hpet);
- current += hpet->header.length;
- acpi_add_table(rsdp, hpet);
-
-#if 0
- printk(BIOS_DEBUG, "ACPI: * SSDT\n");
- ssdt = (acpi_header_t *) current;
- memcpy(ssdt, &AmlCode_ssdt, sizeof(acpi_header_t));
- current += ssdt->length;
- memcpy(ssdt, &AmlCode_ssdt, ssdt->length);
- ssdt->checksum = 0; /* Don't trust iasl to get this right. */
- ssdt->checksum = acpi_checksum((u8*)ssdt, ssdt->length);
- acpi_add_table(rsdp, ssdt);
- printk(BIOS_DEBUG, "ACPI: * SSDT @ %08x Length %x\n", ssdt, ssdt->length);
-#endif
-
- printk(BIOS_INFO, "ACPI: done.\n");
- return current;
-}