X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=payloads%2Flibpayload%2Finclude%2Flibpayload.h;h=dd98404e940042b44360136255672591f9e1d405;hb=da59f9a8fb83e9d3931ed1d9b49eb8915a318771;hp=8c8abc437ed822b736f59d710e36a3f36696ed1c;hpb=dbde80955845177d15bce31943e22546a8ca399b;p=coreboot.git diff --git a/payloads/libpayload/include/libpayload.h b/payloads/libpayload/include/libpayload.h index 8c8abc437..dd98404e9 100644 --- a/payloads/libpayload/include/libpayload.h +++ b/payloads/libpayload/include/libpayload.h @@ -194,10 +194,24 @@ 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 u8 *mem_accessor_base; +extern struct nvram_accessor *use_nvram, *use_mem; + +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); +int get_option_as_string(const struct nvram_accessor *nvram, struct cb_cmos_option_table *option_table, char **dest, char *name); +int set_option_from_string(const struct nvram_accessor *nvram, struct cb_cmos_option_table *option_table, char *value, char *name); /** * @defgroup console Console functions @@ -369,7 +383,7 @@ int sysinfo_have_multiboot(unsigned long *addr); int get_coreboot_info(struct sysinfo_t *info); int get_multiboot_info(struct sysinfo_t *info); -void lib_get_sysinfo(void); +int lib_get_sysinfo(void); /* Timer functions - defined by each architecture. */ unsigned int get_cpu_speed(void);