summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2021-03-31 18:30:29 -0700
committerJulius Werner <jwerner@chromium.org>2021-04-02 21:23:13 +0000
commit0972871a238e86f74119958c392fefe8c6d995fc (patch)
tree1975c2f4f8d5861a1ae3665c9bb22d2408feb663 /src/lib
parent45e103ca873c8e48d5048f377282347e6fc24daa (diff)
downloadcoreboot-0972871a238e86f74119958c392fefe8c6d995fc.tar.gz
coreboot-0972871a238e86f74119958c392fefe8c6d995fc.tar.bz2
coreboot-0972871a238e86f74119958c392fefe8c6d995fc.zip
coreboot_tables: Print strapping IDs when adding them to coreboot table
These used to be printed before CB:46605. Having them in the logs can be a huge timesaver when debugging logs sent to you by other people (especially from systems that don't boot all the way). Let's add them back. Signed-off-by: Julius Werner <jwerner@chromium.org> Change-Id: Ifdbfdd29d25a0937c27113ace776f7aec231a57d Reviewed-on: https://review.coreboot.org/c/coreboot/+/52011 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/coreboot_table.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/lib/coreboot_table.c b/src/lib/coreboot_table.c
index 29be857e1e93..cb85a1819a38 100644
--- a/src/lib/coreboot_table.c
+++ b/src/lib/coreboot_table.c
@@ -19,6 +19,7 @@
#include <cbmem.h>
#include <bootmem.h>
#include <bootsplash.h>
+#include <inttypes.h>
#include <spi_flash.h>
#include <smmstore.h>
@@ -305,10 +306,20 @@ static struct lb_board_config *lb_board_config(struct lb_header *header)
config->tag = LB_TAG_BOARD_CONFIG;
config->size = sizeof(*config);
+ const uint64_t fw_config = fw_config_get();
config->board_id = board_id();
config->ram_code = ram_code();
config->sku_id = sku_id();
- config->fw_config = pack_lb64(fw_config_get());
+ config->fw_config = pack_lb64(fw_config);
+
+ if (config->board_id != UNDEFINED_STRAPPING_ID)
+ printk(BIOS_INFO, "Board ID: %d\n", config->board_id);
+ if (config->ram_code != UNDEFINED_STRAPPING_ID)
+ printk(BIOS_INFO, "RAM code: %d\n", config->ram_code);
+ if (config->sku_id != UNDEFINED_STRAPPING_ID)
+ printk(BIOS_INFO, "SKU ID: %d\n", config->sku_id);
+ if (fw_config != UNDEFINED_FW_CONFIG)
+ printk(BIOS_INFO, "FW config: %#" PRIx64 "\n", fw_config);
return config;
}