[coreboot-gerrit] New patch to review for coreboot: lib: Instrument table writing

Paul Menzel (paulepanter@users.sourceforge.net) gerrit at coreboot.org
Tue Dec 6 21:27:26 CET 2016


Paul Menzel (paulepanter at users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17738

-gerrit

commit 7862538c408af5d4156ae766b3ce27a6ba5abfd3
Author: Paul Menzel <paulepanter at users.sourceforge.net>
Date:   Tue Dec 6 21:12:57 2016 +0100

    lib: Instrument table writing
    
    Change-Id: Ie54fec50edd51ee978d248c65eb1de88a0bf248b
    Signed-off-by: Paul Menzel <paulepanter at users.sourceforge.net>
---
 src/commonlib/include/commonlib/timestamp_serialized.h | 8 ++++++++
 src/lib/coreboot_table.c                               | 5 +++++
 2 files changed, 13 insertions(+)

diff --git a/src/commonlib/include/commonlib/timestamp_serialized.h b/src/commonlib/include/commonlib/timestamp_serialized.h
index 29f5e0d..4f109a7 100644
--- a/src/commonlib/include/commonlib/timestamp_serialized.h
+++ b/src/commonlib/include/commonlib/timestamp_serialized.h
@@ -56,6 +56,10 @@ enum timestamp_id {
 	TS_DEVICE_DONE = 70,
 	TS_CBMEM_POST = 75,
 	TS_WRITE_TABLES = 80,
+	TS_COREBOOT_TABLE = 82,
+	TS_OPTION_TABLE = 84,
+	TS_BOOTMEM_INIT = 86,
+	TS_FRAMEBUFFER = 88,
 	TS_LOAD_PAYLOAD = 90,
 	TS_ACPI_WAKE_JUMP = 98,
 	TS_SELFBOOT_JUMP = 99,
@@ -141,6 +145,10 @@ static const struct timestamp_id_to_name {
 	{ TS_DEVICE_DONE,	"device setup done" },
 	{ TS_CBMEM_POST,	"cbmem post" },
 	{ TS_WRITE_TABLES,	"write tables" },
+	{ TS_COREBOOT_TABLE,	"write coreboot table" },
+	{ TS_OPTION_TABLE,	"write option table" },
+	{ TS_BOOTMEM_INIT,	"initialize memory map at boot time" },
+	{ TS_FRAMEBUFFER,	"record framebuffer" },
 	{ TS_LOAD_PAYLOAD,	"load payload" },
 	{ TS_ACPI_WAKE_JUMP,	"ACPI wake jump" },
 	{ TS_SELFBOOT_JUMP,	"selfboot jump" },
diff --git a/src/lib/coreboot_table.c b/src/lib/coreboot_table.c
index f8da658..d833652 100644
--- a/src/lib/coreboot_table.c
+++ b/src/lib/coreboot_table.c
@@ -32,6 +32,7 @@
 #include <cbmem.h>
 #include <bootmem.h>
 #include <spi_flash.h>
+#include <timestamp.h>
 #include <vboot/vbnv_layout.h>
 #if CONFIG_USE_OPTION_TABLE
 #include <option_table.h>
@@ -474,12 +475,14 @@ static uintptr_t write_coreboot_table(uintptr_t rom_table_end)
 {
 	struct lb_header *head;
 
+	timestamp_add_now(TS_COREBOOT_TABLE);
 	printk(BIOS_DEBUG, "Writing coreboot table at 0x%08lx\n",
 		(long)rom_table_end);
 
 	head = lb_table_init(rom_table_end);
 
 #if CONFIG_USE_OPTION_TABLE
+	timestamp_add_now(TS_OPTION_TABLE);
 	{
 		struct cmos_option_table *option_table =
 			cbfs_boot_map_with_leak("cmos_layout.bin",
@@ -497,6 +500,7 @@ static uintptr_t write_coreboot_table(uintptr_t rom_table_end)
 #endif
 
 	/* Initialize the memory map at boot time. */
+	timestamp_add_now(TS_BOOTMEM_INIT);
 	bootmem_init();
 
 	/* No other memory areas can be added after the memory table has been
@@ -517,6 +521,7 @@ static uintptr_t write_coreboot_table(uintptr_t rom_table_end)
 	/* Record our various random string information */
 	lb_strings(head);
 	lb_record_version_timestamp(head);
+	timestamp_add_now(TS_FRAMEBUFFER);
 	/* Record our framebuffer */
 	lb_framebuffer(head);
 



More information about the coreboot-gerrit mailing list