summaryrefslogtreecommitdiff
path: root/src/pc80
diff options
context:
space:
mode:
authorPatrick Georgi <patrick.georgi@secunet.com>2011-01-18 13:56:36 +0000
committerPatrick Georgi <patrick.georgi@coresystems.de>2011-01-18 13:56:36 +0000
commit244793784ce63957f3ba3a1b9dbf2d2cdf0c506a (patch)
tree3c3590ce9748a7f9a4a48875e9776f30034c6144 /src/pc80
parent024ec852c29685549e5167f4b5d9065e80287ee2 (diff)
downloadcoreboot-244793784ce63957f3ba3a1b9dbf2d2cdf0c506a.tar.xz
Move option table (cmos.layout's binary representation)
to CBFS and adapt coreboot to use it. Comments by Stefan and Mathias taken into account (except for the build time failure if the table is missing when it should exist and the "memory leak" in build_opt_tbl) Signed-off-by: Patrick Georgi <patrick.georgi@secunet.com> Acked-by: Stefan Reinauer <stepan@coreboot.org> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6268 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/pc80')
-rw-r--r--src/pc80/mc146818rtc.c4
-rw-r--r--src/pc80/mc146818rtc_early.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/pc80/mc146818rtc.c b/src/pc80/mc146818rtc.c
index ce9132596b..32543f01c2 100644
--- a/src/pc80/mc146818rtc.c
+++ b/src/pc80/mc146818rtc.c
@@ -4,6 +4,7 @@
#include <string.h>
#if CONFIG_USE_OPTION_TABLE
#include "option_table.h"
+#include <cbfs.h>
#endif
/* control registers - Moto names
@@ -217,7 +218,6 @@ static int get_cmos_value(unsigned long bit, unsigned long length, void *vret)
int get_option(void *dest, const char *name)
{
- extern struct cmos_option_table option_table;
struct cmos_option_table *ct;
struct cmos_entries *ce;
size_t namelen;
@@ -227,7 +227,7 @@ int get_option(void *dest, const char *name)
namelen = strnlen(name, CMOS_MAX_NAME_LENGTH);
/* find the requested entry record */
- ct=&option_table;
+ ct=cbfs_find_file("cmos_layout.bin", CMOS_COMPONENT_CMOS_LAYOUT);
ce=(struct cmos_entries*)((unsigned char *)ct + ct->header_length);
for(;ce->tag==LB_TAG_OPTION;
ce=(struct cmos_entries*)((unsigned char *)ce + ce->size)) {
diff --git a/src/pc80/mc146818rtc_early.c b/src/pc80/mc146818rtc_early.c
index bb81ca7b65..455ed08ab9 100644
--- a/src/pc80/mc146818rtc_early.c
+++ b/src/pc80/mc146818rtc_early.c
@@ -65,7 +65,7 @@ static inline int do_normal_boot(void)
if (cmos_error() || !cmos_chksum_valid()) {
#if CONFIG_USE_CMOS_RECOVERY
- char *cmos_default = cbfs_find_file("cmos.default", 0xaa);
+ char *cmos_default = cbfs_find_file("cmos.default", CBFS_COMPONENT_CMOS_DEFAULT);
if (cmos_default) {
printk_warning("WARNING - CMOS CORRUPTED. RESTORING DEFAULTS.\n");
/* First 14 bytes are reserved for