diff options
author | Simon Glass <sjg@chromium.org> | 2022-02-28 12:08:26 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-04-06 14:01:42 -0400 |
commit | 9dc29742c59888b0375d3975636e2b12c4a84683 (patch) | |
tree | 21edc0d4954b4762370893546ed905e9c573bff7 /include/cbfs.h | |
parent | ccfc9d78414df0fcb1c476c9e25925bc2ffe8897 (diff) | |
download | u-boot-9dc29742c59888b0375d3975636e2b12c4a84683.tar.gz u-boot-9dc29742c59888b0375d3975636e2b12c4a84683.tar.bz2 u-boot-9dc29742c59888b0375d3975636e2b12c4a84683.zip |
cbfs: Add some more definititions
Add definitions for a payload or 'self', which is like an unpacked ELF
file.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/cbfs.h')
-rw-r--r-- | include/cbfs.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/include/cbfs.h b/include/cbfs.h index 7449873b49..38efb1d2b0 100644 --- a/include/cbfs.h +++ b/include/cbfs.h @@ -24,6 +24,8 @@ enum cbfs_filetype { CBFS_TYPE_CBFSHEADER = 0x02, CBFS_TYPE_STAGE = 0x10, CBFS_TYPE_PAYLOAD = 0x20, + CBFS_TYPE_SELF = CBFS_TYPE_PAYLOAD, + CBFS_TYPE_FIT = 0x21, CBFS_TYPE_OPTIONROM = 0x30, CBFS_TYPE_BOOTSPLASH = 0x40, @@ -120,6 +122,47 @@ struct cbfs_file_attr_hash { u8 hash_data[]; } __packed; +/*** Component sub-headers ***/ + +/* Following are component sub-headers for the "standard" component types */ + +/** + * struct cbfs_stage - sub-header for stage components + * + * Stages are loaded by coreboot during the normal boot process + */ +struct cbfs_stage { + u32 compression; /** Compression type */ + u64 entry; /** entry point */ + u64 load; /** Where to load in memory */ + u32 len; /** length of data to load */ + u32 memlen; /** total length of object in memory */ +} __packed; + +/** + * struct cbfs_payload_segment - sub-header for payload components + * + * Payloads are loaded by coreboot at the end of the boot process + */ +struct cbfs_payload_segment { + u32 type; + u32 compression; + u32 offset; + u64 load_addr; + u32 len; + u32 mem_len; +} __packed; + +struct cbfs_payload { + struct cbfs_payload_segment segments; +}; + +#define PAYLOAD_SEGMENT_CODE 0x45444F43 +#define PAYLOAD_SEGMENT_DATA 0x41544144 +#define PAYLOAD_SEGMENT_BSS 0x20535342 +#define PAYLOAD_SEGMENT_PARAMS 0x41524150 +#define PAYLOAD_SEGMENT_ENTRY 0x52544E45 + struct cbfs_cachenode { struct cbfs_cachenode *next; void *data; |