diff options
author | Grzegorz Bernacki <bernacki@google.com> | 2023-04-05 10:46:08 +0000 |
---|---|---|
committer | Martin L Roth <gaumless@gmail.com> | 2023-06-05 13:48:52 +0000 |
commit | dd50efd43a610ce795c6294e2893723a30d58c71 (patch) | |
tree | c96d37868d19743fdfd78c5a256fe26b2f6f1f38 /src/soc/amd/mendocino | |
parent | 1c3849d5dc327866fc5f9e8805022b0f37d930a4 (diff) |
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>
Diffstat (limited to 'src/soc/amd/mendocino')
-rw-r--r-- | src/soc/amd/mendocino/Makefile.inc | 1 | ||||
-rw-r--r-- | src/soc/amd/mendocino/manifest.c | 24 |
2 files changed, 25 insertions, 0 deletions
diff --git a/src/soc/amd/mendocino/Makefile.inc b/src/soc/amd/mendocino/Makefile.inc index 8e33cf5167..ac7ec6d734 100644 --- a/src/soc/amd/mendocino/Makefile.inc +++ b/src/soc/amd/mendocino/Makefile.inc @@ -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 diff --git a/src/soc/amd/mendocino/manifest.c b/src/soc/amd/mendocino/manifest.c new file mode 100644 index 0000000000..3dd9b6ae43 --- /dev/null +++ b/src/soc/amd/mendocino/manifest.c @@ -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); |