[coreboot-gerrit] Patch set updated for coreboot: lib/coreboot_table: add function to allow arch code to add records

Aaron Durbin (adurbin@chromium.org) gerrit at coreboot.org
Wed Feb 17 20:19:41 CET 2016


Aaron Durbin (adurbin at chromium.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13669

-gerrit

commit e7e2285ca68a1c45ecc5a0f2025faf166aa0a6c8
Author: Aaron Durbin <adurbin at chromium.org>
Date:   Wed Feb 10 10:52:47 2016 -0600

    lib/coreboot_table: add function to allow arch code to add records
    
    Add lb_arch_add_records() to allow the architecture code to
    generically hook into the coreboot table generation.
    
    BUG=chrome-os-partner:50214
    BRANCH=glados
    TEST=With all subsequent patches confirmed lb_arch_add_records() is
         called when a strong symbol is provided.
    
    Change-Id: I7c69c0ff0801392bbcf5aef586a48388b624afd4
    Signed-off-by: Aaron Durbin <adurbin at chromium.org>
---
 src/include/boot/coreboot_tables.h | 3 +++
 src/lib/coreboot_table.c           | 5 +++++
 2 files changed, 8 insertions(+)

diff --git a/src/include/boot/coreboot_tables.h b/src/include/boot/coreboot_tables.h
index ff942f1..34183a0 100644
--- a/src/include/boot/coreboot_tables.h
+++ b/src/include/boot/coreboot_tables.h
@@ -22,6 +22,9 @@ void lb_board(struct lb_header *header);
 /* Define this in soc or fsp driver to add specific table entries. */
 void lb_framebuffer(struct lb_header *header);
 
+/* Allow arch to add records. */
+void lb_arch_add_records(struct lb_header *header);
+
 /*
  * Function to retrieve MAC address(es) from the VPD and store them in the
  * coreboot table.
diff --git a/src/lib/coreboot_table.c b/src/lib/coreboot_table.c
index 86f22c9..cc336c2 100644
--- a/src/lib/coreboot_table.c
+++ b/src/lib/coreboot_table.c
@@ -389,6 +389,8 @@ static void lb_record_version_timestamp(struct lb_header *header)
 
 void __attribute__((weak)) lb_board(struct lb_header *header) { /* NOOP */ }
 
+void __attribute__((weak)) lb_arch_add_records(struct lb_header *header) { }
+
 static struct lb_forward *lb_forward(struct lb_header *header, struct lb_header *next_header)
 {
 	struct lb_record *rec;
@@ -540,6 +542,9 @@ unsigned long write_coreboot_table(
 
 	lb_boot_media_params(head);
 
+	/* Add architecture records. */
+	lb_arch_add_records(head);
+
 	/* Add all cbmem entries into the coreboot tables. */
 	cbmem_add_records_to_cbtable(head);
 



More information about the coreboot-gerrit mailing list