diff options
author | Stefan Reinauer <stepan@coresystems.de> | 2008-08-07 10:21:05 +0000 |
---|---|---|
committer | Stefan Reinauer <stepan@openbios.org> | 2008-08-07 10:21:05 +0000 |
commit | 95a6e1cab25abbae51dd2c02cd9158f53a0212a7 (patch) | |
tree | f439ec6a27d55cdce0858c5b5f83f4cb2fbb8126 /payloads/libpayload/i386 | |
parent | ebc92186cc9144aaacd37ca1ae94fcff60ec577a (diff) |
add get_option to libpayload, so coreboot cmos options can be queried.
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Jordan Crouse <jordan.crouse@amd.com>
Acked-by: Peter Stuge <peter@stuge.se>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3474 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'payloads/libpayload/i386')
-rw-r--r-- | payloads/libpayload/i386/coreboot.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/payloads/libpayload/i386/coreboot.c b/payloads/libpayload/i386/coreboot.c index 9cbd4ef84a..97589261a5 100644 --- a/payloads/libpayload/i386/coreboot.c +++ b/payloads/libpayload/i386/coreboot.c @@ -74,6 +74,21 @@ static void cb_parse_serial(unsigned char *ptr, struct sysinfo_t *info) info->ser_ioport = ser->ioport; } +#ifdef CONFIG_NVRAM +static void cb_parse_optiontable(unsigned char *ptr, struct sysinfo_t *info) +{ + info->option_table = (struct cb_cmos_option_table *)ptr; +} + +static void cb_parse_checksum(unsigned char *ptr, struct sysinfo_t *info) +{ + struct cb_cmos_checksum *cmos_cksum = (struct cb_cmos_checksum *)ptr; + info->cmos_range_start = cmos_cksum->range_start; + info->cmos_range_end = cmos_cksum->range_end; + info->cmos_checksum_location = cmos_cksum->location; +} +#endif + static int cb_parse_header(void *addr, int len, struct sysinfo_t *info) { struct cb_header *header; @@ -115,6 +130,14 @@ static int cb_parse_header(void *addr, int len, struct sysinfo_t *info) case CB_TAG_SERIAL: cb_parse_serial(ptr, info); break; +#ifdef CONFIG_NVRAM + case CB_TAG_CMOS_OPTION_TABLE: + cb_parse_optiontable(ptr, info); + break; + case CB_TAG_OPTION_CHECKSUM: + cb_parse_checksum(ptr, info); + break; +#endif } ptr += rec->size; |