X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=coreboot.git;a=blobdiff_plain;f=payloads%2Flibpayload%2Fdrivers%2Foptions.c;h=10d165ecc713382a4c2c036b9e5049a79c12eaef;hp=1b98cda7218baed968a4936db7bcc2e31ff645ea;hb=0a5951110812ad83abc6a61db992050a39209b8d;hpb=56f468d29b4beab59f5a751d8d30364962298328 diff --git a/payloads/libpayload/drivers/options.c b/payloads/libpayload/drivers/options.c index 1b98cda72..10d165ecc 100644 --- a/payloads/libpayload/drivers/options.c +++ b/payloads/libpayload/drivers/options.c @@ -171,6 +171,20 @@ static struct cb_cmos_entries *lookup_cmos_entry(struct cb_cmos_option_table *op return NULL; } +struct cb_cmos_entries *first_cmos_entry(struct cb_cmos_option_table *option_table) +{ + return lookup_cmos_entry(option_table, ""); +} + +struct cb_cmos_entries *next_cmos_entry(struct cb_cmos_entries *cmos_entry) +{ + struct cb_cmos_entries *next = (struct cb_cmos_entries*)((unsigned char *)cmos_entry + cmos_entry->size); + if (next->tag == CB_TAG_OPTION) + return next; + else + return NULL; +} + /* Either value or text must be NULL. Returns the field that matches "the other" for a given config_id */ static struct cb_cmos_enums *lookup_cmos_enum_core(struct cb_cmos_option_table *option_table, int config_id, u8 *value, char *text) {