soc/amd/mendocino: Print content of manifest file

This adds printing content of 'manifest' file at ramstage.
It allows to learn about blobs version used to build the coreboot
binary, which is useful when investigating bugs.
Version data are stored in CBFS file, which was generated during
coreboot build. If AMD FW blobs will be manually replaced in coreboot
image, versions from CBFS file are no longer valid.

Log:

    AMDFW blobs version:
    type: 0x01 ver:00.3c.01.18
    type: 0x08 ver:00.5a.28.00
    type: 0x30 ver:2b.25.b0.10
    type: 0x73 ver:00.3c.01.18

BUG=b:224780134
TEST=Tested on Skyrim device

Change-Id: I8df54b74cd987b4a3be635932d38ea178d0b0311
Signed-off-by: Grzegorz Bernacki <bernacki@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/74269
Reviewed-by: Himanshu Sahdev <himanshu.sahdev@intel.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Grzegorz Bernacki 2023-04-05 10:46:08 +00:00 committed by Martin L Roth
parent 1c3849d5dc
commit dd50efd43a
2 changed files with 25 additions and 0 deletions

View File

@ -31,6 +31,7 @@ ramstage-y += fsp_s_params.c
ramstage-y += mca.c
ramstage-y += root_complex.c
ramstage-y += xhci.c
ramstage-y += manifest.c
smm-y += gpio.c
smm-y += smihandler.c

View File

@ -0,0 +1,24 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <bootstate.h>
#include <cbfs.h>
static void print_blob_version(void *arg)
{
char *version;
size_t size;
version = cbfs_map("amdfw_manifest", &size);
if (!version) {
printk(BIOS_WARNING, "Failed to get amdfw_manifest\n");
return;
}
printk(BIOS_INFO, "AMDFW blobs version:\n");
printk(BIOS_INFO, "%.*s", (int)size, version);
cbfs_unmap(version);
}
BOOT_STATE_INIT_ENTRY(BS_PAYLOAD_LOAD, BS_ON_ENTRY, print_blob_version, NULL);