Attention is currently required from: Shelley Chen, Martin L Roth, Arthur Heymans.
Hello Shelley Chen, build bot (Jenkins), Martin L Roth, Julius Werner,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/69753
to look at the new patch set (#2).
Change subject: util/cbfstool: Add zstd support ......................................................................
util/cbfstool: Add zstd support
This adds zstd support to cbfstool. The code is taken from zstd-1.5.2 and one minor modifications: renaming xxhash.c to xxhash_zstd.c to avoid namespace conflicts with lz4.
ZSTD offers similar compression ratios to LZMA, but a vastly fast decompress speed. Typically ZSTD results in slightly larger binaries than LZMA. Whether ZSTD should then be preferred over LZMA depends on a few things: - Caching: When loading from memory mapped boot devices, ZSTD will read the boot medium multiple times, while LZMA will not. If the memory mapped boot medium is not cached ZSTD results in much slower decompression. - Boot medium speed: Often, but not always LZMA results in smaller binaries. If the boot medium is the bottleneck, than loading smaller binaries might actually be faster. On a fast boot medium (high spi freq, using quad/dual io), the performance benefits from ZSTD might be more substantial - ZSTD decompression code has a much larger footprint than LZMA. If the stage (postcar) is loaded in uncached memory the size increase might slow things down. - ZSTD uses a lot of .bss (CTX is 95792 bytes large). This might not be available in some environments.
Change-Id: I34508268f8767008ef25cb9e466d201345881232 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/commonlib/bsd/include/commonlib/bsd/cbfs_serialized.h M src/commonlib/bsd/include/commonlib/bsd/compression.h A src/commonlib/bsd/zstd/common/bitstream.h A src/commonlib/bsd/zstd/common/compiler.h A src/commonlib/bsd/zstd/common/cpu.h A src/commonlib/bsd/zstd/common/debug.c A src/commonlib/bsd/zstd/common/debug.h A src/commonlib/bsd/zstd/common/entropy_common.c A src/commonlib/bsd/zstd/common/error_private.c A src/commonlib/bsd/zstd/common/error_private.h A src/commonlib/bsd/zstd/common/fse.h A src/commonlib/bsd/zstd/common/fse_decompress.c A src/commonlib/bsd/zstd/common/huf.h A src/commonlib/bsd/zstd/common/mem.h A src/commonlib/bsd/zstd/common/pool.c A src/commonlib/bsd/zstd/common/pool.h A src/commonlib/bsd/zstd/common/portability_macros.h A src/commonlib/bsd/zstd/common/threading.c A src/commonlib/bsd/zstd/common/threading.h A src/commonlib/bsd/zstd/common/xxhash.h A src/commonlib/bsd/zstd/common/xxhash_zstd.c A src/commonlib/bsd/zstd/common/zstd_common.c A src/commonlib/bsd/zstd/common/zstd_deps.h A src/commonlib/bsd/zstd/common/zstd_internal.h A src/commonlib/bsd/zstd/common/zstd_trace.h A src/commonlib/bsd/zstd/decompress/huf_decompress.c A src/commonlib/bsd/zstd/decompress/huf_decompress_amd64.S A src/commonlib/bsd/zstd/decompress/zstd_ddict.c A src/commonlib/bsd/zstd/decompress/zstd_ddict.h A src/commonlib/bsd/zstd/decompress/zstd_decompress.c A src/commonlib/bsd/zstd/decompress/zstd_decompress_block.c A src/commonlib/bsd/zstd/decompress/zstd_decompress_block.h A src/commonlib/bsd/zstd/decompress/zstd_decompress_internal.h A src/commonlib/bsd/zstd/zdict.h A src/commonlib/bsd/zstd/zstd.h A src/commonlib/bsd/zstd/zstd_errors.h M util/cbfstool/Makefile.inc M util/cbfstool/cbfs.h M util/cbfstool/compress.c A util/cbfstool/zstd/common/bitstream.h A util/cbfstool/zstd/common/compiler.h A util/cbfstool/zstd/common/cpu.h A util/cbfstool/zstd/common/debug.h A util/cbfstool/zstd/common/error_private.h A util/cbfstool/zstd/common/fse.h A util/cbfstool/zstd/common/huf.h A util/cbfstool/zstd/common/mem.h A util/cbfstool/zstd/common/pool.h A util/cbfstool/zstd/common/portability_macros.h A util/cbfstool/zstd/common/threading.h A util/cbfstool/zstd/common/xxhash.h A util/cbfstool/zstd/common/zstd_deps.h A util/cbfstool/zstd/common/zstd_internal.h A util/cbfstool/zstd/common/zstd_trace.h A util/cbfstool/zstd/compress/clevels.h A util/cbfstool/zstd/compress/fse_compress.c A util/cbfstool/zstd/compress/hist.c A util/cbfstool/zstd/compress/hist.h A util/cbfstool/zstd/compress/huf_compress.c A util/cbfstool/zstd/compress/zstd_compress.c A util/cbfstool/zstd/compress/zstd_compress_internal.h A util/cbfstool/zstd/compress/zstd_compress_literals.c A util/cbfstool/zstd/compress/zstd_compress_literals.h A util/cbfstool/zstd/compress/zstd_compress_sequences.c A util/cbfstool/zstd/compress/zstd_compress_sequences.h A util/cbfstool/zstd/compress/zstd_compress_superblock.c A util/cbfstool/zstd/compress/zstd_compress_superblock.h A util/cbfstool/zstd/compress/zstd_cwksp.h A util/cbfstool/zstd/compress/zstd_double_fast.c A util/cbfstool/zstd/compress/zstd_double_fast.h A util/cbfstool/zstd/compress/zstd_fast.c A util/cbfstool/zstd/compress/zstd_fast.h A util/cbfstool/zstd/compress/zstd_lazy.c A util/cbfstool/zstd/compress/zstd_lazy.h A util/cbfstool/zstd/compress/zstd_ldm.c A util/cbfstool/zstd/compress/zstd_ldm.h A util/cbfstool/zstd/compress/zstd_ldm_geartab.h A util/cbfstool/zstd/compress/zstd_opt.c A util/cbfstool/zstd/compress/zstd_opt.h A util/cbfstool/zstd/compress/zstdmt_compress.c A util/cbfstool/zstd/compress/zstdmt_compress.h A util/cbfstool/zstd/zdict.h A util/cbfstool/zstd/zstd.h A util/cbfstool/zstd/zstd_errors.h 84 files changed, 54,802 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/53/69753/2