From 8db0cfefd16c9aa6dbc0ffdfd9d2ba81a1561650 Mon Sep 17 00:00:00 2001 From: Rudolf Marek Date: Tue, 3 Feb 2009 22:37:22 +0000 Subject: Following patch converts the run-time SSDT patching via update_ssdt funtion to new AML code generator. Compile-tested on all changed targets. I think it should work because it works for Asus M2V-MX SE. Signed-off-by: Rudolf Marek Acked-by: Carl-Daniel Hailfinger git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3929 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/mainboard/iwill/dk8_htx/acpi_tables.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'src/mainboard/iwill') diff --git a/src/mainboard/iwill/dk8_htx/acpi_tables.c b/src/mainboard/iwill/dk8_htx/acpi_tables.c index 1f891dae08..c382e3e298 100644 --- a/src/mainboard/iwill/dk8_htx/acpi_tables.c +++ b/src/mainboard/iwill/dk8_htx/acpi_tables.c @@ -16,6 +16,7 @@ #include #include #include +#include <../../../northbridge/amd/amdk8/amdk8_acpi.h> #include "mb_sysconf.h" @@ -38,7 +39,6 @@ static void dump_mem(unsigned start, unsigned end) #endif extern unsigned char AmlCode[]; -extern unsigned char AmlCode_ssdt[]; #if ACPI_SSDTX_NUM >= 1 extern unsigned char AmlCode_ssdt2[]; @@ -159,8 +159,6 @@ unsigned long acpi_fill_madt(unsigned long current) extern void get_bus_conf(void); -extern void update_ssdt(void *ssdt); - void update_ssdtx(void *ssdtx, int i) { uint8_t *PCI; @@ -184,6 +182,11 @@ void update_ssdtx(void *ssdtx, int i) } +unsigned long acpi_fill_ssdt_generator(unsigned long current, char *oem_table_id) { + k8acpi_write_vars(); + return (unsigned long) (acpigen_get_current()); +} + unsigned long write_acpi_tables(unsigned long start) { unsigned long current; @@ -258,14 +261,10 @@ unsigned long write_acpi_tables(unsigned long start) /* SSDT */ printk_debug("ACPI: * SSDT\n"); ssdt = (acpi_header_t *)current; - current += ((acpi_header_t *)AmlCode_ssdt)->length; - memcpy((void *)ssdt, (void *)AmlCode_ssdt, ((acpi_header_t *)AmlCode_ssdt)->length); - //Here you need to set value in pci1234, sblk and sbdn in get_bus_conf.c - update_ssdt((void*)ssdt); - /* recalculate checksum */ - ssdt->checksum = 0; - ssdt->checksum = acpi_checksum((unsigned char *)ssdt,ssdt->length); - acpi_add_table(rsdt,ssdt); + + acpi_create_ssdt_generator(ssdt, "DYNADATA"); + current += ssdt->length; + acpi_add_table(rsdt, ssdt); #if ACPI_SSDTX_NUM >= 1 -- cgit v1.2.3