From bf729baa2c7b2fbfa03e271c4f3f5707989e43b5 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Fri, 4 Nov 2011 12:31:58 -0700 Subject: Add more timestamps in coreboot. This adds a number of timestamps in ramstage and romstage so we can figure out where execution time goes. Change-Id: Iea17c08774e623fc1ca3fa4505b70523ba4cbf01 Signed-off-by: Stefan Reinauer Reviewed-on: http://review.coreboot.org/749 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich --- src/include/timestamp.h | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'src/include/timestamp.h') diff --git a/src/include/timestamp.h b/src/include/timestamp.h index 8b9a89a2b8ac..0bb323c56932 100644 --- a/src/include/timestamp.h +++ b/src/include/timestamp.h @@ -35,14 +35,32 @@ struct timestamp_table { } __attribute__((packed)); enum timestamp_id { - TS_BEFORE_INITRAM = 1, - TS_AFTER_INITRAM = 2, + TS_START_ROMSTAGE = 1, + TS_BEFORE_INITRAM = 2, + TS_AFTER_INITRAM = 3, + TS_END_ROMSTAGE = 4, + TS_START_COPYRAM = 8, + TS_END_COPYRAM = 9, + TS_START_RAMSTAGE = 10, + TS_DEVICE_ENUMERATE = 30, + TS_DEVICE_CONFIGURE = 40, + TS_DEVICE_ENABLE = 50, + TS_DEVICE_INITIALIZE = 60, + TS_DEVICE_DONE = 70, + TS_WRITE_TABLES = 80, + TS_LOAD_PAYLOAD = 90, TS_ACPI_WAKE_JUMP = 98, TS_SELFBOOT_JUMP = 99, }; +#if CONFIG_COLLECT_TIMESTAMPS void timestamp_init(tsc_t base); void timestamp_add(enum timestamp_id id, tsc_t ts_time); void timestamp_add_now(enum timestamp_id id); +#else +#define timestamp_init(base) +#define timestamp_add(id, time) +#define timestamp_add_now(id) +#endif #endif -- cgit v1.2.3