diff options
Diffstat (limited to 'src/lib/cbfs_core.c')
-rw-r--r-- | src/lib/cbfs_core.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/cbfs_core.c b/src/lib/cbfs_core.c index 42b8c0966f..da7bb6a912 100644 --- a/src/lib/cbfs_core.c +++ b/src/lib/cbfs_core.c @@ -116,12 +116,12 @@ struct cbfs_file *cbfs_get_file(struct cbfs_media *media, const char *name) align = ntohl(header->align); romsize = ntohl(header->romsize); - // TODO header->romsize seems broken now on ARM. Remove this when it's - // fixed. -#if defined(CONFIG_ARCH_ARMV7) && CONFIG_ARCH_ARMV7 - romsize = CONFIG_ROM_SIZE; + // TODO Add a "size" in CBFS header for a platform independent way to + // determine the end of CBFS data. +#if defined(CONFIG_ARCH_X86) && CONFIG_ARCH_X86 + romsize -= htonl(header->bootblocksize); #endif - DEBUG("offset: 0x%x, align: %d, romsize: %d\n", offset, align, romsize); + DEBUG("CBFS location: 0x%x~0x%x, align: %d\n", offset, romsize, align); LOG("Looking for '%s' starting from 0x%x.\n", name, offset); media->open(media); |