From 08ed5a86978ba3934a0c25b2e6e8077112e8f1b2 Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Mon, 24 Sep 2012 20:06:27 +0200 Subject: libpayload: Extend CMOS access library libpayload already contained a number of functions for convenient access to CMOS configuration. Add functions to support iteration over available enum fields. Change-Id: If95f45d7223d2e19c42f1d8680c12d23f6890a01 Signed-off-by: Patrick Georgi Reviewed-on: http://review.coreboot.org/1538 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- payloads/libpayload/include/libpayload.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'payloads/libpayload/include/libpayload.h') diff --git a/payloads/libpayload/include/libpayload.h b/payloads/libpayload/include/libpayload.h index c67c659684..2deb9613a1 100644 --- a/payloads/libpayload/include/libpayload.h +++ b/payloads/libpayload/include/libpayload.h @@ -206,8 +206,15 @@ 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); + struct cb_cmos_entries *first_cmos_entry(struct cb_cmos_option_table *option_table); struct cb_cmos_entries *next_cmos_entry(struct cb_cmos_entries *cur); + +struct cb_cmos_enums *first_cmos_enum(struct cb_cmos_option_table *option_table); +struct cb_cmos_enums *next_cmos_enum(struct cb_cmos_enums *cmos_enum); +struct cb_cmos_enums *first_cmos_enum_of_id(struct cb_cmos_option_table *option_table, int id); +struct cb_cmos_enums *next_cmos_enum_of_id(struct cb_cmos_enums *cmos_enum, int id); + int get_option_with(const struct nvram_accessor *nvram, struct cb_cmos_option_table *option_table, void *dest, const char *name); int get_option_from(struct cb_cmos_option_table *option_table, void *dest, const char *name); int get_option(void *dest, const char *name); -- cgit v1.2.3