summaryrefslogtreecommitdiff
path: root/payloads
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@google.com>2015-10-08 13:02:19 +0200
committerPatrick Georgi <pgeorgi@google.com>2015-10-11 12:36:24 +0000
commit78517f3a45f8485b8bad9421fd9360fd11e7fe59 (patch)
tree0aed2c0fa968003e0734068a8e8fb15bc6bdd92b /payloads
parent26fc544575d416e79d5194963d42b9e3b5385f94 (diff)
downloadcoreboot-78517f3a45f8485b8bad9421fd9360fd11e7fe59.tar.xz
libpayload: Add data structures for hashes in file attributes
Taken from cbfstool. Change-Id: I4387900517dbfb1aa51ae6f679e26d0cf5b2acf8 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: http://review.coreboot.org/11808 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'payloads')
-rw-r--r--payloads/libpayload/include/cbfs_core.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/payloads/libpayload/include/cbfs_core.h b/payloads/libpayload/include/cbfs_core.h
index ec59a20d72..e25a89ed20 100644
--- a/payloads/libpayload/include/cbfs_core.h
+++ b/payloads/libpayload/include/cbfs_core.h
@@ -143,6 +143,7 @@ struct cbfs_file {
#define CBFS_FILE_ATTR_TAG_UNUSED 0
#define CBFS_FILE_ATTR_TAG_UNUSED2 0xffffffff
#define CBFS_FILE_ATTR_TAG_COMPRESSION 0x42435a4c
+#define CBFS_FILE_ATTR_TAG_HASH 0x68736148
/* The common fields of extended cbfs file attributes.
Attributes are expected to start with tag/len, then append their
@@ -162,6 +163,14 @@ struct cbfs_file_attr_compression {
uint32_t decompressed_size;
} __attribute__((packed));
+struct cbfs_file_attr_hash {
+ uint32_t tag;
+ uint32_t len;
+ uint32_t hash_type;
+ /* hash_data is len - sizeof(struct) bytes */
+ uint8_t hash_data[];
+} __PACKED;
+
/* Given a cbfs_file, return the first file attribute, or NULL. */
struct cbfs_file_attribute *cbfs_file_first_attr(struct cbfs_file *file);