[coreboot-gerrit] New patch to review for coreboot: libpayload: Add data structures for hashes in file attributes
Patrick Georgi (pgeorgi@google.com)
gerrit at coreboot.org
Thu Oct 8 11:03:27 CET 2015
Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/11808
-gerrit
commit 91fce4af2085f8d9f75f448567f7462aea9e7e28
Author: Patrick Georgi <pgeorgi at google.com>
Date: Thu Oct 8 13:02:19 2015 +0200
libpayload: Add data structures for hashes in file attributes
Taken from cbfstool.
Change-Id: I4387900517dbfb1aa51ae6f679e26d0cf5b2acf8
Signed-off-by: Patrick Georgi <pgeorgi at google.com>
---
payloads/libpayload/include/cbfs_core.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/payloads/libpayload/include/cbfs_core.h b/payloads/libpayload/include/cbfs_core.h
index ec59a20..e25a89e 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);
More information about the coreboot-gerrit
mailing list