Grzegorz Bernacki | dd50efd | 2023-04-05 10:46:08 +0000 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | |
| 3 | #include <bootstate.h> |
| 4 | #include <cbfs.h> |
| 5 | |
| 6 | static void print_blob_version(void *arg) |
| 7 | { |
| 8 | char *version; |
| 9 | size_t size; |
| 10 | |
| 11 | version = cbfs_map("amdfw_manifest", &size); |
| 12 | |
| 13 | if (!version) { |
| 14 | printk(BIOS_WARNING, "Failed to get amdfw_manifest\n"); |
| 15 | return; |
| 16 | } |
| 17 | |
| 18 | printk(BIOS_INFO, "AMDFW blobs version:\n"); |
| 19 | printk(BIOS_INFO, "%.*s", (int)size, version); |
| 20 | |
| 21 | cbfs_unmap(version); |
| 22 | } |
| 23 | |
| 24 | BOOT_STATE_INIT_ENTRY(BS_PAYLOAD_LOAD, BS_ON_ENTRY, print_blob_version, NULL); |