Author: mjones Date: 2008-07-24 01:22:59 +0200 (Thu, 24 Jul 2008) New Revision: 3437
Modified: trunk/coreboot-v2/src/arch/i386/boot/coreboot_table.c trunk/coreboot-v2/src/arch/i386/boot/tables.c Log: This patch fixes the kernel EBDA mislocation problem. Thank you, Yinghai.
The change in tables.c protects the legacy x86 BIOS data segment (0x400-0x4ff) from being used for storing coreboot tables. Some bytes from the segment are used by the kernel and should not be garbled.
The change in coreboot_table.c is not strictly necessary. It removes some redundancy and confusion.
Signed-off-by: Roman Kononov kononov@dls.net Acked-by: Marc Jones marc.jones@amd.com
Modified: trunk/coreboot-v2/src/arch/i386/boot/coreboot_table.c =================================================================== --- trunk/coreboot-v2/src/arch/i386/boot/coreboot_table.c 2008-07-23 22:27:19 UTC (rev 3436) +++ trunk/coreboot-v2/src/arch/i386/boot/coreboot_table.c 2008-07-23 23:22:59 UTC (rev 3437) @@ -402,7 +402,6 @@ unsigned long low_table_start, unsigned long low_table_end, unsigned long rom_table_start, unsigned long rom_table_end) { - unsigned long table_size; struct lb_header *head; struct lb_memory *mem;
@@ -445,9 +444,8 @@ low_table_start, low_table_end - low_table_start);
/* Record the pirq table, acpi tables, and maybe the mptable */ - table_size=rom_table_end-rom_table_start; lb_add_memory_range(mem, LB_MEM_TABLE, - rom_table_start, table_size<0x10000?0x10000:table_size); + rom_table_start, rom_table_end-rom_table_start);
/* Note: * I assume that there is always memory at immediately after
Modified: trunk/coreboot-v2/src/arch/i386/boot/tables.c =================================================================== --- trunk/coreboot-v2/src/arch/i386/boot/tables.c 2008-07-23 22:27:19 UTC (rev 3436) +++ trunk/coreboot-v2/src/arch/i386/boot/tables.c 2008-07-23 23:22:59 UTC (rev 3437) @@ -72,8 +72,9 @@ #if HAVE_MP_TABLE==1 /* 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>0x467){ + 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 */