Hi,

20090423-1-cleanup-mptable-code.patch removes some duplicate code (see the 
function right below the one that is changed)

20090423-2-only-write-acpi-table-once.patch changes 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 should do exactly the same as before.

Both are
Signed-off-by: Patrick Georgi <[email protected]>



Patrick
Index: src/arch/i386/smp/mpspec.c
===================================================================
--- src/arch/i386/smp/mpspec.c	(Revision 4193)
+++ src/arch/i386/smp/mpspec.c	(Arbeitskopie)
@@ -28,24 +28,7 @@
 	
 	/* 16 byte align the table address */
 	addr = (addr + 0xf) & (~0xf);
-	v = (void *)addr;
-
-	mf = v;
-	mf->mpf_signature[0] = '_';
-	mf->mpf_signature[1] = 'M';
-	mf->mpf_signature[2] = 'P';
-	mf->mpf_signature[3] = '_';
-	mf->mpf_physptr = (unsigned long)(((char *)v) + SMP_FLOATING_TABLE_LEN);
-	mf->mpf_length = 1;
-	mf->mpf_specification = 4;
-	mf->mpf_checksum = 0;
-	mf->mpf_feature1 = 0;
-	mf->mpf_feature2 = 0;
-	mf->mpf_feature3 = 0;
-	mf->mpf_feature4 = 0;
-	mf->mpf_feature5 = 0;
-	mf->mpf_checksum = smp_compute_checksum(mf, mf->mpf_length*16);
-	return v;
+	return smp_write_floating_table_physaddr(addr, addr + SMP_FLOATING_TABLE_LEN);
 }
 
 void *smp_write_floating_table_physaddr(unsigned long addr, unsigned long mpf_physptr)
Index: src/arch/i386/boot/tables.c
===================================================================
--- src/arch/i386/boot/tables.c	(Revision 4193)
+++ src/arch/i386/boot/tables.c	(Arbeitskopie)
@@ -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);
 
-- 
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to