summaryrefslogtreecommitdiff
path: root/payloads/libpayload
diff options
context:
space:
mode:
Diffstat (limited to 'payloads/libpayload')
-rw-r--r--payloads/libpayload/libcbfs/cbfs_core.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/payloads/libpayload/libcbfs/cbfs_core.c b/payloads/libpayload/libcbfs/cbfs_core.c
index 9bae188cca..2ea2771e3a 100644
--- a/payloads/libpayload/libcbfs/cbfs_core.c
+++ b/payloads/libpayload/libcbfs/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);