summaryrefslogtreecommitdiff
path: root/payloads/libpayload/include/libpayload.h
diff options
context:
space:
mode:
authorPatrick Georgi <patrick.georgi@secunet.com>2012-01-16 10:14:24 +0100
committerPatrick Georgi <patrick@georgi-clan.de>2012-02-02 15:48:27 +0100
commit317ca0d75190cdda385cca327991b72f14e9667f (patch)
tree9e1680861d1f564b66cf63571f6d11fa2d73653d /payloads/libpayload/include/libpayload.h
parent56f2a6d6e534b47cd5fab4b092e0ba887be2a5b4 (diff)
downloadcoreboot-317ca0d75190cdda385cca327991b72f14e9667f.tar.xz
libpayload: Refactor highlevel CMOS access
This will allow using libpayload functions to access CMOS data in template files in RAM or CBFS. Change-Id: I323ed625e657cbdc1fae8c279a82ee578e83ad00 Signed-off-by: Patrick Georgi <patrick.georgi@secunet.com> Reviewed-on: http://review.coreboot.org/583 Reviewed-by: Ronald G. Minnich <rminnich@gmail.com> Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
Diffstat (limited to 'payloads/libpayload/include/libpayload.h')
-rw-r--r--payloads/libpayload/include/libpayload.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/payloads/libpayload/include/libpayload.h b/payloads/libpayload/include/libpayload.h
index d9f7d21781..91156e53df 100644
--- a/payloads/libpayload/include/libpayload.h
+++ b/payloads/libpayload/include/libpayload.h
@@ -194,9 +194,20 @@ void video_console_set_cursor(unsigned int cursorx, unsigned int cursory);
/** @} */
/* drivers/option.c */
+struct nvram_accessor {
+ u8 (*read)(u8 reg);
+ void (*write)(u8 val, u8 reg);
+};
+
+extern struct nvram_accessor *use_nvram;
+
+struct cb_cmos_option_table *get_system_option_table(void);
+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);
int get_option_from(struct cb_cmos_option_table *option_table, void *dest, char *name);
int get_option(void *dest, char *name);
+int set_option_with(const struct nvram_accessor *nvram, struct cb_cmos_option_table *option_table, void *value, char *name);
int set_option(void *value, char *name);
/**