summaryrefslogtreecommitdiff
path: root/include/cbfs.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-03-15 08:00:16 +0300
committerSimon Glass <sjg@chromium.org>2021-03-27 03:59:37 +0300
commita202f17d7bc2a51af53352c6e21d6a70d167effe (patch)
treeb565dc3a89b4bb1c655cbf2ab5b5790fb1bf6933 /include/cbfs.h
parent0e2fee52d0fba6ceb455c7969eecb2cf73031267 (diff)
downloadu-boot-a202f17d7bc2a51af53352c6e21d6a70d167effe.tar.xz
cbfs: Support reading compression information
CBFS now supports compressed filed. Add support for reading this information so that the correct decompression can be applied. The decompression itself is not implemented in CBFS. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/cbfs.h')
-rw-r--r--include/cbfs.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/cbfs.h b/include/cbfs.h
index 055edbaac2..ae94f1dcdf 100644
--- a/include/cbfs.h
+++ b/include/cbfs.h
@@ -75,6 +75,15 @@ struct cbfs_fileheader {
char filename[];
} __packed;
+/**
+ * These are standard values for the known compression alogrithms that coreboot
+ * knows about for stages and payloads. Of course, other CBFS users can use
+ * whatever values they want, as long as they understand them.
+ */
+#define CBFS_COMPRESS_NONE 0
+#define CBFS_COMPRESS_LZMA 1
+#define CBFS_COMPRESS_LZ4 2
+
/*
* Depending on how the header was initialized, it may be backed with 0x00 or
* 0xff, so support both
@@ -119,6 +128,8 @@ struct cbfs_cachenode {
u32 data_length;
u32 name_length;
u32 attr_offset;
+ u32 comp_algo;
+ u32 decomp_size;
};
/**