Subrata Banik has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/31762
Change subject: arch/x86/postcar: Add separate timestamp for postcar stage ......................................................................
arch/x86/postcar: Add separate timestamp for postcar stage
This patch adds dedicated timestamp value for postcar stage.
TEST=Able to see "start of postcar" and "end of postcar" timestamp while executing cbmem -t after booting to chrome console.
cbmem -t
951:returning from FspMemoryInit 20,404,341 (20,022,190) 4:end of romstage 20,445,466 (41,124) 1103:start of postcar 20,478,259 (32,793) 1104:end of postcar 20,489,064 (10,805)
Change-Id: I084f66949667ad598f811d4233b4e639bc4c113e Signed-off-by: Subrata Banik subrata.banik@intel.com --- M src/arch/x86/postcar.c M src/arch/x86/postcar_loader.c M src/commonlib/include/commonlib/timestamp_serialized.h 3 files changed, 9 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/62/31762/1
diff --git a/src/arch/x86/postcar.c b/src/arch/x86/postcar.c index ea05824..c2d91be 100644 --- a/src/arch/x86/postcar.c +++ b/src/arch/x86/postcar.c @@ -19,6 +19,7 @@ #include <cpu/x86/mtrr.h> #include <main_decl.h> #include <program_loading.h> +#include <timestamp.h>
/* * Systems without a native coreboot cache-as-ram teardown may implement @@ -37,6 +38,8 @@
display_mtrrs();
+ timestamp_add_now(TS_END_POSTCAR); + /* Load and run ramstage. */ run_ramstage(); } diff --git a/src/arch/x86/postcar_loader.c b/src/arch/x86/postcar_loader.c index b08b5ea..2d99eef 100644 --- a/src/arch/x86/postcar_loader.c +++ b/src/arch/x86/postcar_loader.c @@ -175,5 +175,7 @@ } else load_postcar_cbfs(&prog, pcf);
+ timestamp_add_now(TS_START_POSTCAR); + prog_run(&prog); } diff --git a/src/commonlib/include/commonlib/timestamp_serialized.h b/src/commonlib/include/commonlib/timestamp_serialized.h index cbf07b5..cc088f5 100644 --- a/src/commonlib/include/commonlib/timestamp_serialized.h +++ b/src/commonlib/include/commonlib/timestamp_serialized.h @@ -143,6 +143,8 @@
TS_START_KERNEL = 1101, TS_KERNEL_DECOMPRESSION = 1102, + TS_START_POSTCAR = 1103, + TS_END_POSTCAR = 1104, };
static const struct timestamp_id_to_name { @@ -257,6 +259,8 @@ { TS_FSP_BEFORE_END_OF_FIRMWARE, "calling FspNotify(EndOfFirmware)" }, { TS_FSP_AFTER_END_OF_FIRMWARE, "returning from FspNotify(EndOfFirmware)" }, + { TS_START_POSTCAR, "start of postcar" }, + { TS_END_POSTCAR, "end of postcar" }, };
#endif