[coreboot] Patch set updated for coreboot: c98f469 Add timestamp table pointer to the coreboot table.

Stefan Reinauer (stefan.reinauer@coreboot.org) gerrit at coreboot.org
Wed Mar 7 20:22:53 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/716

-gerrit

commit c98f469e29f49887d16d94392e6888d5ca66ebd0
Author: Vadim Bendebury <vbendeb at chromium.org>
Date:   Fri Sep 23 09:56:11 2011 -0700

    Add timestamp table pointer to the coreboot table.
    
    This change exports the timestamp table pointer through coreboot
    table to make it possible for u-boot to add timestamps to the
    table.
    
    Inclusion of cbmem.h allows to drop external declarations in
    coreboot_table.c.
    
    Change-Id: Ia070198cee7a6ffdaeece03d9d15bd91e033b6d1
    Signed-off-by: Vadim Bendebury <vbendeb at chromium.org>
---
 src/arch/x86/boot/coreboot_table.c |   25 +++++++++++++++++++++----
 src/include/boot/coreboot_tables.h |    8 ++++++++
 2 files changed, 29 insertions(+), 4 deletions(-)

diff --git a/src/arch/x86/boot/coreboot_table.c b/src/arch/x86/boot/coreboot_table.c
index b0dcc9e..f189e76 100644
--- a/src/arch/x86/boot/coreboot_table.c
+++ b/src/arch/x86/boot/coreboot_table.c
@@ -30,6 +30,7 @@
 #include <device/device.h>
 #include <stdlib.h>
 #include <cbfs.h>
+#include <cbmem.h>
 #if CONFIG_USE_OPTION_TABLE
 #include <option_table.h>
 #endif
@@ -174,6 +175,23 @@ static void lb_framebuffer(struct lb_header *header)
 #endif
 }
 
+#if CONFIG_COLLECT_TIMESTAMPS
+static void lb_tsamp(struct lb_header *header)
+{
+	struct lb_tstamp *tstamp;
+	void *tstamp_table = cbmem_find(CBMEM_ID_TIMESTAMP);
+
+	if (!tstamp_table)
+		return;
+
+	tstamp = (struct lb_tstamp *)lb_new_record(header);
+	tstamp->tag = LB_TAG_TIMESTAMPS;
+	tstamp->size = sizeof(*tstamp);
+	tstamp->tstamp_tab = tstamp_table;
+
+}
+#endif
+
 static struct lb_mainboard *lb_mainboard(struct lb_header *header)
 {
 	struct lb_record *rec;
@@ -513,10 +531,6 @@ static void add_lb_reserved(struct lb_memory *mem)
 		lb_add_rsvd_range, mem);
 }
 
-#if CONFIG_WRITE_HIGH_TABLES
-extern uint64_t high_tables_base, high_tables_size;
-#endif
-
 unsigned long write_coreboot_table(
 	unsigned long low_table_start, unsigned long low_table_end,
 	unsigned long rom_table_start, unsigned long rom_table_end)
@@ -619,6 +633,9 @@ unsigned long write_coreboot_table(
 	/* Record our framebuffer */
 	lb_framebuffer(head);
 
+#if CONFIG_COLLECT_TIMESTAMPS
+	lb_tsamp(head);
+#endif
 	/* Remember where my valid memory ranges are */
 	return lb_table_fini(head, 1);
 
diff --git a/src/include/boot/coreboot_tables.h b/src/include/boot/coreboot_tables.h
index 45ba3af..46d6489 100644
--- a/src/include/boot/coreboot_tables.h
+++ b/src/include/boot/coreboot_tables.h
@@ -195,6 +195,14 @@ struct lb_framebuffer {
 	uint8_t reserved_mask_size;
 };
 
+#define LB_TAG_TIMESTAMPS	0x0016
+struct lb_tstamp {
+	uint32_t tag;
+	uint32_t size;
+
+	void	*tstamp_tab;
+};
+
 /* The following structures are for the cmos definitions table */
 #define LB_TAG_CMOS_OPTION_TABLE 200
 /* cmos header record */




More information about the coreboot mailing list