prog_loader: Associate TS_END_ROMSTAGE timestamp with postcar if exist

This patch adds timestamp for "end of romstage" with postcar if platform
has selected postcar as dedicated stage.

If postcar stage doesn't exist then "end of romstage" timestamp will get
call while starting of ramstage as exist today.

TEST=It's been observed that "end of romstage" timestamp doesn't appear
in "cbmem -t" log when ramstage is not getting executed. As part of this fix
"end of romstage" timestamp is showing in "cbmem -t" log on Intel platform
where POSTCAR is a dedicated stage.

Change-Id: I17fd89296354b66a5538f85737c79145232593d3
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/31608
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
Subrata Banik 2019-02-25 20:31:22 +05:30 committed by Patrick Georgi
parent 4f42eead36
commit 2847e1e714
2 changed files with 7 additions and 1 deletions

View File

@ -23,6 +23,7 @@
#include <rmodule.h> #include <rmodule.h>
#include <romstage_handoff.h> #include <romstage_handoff.h>
#include <stage_cache.h> #include <stage_cache.h>
#include <timestamp.h>
static inline void stack_push(struct postcar_frame *pcf, uint32_t val) static inline void stack_push(struct postcar_frame *pcf, uint32_t val)
{ {
@ -171,5 +172,8 @@ void run_postcar_phase(struct postcar_frame *pcf)
} else } else
load_postcar_cbfs(&prog, pcf); load_postcar_cbfs(&prog, pcf);
/* As postcar exist, it's end of romstage here */
timestamp_add_now(TS_END_ROMSTAGE);
prog_run(&prog); prog_run(&prog);
} }

View File

@ -131,6 +131,8 @@ void run_ramstage(void)
if (ENV_POSTCAR) if (ENV_POSTCAR)
timestamp_add_now(TS_END_POSTCAR); timestamp_add_now(TS_END_POSTCAR);
/* Call "end of romstage" here if postcar stage doesn't exist */
if (ENV_ROMSTAGE)
timestamp_add_now(TS_END_ROMSTAGE); timestamp_add_now(TS_END_ROMSTAGE);
/* /*