From ecbfa99f64c117f45dc6d1b0c50947f46daa3280 Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Fri, 15 May 2020 17:01:58 -0600 Subject: drivers/intel/fsp2_0: add option to compress FSP-M in cbfs Allow the ability for chipset or mainboard to choose to compress FSP-M in cbfs using LZMA or LZ4 routines. However, only non-XIP platforms will support FSP-M compression. Since the main cbfs decompression paths are utilized add the appropriate checks for including compression algorithms under the FSP-M compression options. On picasso FSP-M (debug builds) the following savings were measured: no-compression: fspm.bin 720896 none FSP_COMPRESS_FSP_M_LZ4: fspm.bin 138379 LZ4 (720896 decompressed) -80% FSP_COMPRESS_FSP_M_LZMA: fspm.bin 98921 LZMA (720896 decompressed) -86% BUG=b:155322763,b:150746858,b:152909132 Change-Id: I5c88510c134b56a36ff1cd97a64b51ab2fea0ab0 Signed-off-by: Aaron Durbin Reviewed-on: https://review.coreboot.org/c/coreboot/+/41450 Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh --- src/drivers/intel/fsp2_0/include/fsp/util.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/drivers/intel/fsp2_0/include/fsp/util.h') diff --git a/src/drivers/intel/fsp2_0/include/fsp/util.h b/src/drivers/intel/fsp2_0/include/fsp/util.h index f531e36bee..29c393b09c 100644 --- a/src/drivers/intel/fsp2_0/include/fsp/util.h +++ b/src/drivers/intel/fsp2_0/include/fsp/util.h @@ -89,6 +89,8 @@ struct fsp_load_descriptor { int (*get_destination)(const struct fsp_load_descriptor *fspld, void **dest, size_t final_load_size, const struct region_device *source); + /* Optional argument to be utilized by get_destination() callback. */ + void *arg; }; /* Load the FSP component described by fsp_load_descriptor from cbfs. The FSP -- cgit v1.2.3