summaryrefslogtreecommitdiff
path: root/src/commonlib/include/commonlib/cbfs_serialized.h
diff options
context:
space:
mode:
authorStefan Reinauer <stefan.reinauer@coreboot.org>2017-07-13 02:20:27 +0200
committerStefan Reinauer <stefan.reinauer@coreboot.org>2017-07-13 19:45:59 +0000
commit6a00113de8b9060a7227bcfa79b3786e3e592a33 (patch)
tree467f5653272ed2d16f6d8033ed8cd0e7391fb426 /src/commonlib/include/commonlib/cbfs_serialized.h
parent9f244a5494192707bfbb72e60f17411e9a35434a (diff)
downloadcoreboot-6a00113de8b9060a7227bcfa79b3786e3e592a33.tar.gz
Rename __attribute__((packed)) --> __packed
Also unify __attribute__ ((..)) to __attribute__((..)) and handle ((__packed__)) like ((packed)) Change-Id: Ie60a51c3fa92b5009724a5b7c2932e361bf3490c Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/15921 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/commonlib/include/commonlib/cbfs_serialized.h')
-rw-r--r--src/commonlib/include/commonlib/cbfs_serialized.h21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/commonlib/include/commonlib/cbfs_serialized.h b/src/commonlib/include/commonlib/cbfs_serialized.h
index 706f175268..9273b35958 100644
--- a/src/commonlib/include/commonlib/cbfs_serialized.h
+++ b/src/commonlib/include/commonlib/cbfs_serialized.h
@@ -48,6 +48,7 @@
#define _CBFS_SERIALIZED_H_
#include <stdint.h>
+#include <compiler.h>
/** These are standard values for the known compression
algorithms that coreboot knows about for stages and
@@ -101,7 +102,7 @@ struct cbfs_header {
uint32_t offset;
uint32_t architecture;
uint32_t pad[1];
-} __attribute__((packed));
+} __packed;
/* this used to be flexible, but wasn't ever set to something different. */
#define CBFS_ALIGNMENT 64
@@ -136,7 +137,7 @@ struct cbfs_file {
uint32_t type;
uint32_t attributes_offset;
uint32_t offset;
-} __attribute__((packed));
+} __packed;
/* The common fields of extended cbfs file attributes.
Attributes are expected to start with tag/len, then append their
@@ -146,7 +147,7 @@ struct cbfs_file_attribute {
/* len covers the whole structure, incl. tag and len */
uint32_t len;
uint8_t data[0];
-} __attribute__((packed));
+} __packed;
/* Depending on how the header was initialized, it may be backed with 0x00 or
* 0xff. Support both. */
@@ -163,7 +164,7 @@ struct cbfs_file_attr_compression {
/* whole file compression format. 0 if no compression. */
uint32_t compression;
uint32_t decompressed_size;
-} __attribute__((packed));
+} __packed;
struct cbfs_file_attr_hash {
uint32_t tag;
@@ -171,19 +172,19 @@ struct cbfs_file_attr_hash {
uint32_t hash_type;
/* hash_data is len - sizeof(struct) bytes */
uint8_t hash_data[];
-} __attribute__((packed));
+} __packed;
struct cbfs_file_attr_position {
uint32_t tag;
uint32_t len;
uint32_t position;
-} __attribute__((packed));
+} __packed;
struct cbfs_file_attr_align {
uint32_t tag;
uint32_t len;
uint32_t alignment;
-} __attribute__((packed));
+} __packed;
/*
* ROMCC does not understand uint64_t, so we hide future definitions as they are
@@ -205,7 +206,7 @@ struct cbfs_stage {
uint64_t load; /** Where to load in memory */
uint32_t len; /** length of data to load */
uint32_t memlen; /** total length of object in memory */
-} __attribute__((packed));
+} __packed;
/** this is the sub-header for payload components. Payloads
are loaded by coreboot at the end of the boot process */
@@ -217,7 +218,7 @@ struct cbfs_payload_segment {
uint64_t load_addr;
uint32_t len;
uint32_t mem_len;
-} __attribute__((packed));
+} __packed;
struct cbfs_payload {
struct cbfs_payload_segment segments;
@@ -232,7 +233,7 @@ struct cbfs_payload {
struct cbfs_optionrom {
uint32_t compression;
uint32_t len;
-} __attribute__((packed));
+} __packed;
#endif /* __ROMCC__ */