[coreboot] [v2] r4202 - trunk/coreboot-v2/src/arch/i386/boot

svn at coreboot.org svn at coreboot.org
Fri Apr 24 08:28:49 CEST 2009


Author: oxygene
Date: 2009-04-24 08:28:48 +0200 (Fri, 24 Apr 2009)
New Revision: 4202

Modified:
   trunk/coreboot-v2/src/arch/i386/boot/tables.c
Log:
Change the behaviour of the ACPI generating code so it only
writes at most one full ACPI table.
In the cases where both HAVE_LOW_TABLES and HAVE_HIGH_TABLES
are enabled, the table is written to high memory, and an RSDP
is written to the low memory that points to the high mem one.
All other cases work exactly the same way as before.

Signed-off-by: Patrick Georgi <patrick.georgi at coresystems.de>
Acked-by: Myles Watson <mylesgw at gmail.com>


Modified: trunk/coreboot-v2/src/arch/i386/boot/tables.c
===================================================================
--- trunk/coreboot-v2/src/arch/i386/boot/tables.c	2009-04-24 06:27:31 UTC (rev 4201)
+++ trunk/coreboot-v2/src/arch/i386/boot/tables.c	2009-04-24 06:28:48 UTC (rev 4202)
@@ -112,16 +112,23 @@
 	/* 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_LOW_TABLES == 1
-	rom_table_end = write_acpi_tables(rom_table_end);
-	rom_table_end = (rom_table_end+1023) & ~1023;
-#endif
 #if HAVE_HIGH_TABLES == 1
+	unsigned long high_rsdp=ALIGN(high_table_end, 16);
 	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);
 #endif
+#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
 	/* copy the smp block to address 0 */
 	post_code(0x96);
 





More information about the coreboot mailing list