CBFS stuff:

- update, add, and improve comments
- whitespace here and there
- remove unused or write-only variables
- improve debug output
- only build payload.{nrv2b,lzma} for non-cbfs
- improved error checking in cbfstool

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Peter Stuge <peter@stuge.se>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4466 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Stefan Reinauer
2009-07-23 22:03:14 +00:00
committed by Patrick Georgi
parent aeb6c9870f
commit f64893a94f
6 changed files with 130 additions and 55 deletions

View File

@ -59,16 +59,16 @@ struct cbfs_header *cbfs_master_header(void)
struct cbfs_header *header;
void *ptr = (void *)*((unsigned long *) CBFS_HEADPTR_ADDR);
printk_debug("Check CBFS header at %p\n", ptr);
printk_spew("Check CBFS header at %p\n", ptr);
header = (struct cbfs_header *) ptr;
printk_debug("magic is %08x\n", ntohl(header->magic));
printk_spew("magic is %08x\n", ntohl(header->magic));
if (ntohl(header->magic) != CBFS_HEADER_MAGIC) {
printk_err("NO CBFS HEADER\n");
printk_err("ERROR: No valid CBFS header found!\n");
return NULL;
}
printk_debug("Found CBFS header at %p\n", ptr);
printk_spew("Found CBFS header at %p\n", ptr);
return header;
}
@ -86,7 +86,7 @@ struct cbfs_file *cbfs_find(const char *name)
while(1) {
struct cbfs_file *file = (struct cbfs_file *) offset;
if (!cbfs_check_magic(file)) return NULL;
printk_info("Check %s\n", CBFS_NAME(file));
printk_debug("Check %s\n", CBFS_NAME(file));
if (!strcmp(CBFS_NAME(file), name))
return file;