diff options
author | Patrick Georgi <patrick.georgi@secunet.com> | 2011-01-18 13:56:36 +0000 |
---|---|---|
committer | Patrick Georgi <patrick.georgi@coresystems.de> | 2011-01-18 13:56:36 +0000 |
commit | 244793784ce63957f3ba3a1b9dbf2d2cdf0c506a (patch) | |
tree | 3c3590ce9748a7f9a4a48875e9776f30034c6144 /src/arch/x86/boot/coreboot_table.c | |
parent | 024ec852c29685549e5167f4b5d9065e80287ee2 (diff) | |
download | coreboot-244793784ce63957f3ba3a1b9dbf2d2cdf0c506a.tar.xz |
Move option table (cmos.layout's binary representation)
to CBFS and adapt coreboot to use it.
Comments by Stefan and Mathias taken into account (except for
the build time failure if the table is missing when it should
exist and the "memory leak" in build_opt_tbl)
Signed-off-by: Patrick Georgi <patrick.georgi@secunet.com>
Acked-by: Stefan Reinauer <stepan@coreboot.org>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6268 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/arch/x86/boot/coreboot_table.c')
-rw-r--r-- | src/arch/x86/boot/coreboot_table.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/arch/x86/boot/coreboot_table.c b/src/arch/x86/boot/coreboot_table.c index 484340c96a..3dc8ea612b 100644 --- a/src/arch/x86/boot/coreboot_table.c +++ b/src/arch/x86/boot/coreboot_table.c @@ -542,11 +542,14 @@ unsigned long write_coreboot_table( #if (CONFIG_USE_OPTION_TABLE == 1) { - struct lb_record *rec_dest = lb_new_record(head); - /* Copy the option config table, it's already a lb_record... */ - memcpy(rec_dest, &option_table, option_table.size); - /* Create cmos checksum entry in coreboot table */ - lb_cmos_checksum(head); + struct cmos_option_table option_table = cbfs_find_file("cmos_layout.bin", 0x1aa); + if (option_table) { + struct lb_record *rec_dest = lb_new_record(head); + /* Copy the option config table, it's already a lb_record... */ + memcpy(rec_dest, &option_table, option_table.size); + /* Create cmos checksum entry in coreboot table */ + lb_cmos_checksum(head); + } } #endif /* Record where RAM is located */ |