diff options
author | Ronak Kanabar <ronak.kanabar@intel.com> | 2023-06-14 09:28:16 +0530 |
---|---|---|
committer | Sridhar Siricilla <sridhar.siricilla@intel.com> | 2023-06-18 07:55:26 +0000 |
commit | 7bb9319b87bca7bc832dfa083c17e75d9b97e55a (patch) | |
tree | fb7800c95a99afd11e9ac6abfbd81a92f4211c2d /src/drivers/intel/fsp2_0/fsp_timestamp.c | |
parent | 3e523b495c2b7ed80a8b74714ff03952be411fee (diff) |
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>
Diffstat (limited to 'src/drivers/intel/fsp2_0/fsp_timestamp.c')
-rw-r--r-- | src/drivers/intel/fsp2_0/fsp_timestamp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/drivers/intel/fsp2_0/fsp_timestamp.c b/src/drivers/intel/fsp2_0/fsp_timestamp.c index d59ab1d781..81272564cf 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 @@ struct fpdt_pei_ext_perf_header { 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 @@ static void print_string_record(const struct generic_event_record *rec) { 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 @@ static void print_fsp_timestamp_header(void) 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"); } |