Subrata Banik has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/31608
Change subject: prog_loader: Associate TS_END_ROMSTAGE timestamp with postcar if exist ......................................................................
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=Its 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 IA platform where POSTCAR is a dedicated stage.
Change-Id: I17fd89296354b66a5538f85737c79145232593d3 Signed-off-by: Subrata Banik subrata.banik@intel.com --- M src/arch/x86/postcar_loader.c M src/lib/prog_loaders.c 2 files changed, 7 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/08/31608/1
diff --git a/src/arch/x86/postcar_loader.c b/src/arch/x86/postcar_loader.c index 141e8d2..8d1cab4 100644 --- a/src/arch/x86/postcar_loader.c +++ b/src/arch/x86/postcar_loader.c @@ -23,6 +23,7 @@ #include <rmodule.h> #include <romstage_handoff.h> #include <stage_cache.h> +#include <timestamp.h>
static inline void stack_push(struct postcar_frame *pcf, uint32_t val) { @@ -159,6 +160,9 @@ struct prog prog = PROG_INIT(PROG_POSTCAR, CONFIG_CBFS_PREFIX "/postcar");
+ /* As postcar exist, its end of romstage here */ + timestamp_add_now(TS_END_ROMSTAGE); + postcar_commit_mtrrs(pcf);
if (!IS_ENABLED(CONFIG_NO_STAGE_CACHE) && diff --git a/src/lib/prog_loaders.c b/src/lib/prog_loaders.c index 70ea7ef..5baeb8b 100644 --- a/src/lib/prog_loaders.c +++ b/src/lib/prog_loaders.c @@ -128,7 +128,9 @@ struct prog ramstage = PROG_INIT(PROG_RAMSTAGE, CONFIG_CBFS_PREFIX "/ramstage");
- timestamp_add_now(TS_END_ROMSTAGE); + /* Call "end of romstage" here if postcar stage doesn't exist */ + if (!IS_ENABLED(CONFIG_ARCH_POSTCAR_X86_32)) + timestamp_add_now(TS_END_ROMSTAGE);
/* * Only x86 systems using ramstage stage cache currently take the same