[coreboot] Patch set updated for coreboot: 243cdc7 Fix coreboot table size calculations.

Stefan Reinauer (stefan.reinauer@coreboot.org) gerrit at coreboot.org
Thu Mar 8 21:47:28 CET 2012

Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/703


commit 243cdc7b487ecf0356b8e1a64efb0552a2df5f8c
Author: Vadim Bendebury <vbendeb at chromium.org>
Date:   Tue Aug 16 11:44:35 2011 -0700

    Fix coreboot table size calculations.
    The code when reporting the coreboot table size did not account
    for the last added table record. This change fixes the problem.
     . rebuild coreboot, program it on the target, restart it
     . look for 'Wrote coreboot table at:' in the console log
     . observe the adequate table size reported
     $  grep 'Wrote coreboot table:' /tmp/cb.log
     Wrote coreboot table at: 00000500, 0x10 bytes, checksum c06f
     Wrote coreboot table at: 7f6fc000, 0x1a73 bytes, checksum 3e45
    Change-Id: Ic55501a4ae06fab2bcda9aea58e362325f2edccf
    Signed-off-by: Vadim Bendebury <vbendeb at chromium.org>
 src/arch/x86/boot/coreboot_table.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/arch/x86/boot/coreboot_table.c b/src/arch/x86/boot/coreboot_table.c
index a001259..b0dcc9e 100644
--- a/src/arch/x86/boot/coreboot_table.c
+++ b/src/arch/x86/boot/coreboot_table.c
@@ -320,9 +320,10 @@ static unsigned long lb_table_fini(struct lb_header *head, int fixup)
 	head->table_checksum = compute_ip_checksum(first_rec, head->table_bytes);
 	head->header_checksum = 0;
 	head->header_checksum = compute_ip_checksum(head, sizeof(*head));
-	printk(BIOS_DEBUG, "Wrote coreboot table at: %p - %p  checksum %x\n",
-		head, rec, head->table_checksum);
-	return (unsigned long)rec;
+	printk(BIOS_DEBUG,
+	       "Wrote coreboot table at: %p, 0x%x bytes, checksum %x\n",
+	       head, head->table_bytes, head->table_checksum);
+	return (unsigned long)rec + rec->size;
 static void lb_cleanup_memory_ranges(struct lb_memory *mem)

More information about the coreboot mailing list