[coreboot] New patch to review for coreboot: 0191c0d libpayload: Expose options_checksum_valid

Patrick Georgi (patrick@georgi-clan.de) gerrit at coreboot.org
Thu Jan 26 15:40:46 CET 2012

Patrick Georgi (patrick at georgi-clan.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/586


commit 0191c0d84803e45481c36b1f30e481c7d42105d0
Author: Patrick Georgi <patrick.georgi at secunet.com>
Date:   Mon Jan 16 15:03:11 2012 +0100

    libpayload: Expose options_checksum_valid
    options_checksum_valid can be used as a fast test to
    identify invalid CMOS data by checking the checksum.
    Change-Id: I44635d4c5d389579ad82435907ba8658e1bd44bb
    Signed-off-by: Patrick Georgi <patrick.georgi at secunet.com>
 payloads/libpayload/drivers/options.c    |    2 +-
 payloads/libpayload/include/libpayload.h |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/payloads/libpayload/drivers/options.c b/payloads/libpayload/drivers/options.c
index b9ec698..c4e9d16 100644
--- a/payloads/libpayload/drivers/options.c
+++ b/payloads/libpayload/drivers/options.c
@@ -57,7 +57,7 @@ struct cb_cmos_option_table *get_system_option_table()
 	return phys_to_virt(lib_sysinfo.option_table);
-static int options_checksum_valid(const struct nvram_accessor *nvram)
+int options_checksum_valid(const struct nvram_accessor *nvram)
 	int i;
 	int range_start = lib_sysinfo.cmos_range_start / 8;
diff --git a/payloads/libpayload/include/libpayload.h b/payloads/libpayload/include/libpayload.h
index dd98404..488ad48 100644
--- a/payloads/libpayload/include/libpayload.h
+++ b/payloads/libpayload/include/libpayload.h
@@ -203,6 +203,7 @@ extern u8 *mem_accessor_base;
 extern struct nvram_accessor *use_nvram, *use_mem;
 struct cb_cmos_option_table *get_system_option_table(void);
+int options_checksum_valid(const struct nvram_accessor *nvram);
 void fix_options_checksum_with(const struct nvram_accessor *nvram);
 void fix_options_checksum(void);
 int get_option_with(const struct nvram_accessor *nvram, struct cb_cmos_option_table *option_table, void *dest, char *name);

More information about the coreboot mailing list