summaryrefslogtreecommitdiff
path: root/src/lib/coreboot_table.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/coreboot_table.c')
-rw-r--r--src/lib/coreboot_table.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/lib/coreboot_table.c b/src/lib/coreboot_table.c
index 571d1ba520..18c70c9764 100644
--- a/src/lib/coreboot_table.c
+++ b/src/lib/coreboot_table.c
@@ -244,12 +244,17 @@ static inline void lb_vboot_handoff(struct lb_header *header) {}
#endif /* CONFIG_VBOOT */
#endif /* CONFIG_CHROMEOS */
+__attribute__((weak)) uint32_t board_id(void) { return UNDEFINED_STRAPPING_ID; }
+__attribute__((weak)) uint32_t ram_code(void) { return UNDEFINED_STRAPPING_ID; }
+
static void lb_board_id(struct lb_header *header)
{
-#if IS_ENABLED(CONFIG_BOARD_ID_AUTO)
struct lb_strapping_id *rec;
uint32_t bid = board_id();
+ if (bid == UNDEFINED_STRAPPING_ID)
+ return;
+
rec = (struct lb_strapping_id *)lb_new_record(header);
rec->tag = LB_TAG_BOARD_ID;
@@ -257,7 +262,6 @@ static void lb_board_id(struct lb_header *header)
rec->id_code = bid;
printk(BIOS_INFO, "Board ID: %d\n", bid);
-#endif
}
static void lb_boot_media_params(struct lb_header *header)
@@ -291,10 +295,12 @@ static void lb_boot_media_params(struct lb_header *header)
static void lb_ram_code(struct lb_header *header)
{
-#if IS_ENABLED(CONFIG_RAM_CODE_SUPPORT)
struct lb_strapping_id *rec;
uint32_t code = ram_code();
+ if (code == UNDEFINED_STRAPPING_ID)
+ return;
+
rec = (struct lb_strapping_id *)lb_new_record(header);
rec->tag = LB_TAG_RAM_CODE;
@@ -302,7 +308,6 @@ static void lb_ram_code(struct lb_header *header)
rec->id_code = code;
printk(BIOS_INFO, "RAM code: %d\n", code);
-#endif
}
static void add_cbmem_pointers(struct lb_header *header)