Patrick Georgi (pgeorgi@google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10927
-gerrit
commit dda090577853006f48ecac53f7f245f852444c6f Author: Patrick Georgi pgeorgi@chromium.org Date: Wed Jul 15 16:40:44 2015 +0200
cbfstool: improve specification of struct cbfs_file
Lock down its size and document some of the fields
Change-Id: I09fd6c80185345da0ae17d0f4498b50995fd1ec5 Signed-off-by: Patrick Georgi pgeorgi@chromium.org --- util/cbfstool/cbfs.h | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/util/cbfstool/cbfs.h b/util/cbfstool/cbfs.h index 14a7a37..6286eff 100644 --- a/util/cbfstool/cbfs.h +++ b/util/cbfstool/cbfs.h @@ -71,12 +71,16 @@ struct cbfs_header {
struct cbfs_file { uint8_t magic[8]; + /* length of file data */ uint32_t len; uint32_t type; uint32_t checksum; + /* length of header incl. variable data */ uint32_t offset; } __PACKED;
+_Static_assert(sizeof(struct cbfs_file) == 24, "cbfs_file size mismatch"); + struct cbfs_stage { uint32_t compression; uint64_t entry;