Sridhar Siricilla has submitted this change. ( https://review.coreboot.org/c/coreboot/+/75816?usp=email )
Change subject: drivers/intel/fsp2_0: Correct FPDT timestamp unit and macro name ......................................................................
drivers/intel/fsp2_0: Correct FPDT timestamp unit and macro name
FSP performance timestamp is in nano second by default. This patch is to correct unit in FSP performance timestamp data print and macro name to avoid confusion.
Change-Id: I4aec4f63beddbd7ce6e8e3fc1b53a45da2ee0b00 Signed-off-by: Ronak Kanabar ronak.kanabar@intel.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/75816 Reviewed-by: Sridhar Siricilla sridhar.siricilla@intel.com Reviewed-by: Himanshu Sahdev himanshu.sahdev@intel.com Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Subrata Banik subratabanik@google.com --- M src/drivers/intel/fsp2_0/fsp_timestamp.c 1 file changed, 4 insertions(+), 4 deletions(-)
Approvals: Himanshu Sahdev: Looks good to me, but someone else must approve Subrata Banik: Looks good to me, approved build bot (Jenkins): Verified Sridhar Siricilla: Looks good to me, approved
diff --git a/src/drivers/intel/fsp2_0/fsp_timestamp.c b/src/drivers/intel/fsp2_0/fsp_timestamp.c index d59ab1d..8127256 100644 --- a/src/drivers/intel/fsp2_0/fsp_timestamp.c +++ b/src/drivers/intel/fsp2_0/fsp_timestamp.c @@ -4,7 +4,7 @@ #include <fsp/util.h> #include <lib.h>
-#define TIMESTAMP_MS(x) ((x) / 1000ull) +#define TIMESTAMP_TO_MICRO(x) ((x) / 1000ull)
static const uint8_t fpdt_guid[16] = { 0xfd, 0x7b, 0x38, 0x3b, 0xbc, 0x7a, 0xf2, 0x4c, @@ -44,7 +44,7 @@
static void print_guid_record(const struct generic_event_record *rec) { - printk(BIOS_INFO, "%5x\t%16llu\t\t", rec->progress_id, TIMESTAMP_MS(rec->timestamp)); + printk(BIOS_INFO, "%5x\t%16llu\t\t", rec->progress_id, TIMESTAMP_TO_MICRO(rec->timestamp)); fsp_print_guid(BIOS_INFO, rec->guid); printk(BIOS_INFO, "\n"); } @@ -53,7 +53,7 @@ { size_t str_len = rec->header.length - offsetof(struct generic_event_record, string); printk(BIOS_INFO, "%5x\t%16llu\t\t%*s/", - rec->progress_id, TIMESTAMP_MS(rec->timestamp), (int)str_len, rec->string); + rec->progress_id, TIMESTAMP_TO_MICRO(rec->timestamp), (int)str_len, rec->string); fsp_print_guid(BIOS_INFO, rec->guid); printk(BIOS_INFO, "\n"); } @@ -78,7 +78,7 @@ printk(BIOS_INFO, "+---------------------------------------------------+\n"); printk(BIOS_INFO, "|------ FSP Performance Timestamp Table Dump -------|\n"); printk(BIOS_INFO, "+---------------------------------------------------+\n"); - printk(BIOS_INFO, "| Perf-ID\tTimestamp(ms)\t\tString/GUID |\n"); + printk(BIOS_INFO, "| Perf-ID\tTimestamp(us)\t\tString/GUID |\n"); printk(BIOS_INFO, "+---------------------------------------------------+\n"); }