Report if cmos_layout.bin can't be found when it should.
authorPatrick Georgi <patrick.georgi@secunet.com>
Tue, 18 Jan 2011 14:28:45 +0000 (14:28 +0000)
committerPatrick Georgi <patrick.georgi@coresystems.de>
Tue, 18 Jan 2011 14:28:45 +0000 (14:28 +0000)
Signed-off-by: Patrick Georgi <patrick.georgi@secunet.com>
Acked-by: Patrick Georgi <patrick.georgi@secunet.com>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6269 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1

src/arch/x86/boot/coreboot_table.c
src/pc80/mc146818rtc.c

index 3dc8ea612bb7afaf6abb58c8450784839a93a0e7..dea030b60ac56b8d25cac6d707c8a9f6af01a032 100644 (file)
@@ -549,6 +549,8 @@ unsigned long write_coreboot_table(
                        memcpy(rec_dest,  &option_table, option_table.size);
                        /* Create cmos checksum entry in coreboot table */
                        lb_cmos_checksum(head);
+               } else {
+                       printk(BIOS_ERR, "cmos_layout.bin could not be found!\n");
                }
        }
 #endif
index 32543f01c2b85380bce22f7274a78f7d94a24392..d9a3d481e9caf1e3e80887a26482e671d939d4c8 100644 (file)
@@ -228,6 +228,10 @@ int get_option(void *dest, const char *name)
 
        /* find the requested entry record */
        ct=cbfs_find_file("cmos_layout.bin", CMOS_COMPONENT_CMOS_LAYOUT);
+       if (!ct) {
+               printk(BIOS_ERR, "cmos_layout.bin could not be found. Options are disabled\n");
+               return(-2);
+       }
        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)) {