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,485,324 (20,103,067) 4:end of romstage 20,559,235 (73,910) 100:start of postcar 20,560,266 (1,031) 101:end of postcar 20,570,038 (9,772) Change-Id: I084f66949667ad598f811d4233b4e639bc4c113e Signed-off-by: Subrata Banik <subrata.banik@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/31762 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
parent
34508cd9ac
commit
4f42eead36
|
@ -19,6 +19,7 @@
|
||||||
#include <cpu/x86/mtrr.h>
|
#include <cpu/x86/mtrr.h>
|
||||||
#include <main_decl.h>
|
#include <main_decl.h>
|
||||||
#include <program_loading.h>
|
#include <program_loading.h>
|
||||||
|
#include <timestamp.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Systems without a native coreboot cache-as-ram teardown may implement
|
* 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. */
|
/* Recover cbmem so infrastruture using it is functional. */
|
||||||
cbmem_initialize();
|
cbmem_initialize();
|
||||||
|
|
||||||
|
timestamp_add_now(TS_START_POSTCAR);
|
||||||
|
|
||||||
display_mtrrs();
|
display_mtrrs();
|
||||||
|
|
||||||
/* Load and run ramstage. */
|
/* Load and run ramstage. */
|
||||||
|
|
|
@ -63,6 +63,8 @@ enum timestamp_id {
|
||||||
TS_LOAD_PAYLOAD = 90,
|
TS_LOAD_PAYLOAD = 90,
|
||||||
TS_ACPI_WAKE_JUMP = 98,
|
TS_ACPI_WAKE_JUMP = 98,
|
||||||
TS_SELFBOOT_JUMP = 99,
|
TS_SELFBOOT_JUMP = 99,
|
||||||
|
TS_START_POSTCAR = 100,
|
||||||
|
TS_END_POSTCAR = 101,
|
||||||
|
|
||||||
/* 500+ reserved for vendorcode extensions (500-600: google/chromeos) */
|
/* 500+ reserved for vendorcode extensions (500-600: google/chromeos) */
|
||||||
TS_START_COPYVER = 501,
|
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_BEFORE_END_OF_FIRMWARE, "calling FspNotify(EndOfFirmware)" },
|
||||||
{ TS_FSP_AFTER_END_OF_FIRMWARE,
|
{ TS_FSP_AFTER_END_OF_FIRMWARE,
|
||||||
"returning from FspNotify(EndOfFirmware)" },
|
"returning from FspNotify(EndOfFirmware)" },
|
||||||
|
{ TS_START_POSTCAR, "start of postcar" },
|
||||||
|
{ TS_END_POSTCAR, "end of postcar" },
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -128,6 +128,9 @@ void run_ramstage(void)
|
||||||
struct prog ramstage =
|
struct prog ramstage =
|
||||||
PROG_INIT(PROG_RAMSTAGE, CONFIG_CBFS_PREFIX "/ramstage");
|
PROG_INIT(PROG_RAMSTAGE, CONFIG_CBFS_PREFIX "/ramstage");
|
||||||
|
|
||||||
|
if (ENV_POSTCAR)
|
||||||
|
timestamp_add_now(TS_END_POSTCAR);
|
||||||
|
|
||||||
timestamp_add_now(TS_END_ROMSTAGE);
|
timestamp_add_now(TS_END_ROMSTAGE);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue