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>
This commit is contained in:
Ronak Kanabar 2023-06-14 09:28:16 +05:30 committed by Sridhar Siricilla
parent 3e523b495c
commit 7bb9319b87
1 changed files with 4 additions and 4 deletions

View File

@ -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");
}