diff options
author | Felix Held <felix-coreboot@felixheld.de> | 2022-11-14 22:11:56 +0100 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-11-16 15:00:00 +0000 |
commit | 50c0a6d675152172d99acc4108a8dc69a3f0daf9 (patch) | |
tree | d851eac8b977e3c985f2192a4b2c97fdce4c33cf /src/drivers/intel/fsp2_0 | |
parent | c420d538ee4e02d634d01cd30dd6ed5b6dafcc44 (diff) |
drivers/intel/fsp2_0: add log level parameter to fsp_print_guid
Not all functions that call fsp_print_guid print their output with the
BIOS_SPEW log level, so introduce a new log level parameter so that the
caller of fsp_print_guid can specify which log level fsp_print_guid
should use for printing the GUID.
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I3b37afe703f506d4913f95a954368c0eec0f862d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/69599
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Nikolai Vyssotski <nikolai.vyssotski@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/drivers/intel/fsp2_0')
-rw-r--r-- | src/drivers/intel/fsp2_0/fsp_timestamp.c | 4 | ||||
-rw-r--r-- | src/drivers/intel/fsp2_0/hand_off_block.c | 6 | ||||
-rw-r--r-- | src/drivers/intel/fsp2_0/hob_display.c | 4 | ||||
-rw-r--r-- | src/drivers/intel/fsp2_0/include/fsp/debug.h | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/src/drivers/intel/fsp2_0/fsp_timestamp.c b/src/drivers/intel/fsp2_0/fsp_timestamp.c index da14db91c0..d3f50263d3 100644 --- a/src/drivers/intel/fsp2_0/fsp_timestamp.c +++ b/src/drivers/intel/fsp2_0/fsp_timestamp.c @@ -46,7 +46,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)); - fsp_print_guid(rec->guid); + fsp_print_guid(BIOS_INFO, rec->guid); printk(BIOS_INFO, "\n"); } @@ -55,7 +55,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); - fsp_print_guid(rec->guid); + fsp_print_guid(BIOS_INFO, rec->guid); printk(BIOS_INFO, "\n"); } diff --git a/src/drivers/intel/fsp2_0/hand_off_block.c b/src/drivers/intel/fsp2_0/hand_off_block.c index 2ded336994..f0f580b813 100644 --- a/src/drivers/intel/fsp2_0/hand_off_block.c +++ b/src/drivers/intel/fsp2_0/hand_off_block.c @@ -190,7 +190,7 @@ enum cb_err fsp_hob_iterator_get_next_guid_extension(const struct hob_header **h return CB_ERR; } -void fsp_print_guid(const void *base) +void fsp_print_guid(int level, const void *base) { uint32_t big; uint16_t mid[2]; @@ -200,7 +200,7 @@ void fsp_print_guid(const void *base) mid[0] = read16(id + 4); mid[1] = read16(id + 6); - printk(BIOS_SPEW, "%08x-%04x-%04x-%02x%02x%02x%02x%02x%02x%02x%02x", + printk(level, "%08x-%04x-%04x-%02x%02x%02x%02x%02x%02x%02x%02x", big, mid[0], mid[1], id[8], id[9], id[10], id[11], id[12], id[13], id[14], id[15]); } @@ -216,7 +216,7 @@ int fsp_find_range_hob(struct range_entry *re, const uint8_t guid[16]) range_entry_init(re, 0, 0, 0); if (fsp_hob_iterator_get_next_guid_resource(&hob_iterator, guid, &fsp_mem) != CB_SUCCESS) { - fsp_print_guid(guid); + fsp_print_guid(BIOS_SPEW, guid); printk(BIOS_SPEW, " not found!\n"); return -1; } diff --git a/src/drivers/intel/fsp2_0/hob_display.c b/src/drivers/intel/fsp2_0/hob_display.c index f21ebfeb5f..93406636fe 100644 --- a/src/drivers/intel/fsp2_0/hob_display.c +++ b/src/drivers/intel/fsp2_0/hob_display.c @@ -97,7 +97,7 @@ void fsp_print_resource_descriptor(const void *base) printk(BIOS_SPEW, "\t0x%08llx + 0x%08llx\n", res->addr, res->length); if (!fsp_guid_compare(res->owner_guid, empty_guid)) { printk(BIOS_SPEW, "\tOwner GUID: "); - fsp_print_guid(res->owner_guid); + fsp_print_guid(BIOS_SPEW, res->owner_guid); printk(BIOS_SPEW, " (%s)\n", fsp_get_guid_name(res->owner_guid)); } @@ -159,7 +159,7 @@ void fsp_print_guid_extension_hob(const struct hob_header *hob) res = fsp_hob_header_to_resource(hob); printk(BIOS_SPEW, "\t"); - fsp_print_guid(res->owner_guid); + fsp_print_guid(BIOS_SPEW, res->owner_guid); printk(BIOS_SPEW, ": %s\n", fsp_get_guid_name(res->owner_guid)); /* Some of the SoC FSP specific hobs are of type HOB_TYPE_GUID_EXTENSION */ diff --git a/src/drivers/intel/fsp2_0/include/fsp/debug.h b/src/drivers/intel/fsp2_0/include/fsp/debug.h index b6f982ac63..044ce95e5a 100644 --- a/src/drivers/intel/fsp2_0/include/fsp/debug.h +++ b/src/drivers/intel/fsp2_0/include/fsp/debug.h @@ -51,7 +51,7 @@ void soc_display_hob(const struct hob_header *hob); /* FSP debug utility functions */ void fsp_display_upd_value(const char *name, size_t size, uint64_t old, uint64_t new); -void fsp_print_guid(const void *guid); +void fsp_print_guid(int level, const void *guid); void fsp_print_memory_resource_hobs(void); void fsp_print_resource_descriptor(const void *base); const char *fsp_get_hob_type_name(const struct hob_header *hob); |