Fix compilation when USE_OPTION_TABLE is not defined.
[coreboot.git] / src / arch / x86 / boot / coreboot_table.c
index 77a1126e69abbe362b39743c56f522905c2ad727..b0dcc9e65aa57d109328f5e12d17ec1642422c5c 100644 (file)
@@ -29,9 +29,9 @@
 #include <version.h>
 #include <device/device.h>
 #include <stdlib.h>
+#include <cbfs.h>
 #if CONFIG_USE_OPTION_TABLE
 #include <option_table.h>
-#include <cbfs.h>
 #endif
 
 static struct lb_header *lb_table_init(unsigned long addr)
@@ -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)