summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/arch/x86/postcar.c3
-rw-r--r--src/commonlib/include/commonlib/timestamp_serialized.h4
-rw-r--r--src/lib/prog_loaders.c3
3 files changed, 10 insertions, 0 deletions
diff --git a/src/arch/x86/postcar.c b/src/arch/x86/postcar.c
index ea05824e6f..b4efc949b4 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
@@ -35,6 +36,8 @@ void main(void)
/* Recover cbmem so infrastruture using it is functional. */
cbmem_initialize();
+ timestamp_add_now(TS_START_POSTCAR);
+
display_mtrrs();
/* Load and run ramstage. */
diff --git a/src/commonlib/include/commonlib/timestamp_serialized.h b/src/commonlib/include/commonlib/timestamp_serialized.h
index cbf07b5aac..bb0dcfc7f4 100644
--- a/src/commonlib/include/commonlib/timestamp_serialized.h
+++ b/src/commonlib/include/commonlib/timestamp_serialized.h
@@ -63,6 +63,8 @@ enum timestamp_id {
TS_LOAD_PAYLOAD = 90,
TS_ACPI_WAKE_JUMP = 98,
TS_SELFBOOT_JUMP = 99,
+ TS_START_POSTCAR = 100,
+ TS_END_POSTCAR = 101,
/* 500+ reserved for vendorcode extensions (500-600: google/chromeos) */
TS_START_COPYVER = 501,
@@ -257,6 +259,8 @@ static const struct timestamp_id_to_name {
{ 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
diff --git a/src/lib/prog_loaders.c b/src/lib/prog_loaders.c
index 70ea7efe66..da021f1143 100644
--- a/src/lib/prog_loaders.c
+++ b/src/lib/prog_loaders.c
@@ -128,6 +128,9 @@ void run_ramstage(void)
struct prog ramstage =
PROG_INIT(PROG_RAMSTAGE, CONFIG_CBFS_PREFIX "/ramstage");
+ if (ENV_POSTCAR)
+ timestamp_add_now(TS_END_POSTCAR);
+
timestamp_add_now(TS_END_ROMSTAGE);
/*