From cd626aa10b56cd4da6ebda36fe487e44b08f3935 Mon Sep 17 00:00:00 2001 From: David Hendricks Date: Wed, 6 Nov 2013 18:25:31 -0800 Subject: [PATCH] nyan: add timestamps in romstage BUG=none BRANCH=none TEST=ran "cbmem" on nyan and saw timestamps. Change-Id: Id1a0f32c4278e47b2f8c31492e87c0bc899adb50 Reviewed-on: https://chromium-review.googlesource.com/176172 Reviewed-by: Gabe Black Commit-Queue: David Hendricks Tested-by: David Hendricks Reviewed-by: Julius Werner --- src/mainboard/google/nyan/romstage.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/mainboard/google/nyan/romstage.c b/src/mainboard/google/nyan/romstage.c index a31f1f1519..493ea910bf 100644 --- a/src/mainboard/google/nyan/romstage.c +++ b/src/mainboard/google/nyan/romstage.c @@ -27,6 +27,7 @@ #include #include "soc/nvidia/tegra124/chip.h" #include +#include // Convenient shorthand (in MB) #define DRAM_START (CONFIG_SYS_SDRAM_BASE >> 20) @@ -73,6 +74,10 @@ static void configure_l2actlr(void) void main(void) { +#if CONFIG_COLLECT_TIMESTAMPS + uint64_t romstage_start_time = timestamp_get(); +#endif + // Globally disable MMU, caches and branch prediction (these should // already be disabled by default on reset). uint32_t sctlr = read_sctlr(); @@ -119,7 +124,15 @@ void main(void) cbmem_initialize_empty(); +#if CONFIG_COLLECT_TIMESTAMPS + timestamp_init(0); + timestamp_add(TS_START_ROMSTAGE, romstage_start_time); + timestamp_add(TS_START_COPYRAM, timestamp_get()); +#endif void *entry = cbfs_load_stage(CBFS_DEFAULT_MEDIA, "fallback/coreboot_ram"); +#if CONFIG_COLLECT_TIMESTAMPS + timestamp_add(TS_END_COPYRAM, timestamp_get()); +#endif stage_exit(entry); }