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>
This commit is contained in:
parent
c420d538ee
commit
50c0a6d675
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -41,7 +41,7 @@ void soc_display_hob(const struct hob_header *hob)
|
|||
printk(BIOS_DEBUG, "\tResource type: 0x%x, attribute: 0x%x, addr: 0x%08llx, len: 0x%08llx\n",
|
||||
res->type, res->attribute_type, res->addr, res->length);
|
||||
printk(BIOS_DEBUG, "\tOwner GUID: ");
|
||||
fsp_print_guid(res->owner_guid);
|
||||
fsp_print_guid(BIOS_DEBUG, res->owner_guid);
|
||||
printk(BIOS_DEBUG, " (%s)\n", fsp_get_guid_name(res->owner_guid));
|
||||
|
||||
if (fsp_guid_compare(res->owner_guid, fsp_hob_iio_uds_guid) == 0)
|
||||
|
|
Loading…
Reference in New Issue