On Thu, May 14, 2009 at 12:48 PM, Myles Watson <[email protected]> wrote:
>
>
>> -----Original Message-----
>> From: Patrick Georgi [mailto:[email protected]]
>> Sent: Thursday, May 14, 2009 11:13 AM
>> To: Myles Watson
>> Cc: coreboot
>> Subject: Re: [coreboot] [PATCH] Table code cleanup
>>
>> Am 14.05.2009 18:46, schrieb Myles Watson:
>> > On Thu, May 14, 2009 at 9:33 AM, Myles Watson<[email protected]> wrote:
>> >> Sorry to be dense. Could we do this in terms of which tables we want
>> in
>> >> each place?
>> >>
>> >> Page0 (low_table_start):
>> >> COREBOOT TABLE
>> >>
>> >> 0xf0000 (rom_table):
>> >> PIRQ
>> >> MPTABLE (with floating table)
>> >> ACPI bulk
>> >>
>> >> 0x7fff0000 (high_tables):
>> >> PIRQ
>> >> MPTABLE
>> >> ACPI bulk
>> >
>> > That was less than clear :)
>> In general, I agree with that table.
>> The constraints are:
>>
>> - MPTABLE must be two complete copies (because of Linux)
>>
>> - ACPI must be one copy (because there needs to be a single address for
>> some objects) with two RSDPs (see below).
>
> What about gdt? It ends up in two places now, but never in fseg. Why do we
> copy it to high_tables?
OK. Try this one :)
I added a parameter to write_acpi_tables called rsdp2. If it is
non-zero write an rsdp there.
I also assumed that one copy of gdt is enough and put it in low_tables.
abuild-tested and boot tested on Tyan s2892 and SimNOW.
Signed-off-by: Myles Watson <[email protected]>
Thanks,
Myles
Index: svn/src/arch/i386/boot/tables.c
===================================================================
--- svn.orig/src/arch/i386/boot/tables.c
+++ svn/src/arch/i386/boot/tables.c
@@ -57,37 +57,41 @@ void move_gdt(unsigned long newgdt)
printk_debug("ok\n");
}
+unsigned long write_common_tables(unsigned long start)
+{
+ unsigned long table_end = start;
+
+ /* This table must be betweeen 0xf0000 & 0x100000 */
+ table_end = write_pirq_routing_table(table_end);
+ table_end = (table_end + 1023) & ~1023;
+
+ /* copy the smp block to address 0 */
+ post_code(0x96);
+
+#if HAVE_MP_TABLE == 1
+ /* The smp table must be in 0-1K, 639K-640K, or 960K-1M */
+ /* Put it in the largest spot (960K-1M). */
+ smp_write_floating_table_physaddr(table_end, table_end +
+ SMP_FLOATING_TABLE_LEN);
+ table_end = write_smp_table(table_end);
+ table_end = (table_end + 1023) & ~1023;
+#endif /* HAVE_MP_TABLE */
+
+ return table_end;
+}
+
#if HAVE_HIGH_TABLES == 1
uint64_t high_tables_base = 0;
uint64_t high_tables_size;
#endif
+/* HIGH_TABLES means a table in very low memory + at the end of RAM. */
+/* LOW_TABLES means a table in very low memory + at 0xf0000 (rom_table_*). */
struct lb_memory *write_tables(void)
{
unsigned long low_table_start, low_table_end;
- unsigned long rom_table_start, rom_table_end;
-#if HAVE_MP_TABLE == 1 && HAVE_LOW_TABLES == 1
- unsigned long new_low_table_end;
-#endif
-
-#if HAVE_HIGH_TABLES == 1
- /* Even if high tables are configured, all tables are copied both to the
- * low and the high area, so payloads and OSes don't need to know about
- * the high tables.
- */
- unsigned long high_table_start=0, high_table_end=0;
-
- if (high_tables_base) {
- printk_debug("High Tables Base is %llx.\n", high_tables_base);
- high_table_start = high_tables_base;
- high_table_end = high_tables_base;
- } else {
- printk_debug("High Tables Base is not set.\n");
- }
-#endif
+ unsigned long table_start, table_end;
- rom_table_start = 0xf0000;
- rom_table_end = 0xf0000;
/* Start low addr at 16 bytes instead of 0 because of a buglet
* in the generic linux unzip code, as it tests for the a20 line.
*/
@@ -96,127 +100,53 @@ struct lb_memory *write_tables(void)
post_code(0x9a);
-#if HAVE_LOW_TABLES == 1
- /* This table must be betweeen 0xf0000 & 0x100000 */
- rom_table_end = write_pirq_routing_table(rom_table_end);
- rom_table_end = (rom_table_end + 1023) & ~1023;
-#endif
-#if HAVE_HIGH_TABLES == 1
- if (high_tables_base) {
- high_table_end = write_pirq_routing_table(high_table_end);
- high_table_end = (high_table_end + 1023) & ~1023;
+ if (low_table_end < 0x500) {
+ low_table_end = 0x500;
}
-#endif
- /* Write ACPI tables */
- /* write them in the rom area because DSDT can be large (8K on epia-m) which
- * pushes coreboot table out of first 4K if set up in low table area
- */
-#if HAVE_ACPI_TABLES == 1
+ table_start = 0xf0000;
+ table_end = write_common_tables(0xf0000);
+
#if HAVE_HIGH_TABLES == 1
-#if HAVE_LOW_TABLES == 1
- unsigned long high_rsdp=ALIGN(high_table_end, 16);
-#endif
+ unsigned long high_table_start=0, high_table_end=0;
+
if (high_tables_base) {
- high_table_end = write_acpi_tables(high_table_end);
- high_table_end = (high_table_end+1023) & ~1023;
- }
-#if HAVE_LOW_TABLES == 1
- unsigned long rsdt_location=(unsigned long*)(((acpi_rsdp_t*)high_rsdp)->rsdt_address);
- acpi_write_rsdp(rom_table_end, rsdt_location);
- rom_table_end = ALIGN(ALIGN(rom_table_end, 16) + sizeof(acpi_rsdp_t), 16);
+ printk_debug("High Tables Base is %llx.\n", high_tables_base);
+ high_table_start = high_tables_base;
+ high_table_end = write_common_tables(high_table_start);
+#if HAVE_ACPI_TABLES == 1
+ /* Write ACPI tables, with second rsdp in fseg. */
+ high_table_end = write_acpi_tables(high_table_end, table_end);
+ high_table_end = (high_table_end + 1023) & ~1023;
#endif
+ /* Switch table_start to high tables. */
+ table_start = high_table_start;
+ table_end = high_table_end;
+ } else
+ printk_err("ERROR: No high_tables_base.\n");
#else
-#if HAVE_LOW_TABLES == 1
- rom_table_end = write_acpi_tables(rom_table_end);
- rom_table_end = (rom_table_end+1023) & ~1023;
-#endif
-#endif
-#endif
- /* copy the smp block to address 0 */
- post_code(0x96);
-
-#if HAVE_MP_TABLE == 1
- /* The smp table must be in 0-1K, 639K-640K, or 960K-1M */
-#if HAVE_LOW_TABLES == 1
- new_low_table_end = write_smp_table(low_table_end); // low_table_end is 0x10 at this point
- /* Don't write anything in the traditional x86 BIOS data segment,
- * for example the linux kernel smp need to use 0x467 to pass reset vector
- * or use 0x40e/0x413 for EBDA finding...
- */
- if(new_low_table_end>0x400){
- unsigned mptable_size;
- unsigned mpc_start;
- low_table_end += SMP_FLOATING_TABLE_LEN; /* keep the mpf in 1k low, so kernel can find it */
- mptable_size = new_low_table_end - low_table_end;
- /* We can not put mptable low, we need to copy them to somewhere else*/
- if((rom_table_end+mptable_size)<0x100000) {
- /* We can copy mptable on rom_table */
- mpc_start = rom_table_end;
- rom_table_end += mptable_size;
- rom_table_end = (rom_table_end+1023) & ~1023;
- } else {
- /* We can need to put mptable before rom_table */
- mpc_start = rom_table_start - mptable_size;
- mpc_start &= ~1023;
- rom_table_start = mpc_start;
- }
- printk_debug("move mptable from 0x%0lx to 0x%0x, size 0x%0x\n", low_table_end, mpc_start, mptable_size);
- memcpy((unsigned char *)mpc_start, (unsigned char *)low_table_end, mptable_size);
- smp_write_floating_table_physaddr(low_table_end - SMP_FLOATING_TABLE_LEN, mpc_start);
- memset((unsigned char *)low_table_end, '\0', mptable_size);
- }
-#endif /* HAVE_LOW_TABLES */
-
-#if HAVE_HIGH_TABLES == 1
- if (high_tables_base) {
- high_table_end = write_smp_table(high_table_end);
- high_table_end = (high_table_end+1023) & ~1023;
- }
+#if HAVE_ACPI_TABLES == 1
+ /* Write ACPI tables */
+ table_end = write_acpi_tables(table_end, 0);
+ table_end = (table_end + 1023) & ~1023;
#endif
-#endif /* HAVE_MP_TABLE */
- if (low_table_end < 0x500) {
- low_table_end = 0x500;
- }
+#endif /* HAVE_HIGH_TABLES */
- // Relocate the GDT to reserved memory, so it won't get clobbered
-#if HAVE_HIGH_TABLES == 1
- if (high_tables_base) {
- move_gdt(high_table_end);
- high_table_end += &gdt_end - &gdt;
- high_table_end = (high_table_end+1023) & ~1023;
- } else {
-#endif
- move_gdt(low_table_end);
- low_table_end += &gdt_end - &gdt;
-#if HAVE_HIGH_TABLES == 1
- }
-#endif
+ /* Relocate the GDT to reserved memory, so it won't get clobbered. */
+ move_gdt(low_table_end);
+ low_table_end += &gdt_end - &gdt;
+ low_table_end = (low_table_end + 1023) & ~1023;
#if CONFIG_MULTIBOOT
/* The Multiboot information structure */
- mbi = (struct multiboot_info *)rom_table_end;
- rom_table_end = write_multiboot_info(
- low_table_start, low_table_end,
- rom_table_start, rom_table_end);
+ table_end = write_multiboot_info(low_table_start, low_table_end,
+ table_start, table_end);
#endif
-#if HAVE_HIGH_TABLES == 1
- if (high_tables_base) {
- write_coreboot_table(low_table_start, low_table_end,
- high_table_start, high_table_end);
- } else {
- printk_err("ERROR: No high_tables_base.\n");
- write_coreboot_table(low_table_start, low_table_end,
- rom_table_start, rom_table_end);
- }
-#else
- /* The coreboot table must be in 0-4K or 960K-1M */
write_coreboot_table(low_table_start, low_table_end,
- rom_table_start, rom_table_end);
-#endif
-
+ table_start, table_end);
+
return get_lb_mem();
}
Index: svn/src/arch/i386/boot/coreboot_table.c
===================================================================
--- svn.orig/src/arch/i386/boot/coreboot_table.c
+++ svn/src/arch/i386/boot/coreboot_table.c
@@ -429,9 +429,8 @@ unsigned long write_coreboot_table(
low_table_end);
head = lb_table_init(low_table_end);
lb_forward(head, (struct lb_header*)rom_table_end);
- lb_table_fini(head, 0);
- low_table_end = (unsigned long)head;
+ low_table_end = (unsigned long) lb_table_fini(head, 0);
printk_debug("New low_table_end: 0x%08lx\n", low_table_end);
printk_debug("Now going to write high coreboot table at 0x%08lx\n",
rom_table_end);
Index: svn/src/arch/i386/include/arch/acpi.h
===================================================================
--- svn.orig/src/arch/i386/include/arch/acpi.h
+++ svn/src/arch/i386/include/arch/acpi.h
@@ -325,7 +325,7 @@ typedef struct acpi_facs {
} __attribute__ ((packed)) acpi_facs_t;
/* These are implemented by the target port */
-unsigned long write_acpi_tables(unsigned long addr);
+unsigned long write_acpi_tables(unsigned long addr, unsigned long rsdp2);
unsigned long acpi_fill_madt(unsigned long current);
unsigned long acpi_fill_mcfg(unsigned long current);
unsigned long acpi_fill_srat(unsigned long current);
@@ -392,7 +392,7 @@ do {
#else // HAVE_ACPI_TABLES
-#define write_acpi_tables(start) (start)
+#define write_acpi_tables(start, rsdp2) (start, rsdp2)
#endif
Index: svn/src/mainboard/amd/dbm690t/acpi_tables.c
===================================================================
--- svn.orig/src/mainboard/amd/dbm690t/acpi_tables.c
+++ svn/src/mainboard/amd/dbm690t/acpi_tables.c
@@ -129,7 +129,7 @@ unsigned long acpi_fill_ssdt_generator(u
return (unsigned long) (acpigen_get_current());
}
-unsigned long write_acpi_tables(unsigned long start)
+unsigned long write_acpi_tables(unsigned long start, unsigned long rsdp2)
{
unsigned long current;
acpi_rsdp_t *rsdp;
@@ -159,6 +159,8 @@ unsigned long write_acpi_tables(unsigned
memset((void *)start, 0, current - start);
acpi_write_rsdp(rsdp, rsdt);
+ if (rsdp2)
+ acpi_write_rsdp(ALIGN(rsdp2,16), rsdt);
acpi_write_rsdt(rsdt);
/*
Index: svn/src/mainboard/amd/pistachio/acpi_tables.c
===================================================================
--- svn.orig/src/mainboard/amd/pistachio/acpi_tables.c
+++ svn/src/mainboard/amd/pistachio/acpi_tables.c
@@ -129,7 +129,7 @@ unsigned long acpi_fill_ssdt_generator(u
return (unsigned long) (acpigen_get_current());
}
-unsigned long write_acpi_tables(unsigned long start)
+unsigned long write_acpi_tables(unsigned long start, unsigned long rsdp2)
{
unsigned long current;
acpi_rsdp_t *rsdp;
@@ -159,6 +159,8 @@ unsigned long write_acpi_tables(unsigned
memset((void *)start, 0, current - start);
acpi_write_rsdp(rsdp, rsdt);
+ if (rsdp2)
+ acpi_write_rsdp(ALIGN(rsdp2,16), rsdt);
acpi_write_rsdt(rsdt);
/*
@@ -253,7 +255,6 @@ unsigned long write_acpi_tables(unsigned
dsdt = (acpi_header_t *) current;
memcpy((void *)dsdt, (void *)AmlCode,
((acpi_header_t *) AmlCode)->length);
-
current += dsdt->length;
printk_debug("ACPI: * DSDT @ %p Length %x\n", dsdt, dsdt->length);
/* FADT */
Index: svn/src/mainboard/amd/serengeti_cheetah/acpi_tables.c
===================================================================
--- svn.orig/src/mainboard/amd/serengeti_cheetah/acpi_tables.c
+++ svn/src/mainboard/amd/serengeti_cheetah/acpi_tables.c
@@ -184,7 +184,7 @@ unsigned long acpi_fill_ssdt_generator(u
return (unsigned long) (acpigen_get_current());
}
-unsigned long write_acpi_tables(unsigned long start)
+unsigned long write_acpi_tables(unsigned long start, unsigned long rsdp2)
{
unsigned long current;
acpi_rsdp_t *rsdp;
@@ -220,8 +220,10 @@ unsigned long write_acpi_tables(unsigned
/* clear all table memory */
memset((void *)start, 0, current - start);
-
+
acpi_write_rsdp(rsdp, rsdt);
+ if (rsdp2)
+ acpi_write_rsdp(ALIGN(rsdp2,16), rsdt);
acpi_write_rsdt(rsdt);
/*
Index: svn/src/mainboard/amd/serengeti_cheetah_fam10/acpi_tables.c
===================================================================
--- svn.orig/src/mainboard/amd/serengeti_cheetah_fam10/acpi_tables.c
+++ svn/src/mainboard/amd/serengeti_cheetah_fam10/acpi_tables.c
@@ -188,7 +188,7 @@ void update_ssdtx(void *ssdtx, int i)
}
-unsigned long write_acpi_tables(unsigned long start)
+unsigned long write_acpi_tables(unsigned long start, unsigned long rsdp2)
{
unsigned long current;
acpi_rsdp_t *rsdp;
@@ -224,6 +224,8 @@ unsigned long write_acpi_tables(unsigned
memset((void *)start, 0, current - start);
acpi_write_rsdp(rsdp, rsdt);
+ if (rsdp2)
+ acpi_write_rsdp(ALIGN(rsdp2,16), rsdt);
acpi_write_rsdt(rsdt);
/*
Index: svn/src/mainboard/asus/a8v-e_se/acpi_tables.c
===================================================================
--- svn.orig/src/mainboard/asus/a8v-e_se/acpi_tables.c
+++ svn/src/mainboard/asus/a8v-e_se/acpi_tables.c
@@ -80,7 +80,7 @@ unsigned long acpi_fill_madt(unsigned lo
return current;
}
-unsigned long write_acpi_tables(unsigned long start)
+unsigned long write_acpi_tables(unsigned long start, unsigned long rsdp2)
{
unsigned long current;
acpi_rsdp_t *rsdp;
@@ -109,6 +109,8 @@ unsigned long write_acpi_tables(unsigned
memset((void *) start, 0, current - start);
acpi_write_rsdp(rsdp, rsdt);
+ if (rsdp2)
+ acpi_write_rsdp(ALIGN(rsdp2,16), rsdt);
acpi_write_rsdt(rsdt);
/* We explicitly add these tables later on: */
Index: svn/src/mainboard/asus/m2v-mx_se/acpi_tables.c
===================================================================
--- svn.orig/src/mainboard/asus/m2v-mx_se/acpi_tables.c
+++ svn/src/mainboard/asus/m2v-mx_se/acpi_tables.c
@@ -89,7 +89,7 @@ unsigned long acpi_fill_ssdt_generator(u
return (unsigned long) (acpigen_get_current());
}
-unsigned long write_acpi_tables(unsigned long start)
+unsigned long write_acpi_tables(unsigned long start, unsigned long rsdp2)
{
unsigned long current;
acpi_rsdp_t *rsdp;
@@ -120,6 +120,8 @@ unsigned long write_acpi_tables(unsigned
memset((void *) start, 0, current - start);
acpi_write_rsdp(rsdp, rsdt);
+ if (rsdp2)
+ acpi_write_rsdp(ALIGN(rsdp2,16), rsdt);
acpi_write_rsdt(rsdt);
/* We explicitly add these tables later on: */
Index: svn/src/mainboard/intel/xe7501devkit/acpi_tables.c
===================================================================
--- svn.orig/src/mainboard/intel/xe7501devkit/acpi_tables.c
+++ svn/src/mainboard/intel/xe7501devkit/acpi_tables.c
@@ -94,7 +94,7 @@ unsigned long acpi_fill_madt(unsigned lo
}
-unsigned long write_acpi_tables(unsigned long start)
+unsigned long write_acpi_tables(unsigned long start, unsigned long rsdp2)
{
unsigned long current;
acpi_rsdp_t *rsdp;
@@ -115,8 +115,10 @@ unsigned long write_acpi_tables(unsigned
/* clear all table memory */
memset((void *)start, 0, current - start);
-
+
acpi_write_rsdp(rsdp, rsdt);
+ if (rsdp2)
+ acpi_write_rsdp(ALIGN(rsdp2,16), rsdt);
acpi_write_rsdt(rsdt);
/*
Index: svn/src/mainboard/iwill/dk8_htx/acpi_tables.c
===================================================================
--- svn.orig/src/mainboard/iwill/dk8_htx/acpi_tables.c
+++ svn/src/mainboard/iwill/dk8_htx/acpi_tables.c
@@ -187,7 +187,7 @@ unsigned long acpi_fill_ssdt_generator(u
return (unsigned long) (acpigen_get_current());
}
-unsigned long write_acpi_tables(unsigned long start)
+unsigned long write_acpi_tables(unsigned long start, unsigned long rsdp2)
{
unsigned long current;
acpi_rsdp_t *rsdp;
@@ -223,8 +223,10 @@ unsigned long write_acpi_tables(unsigned
/* clear all table memory */
memset((void *)start, 0, current - start);
-
+
acpi_write_rsdp(rsdp, rsdt);
+ if (rsdp2)
+ acpi_write_rsdp(ALIGN(rsdp2,16), rsdt);
acpi_write_rsdt(rsdt);
/*
Index: svn/src/mainboard/kontron/986lcd-m/acpi_tables.c
===================================================================
--- svn.orig/src/mainboard/kontron/986lcd-m/acpi_tables.c
+++ svn/src/mainboard/kontron/986lcd-m/acpi_tables.c
@@ -204,7 +204,7 @@ unsigned long acpi_fill_srat(unsigned lo
#define ALIGN_CURRENT current = ((current + 0x0f) & -0x10)
-unsigned long write_acpi_tables(unsigned long start)
+unsigned long write_acpi_tables(unsigned long start, unsigned long rsdp2)
{
unsigned long current;
int i;
@@ -237,6 +237,8 @@ unsigned long write_acpi_tables(unsigned
memset((void *) start, 0, current - start);
acpi_write_rsdp(rsdp, rsdt);
+ if (rsdp2)
+ acpi_write_rsdp(ALIGN(rsdp2,16), rsdt);
acpi_write_rsdt(rsdt);
/*
Index: svn/src/mainboard/technexion/tim8690/acpi_tables.c
===================================================================
--- svn.orig/src/mainboard/technexion/tim8690/acpi_tables.c
+++ svn/src/mainboard/technexion/tim8690/acpi_tables.c
@@ -129,7 +129,7 @@ unsigned long acpi_fill_ssdt_generator(u
return (unsigned long) (acpigen_get_current());
}
-unsigned long write_acpi_tables(unsigned long start)
+unsigned long write_acpi_tables(unsigned long start, unsigned long rsdp2)
{
unsigned long current;
acpi_rsdp_t *rsdp;
@@ -159,6 +159,8 @@ unsigned long write_acpi_tables(unsigned
memset((void *)start, 0, current - start);
acpi_write_rsdp(rsdp, rsdt);
+ if (rsdp2)
+ acpi_write_rsdp(ALIGN(rsdp2,16), rsdt);
acpi_write_rsdt(rsdt);
/*
Index: svn/src/mainboard/tyan/s2891/acpi_tables.c
===================================================================
--- svn.orig/src/mainboard/tyan/s2891/acpi_tables.c
+++ svn/src/mainboard/tyan/s2891/acpi_tables.c
@@ -81,7 +81,7 @@ unsigned long acpi_fill_ssdt_generator(u
return (unsigned long) (acpigen_get_current());
}
-unsigned long write_acpi_tables(unsigned long start)
+unsigned long write_acpi_tables(unsigned long start, unsigned long rsdp2)
{
unsigned long current;
acpi_rsdp_t *rsdp;
@@ -113,6 +113,8 @@ unsigned long write_acpi_tables(unsigned
memset((void *) start, 0, current - start);
acpi_write_rsdp(rsdp, rsdt);
+ if (rsdp2)
+ acpi_write_rsdp(ALIGN(rsdp2,16), rsdt);
acpi_write_rsdt(rsdt);
current = ALIGN(current, 64);
Index: svn/src/mainboard/tyan/s2892/acpi_tables.c
===================================================================
--- svn.orig/src/mainboard/tyan/s2892/acpi_tables.c
+++ svn/src/mainboard/tyan/s2892/acpi_tables.c
@@ -81,7 +81,7 @@ unsigned long acpi_fill_ssdt_generator(u
return (unsigned long) (acpigen_get_current());
}
-unsigned long write_acpi_tables(unsigned long start)
+unsigned long write_acpi_tables(unsigned long start, unsigned long rsdp2)
{
unsigned long current;
acpi_rsdp_t *rsdp;
@@ -113,6 +113,8 @@ unsigned long write_acpi_tables(unsigned
memset((void *) start, 0, current - start);
acpi_write_rsdp(rsdp, rsdt);
+ if (rsdp2)
+ acpi_write_rsdp(ALIGN(rsdp2,16), rsdt);
acpi_write_rsdt(rsdt);
current = ALIGN(current, 64);
Index: svn/src/mainboard/tyan/s2895/acpi_tables.c
===================================================================
--- svn.orig/src/mainboard/tyan/s2895/acpi_tables.c
+++ svn/src/mainboard/tyan/s2895/acpi_tables.c
@@ -92,7 +92,7 @@ unsigned long acpi_fill_ssdt_generator(u
return (unsigned long) (acpigen_get_current());
}
-unsigned long write_acpi_tables(unsigned long start)
+unsigned long write_acpi_tables(unsigned long start, unsigned long rsdp2)
{
unsigned long current;
acpi_rsdp_t *rsdp;
@@ -124,6 +124,8 @@ unsigned long write_acpi_tables(unsigned
memset((void *) start, 0, current - start);
acpi_write_rsdp(rsdp, rsdt);
+ if (rsdp2)
+ acpi_write_rsdp(ALIGN(rsdp2,16), rsdt);
acpi_write_rsdt(rsdt);
current = ALIGN(current, 64);
Index: svn/src/mainboard/via/epia-m/acpi_tables.c
===================================================================
--- svn.orig/src/mainboard/via/epia-m/acpi_tables.c
+++ svn/src/mainboard/via/epia-m/acpi_tables.c
@@ -37,7 +37,7 @@ unsigned long acpi_fill_srat(unsigned lo
return current;
}
-unsigned long write_acpi_tables(unsigned long start)
+unsigned long write_acpi_tables(unsigned long start, unsigned long rsdp2)
{
unsigned long current;
acpi_rsdp_t *rsdp;
@@ -62,8 +62,10 @@ unsigned long write_acpi_tables(unsigned
/* clear all table memory */
memset((void *)start, 0, current - start);
-
+
acpi_write_rsdp(rsdp, rsdt);
+ if (rsdp2)
+ acpi_write_rsdp(ALIGN(rsdp2,16), rsdt);
acpi_write_rsdt(rsdt);
/*
Index: svn/src/mainboard/via/vt8454c/acpi_tables.c
===================================================================
--- svn.orig/src/mainboard/via/vt8454c/acpi_tables.c
+++ svn/src/mainboard/via/vt8454c/acpi_tables.c
@@ -119,7 +119,7 @@ unsigned long acpi_fill_srat(unsigned lo
return current;
}
-unsigned long write_acpi_tables(unsigned long start)
+unsigned long write_acpi_tables(unsigned long start, unsigned long rsdp2)
{
unsigned long current;
acpi_rsdp_t *rsdp;
@@ -147,6 +147,8 @@ unsigned long write_acpi_tables(unsigned
memset((void *) start, 0, current - start);
acpi_write_rsdp(rsdp, rsdt);
+ if (rsdp2)
+ acpi_write_rsdp(ALIGN(rsdp2,16), rsdt);
acpi_write_rsdt(rsdt);
/*
--
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot