Attention is currently required from: Andrey Petrov.
Subrata Banik has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/76927?usp=email )
Change subject: drivers/intel/fsp2_0: Add configurable compression for logo cbfs file ......................................................................
drivers/intel/fsp2_0: Add configurable compression for logo cbfs file
This patch adds a new configuration option to allow the compression algorithm for the logo cbfs file to be specified. By default, the logo cbfs file is compressed using LZMA. However, enabling LZ4 compression can save ~2ms of boot time when the BMP_LOGO config is enabled.
This patch verified that the logo cbfs file can be booted using either LZMA or LZ4 compression.
BUG=b:284799726 TEST=Able to boot google/rex and verified firmware splash screen using either LZMA or LZ4 compression.
Change-Id: Ib0aa5320632ae3f734004d2b1d495af11c2e1928 Signed-off-by: Subrata Banik subratabanik@google.com --- M src/drivers/intel/fsp2_0/Kconfig M src/drivers/intel/fsp2_0/Makefile.inc 2 files changed, 17 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/27/76927/1
diff --git a/src/drivers/intel/fsp2_0/Kconfig b/src/drivers/intel/fsp2_0/Kconfig index 378f4fb..529d59e 100644 --- a/src/drivers/intel/fsp2_0/Kconfig +++ b/src/drivers/intel/fsp2_0/Kconfig @@ -206,8 +206,18 @@ depends on HAVE_FSP_LOGO_SUPPORT help Uses the FSP to display the boot logo. This method supports a - BMP file only. The uncompressed size can be up to 1 MB. The logo can be compressed - using LZMA. + BMP file only. The uncompressed size can be up to 1 MB. The logo can + be compressed based on either `BMP_LOGO_COMPRESS_*` configs (default LZMA). + +config BMP_LOGO_COMPRESS_LZMA + bool + depends on BMP_LOGO + default y + +config BMP_LOGO_COMPRESS_LZ4 + bool + depends on BMP_LOGO + default !BMP_LOGO_COMPRESS_LZMA
config FSP2_0_LOGO_FILE_NAME string "Logo file" diff --git a/src/drivers/intel/fsp2_0/Makefile.inc b/src/drivers/intel/fsp2_0/Makefile.inc index ae82833..23fd89e 100644 --- a/src/drivers/intel/fsp2_0/Makefile.inc +++ b/src/drivers/intel/fsp2_0/Makefile.inc @@ -103,7 +103,12 @@ cbfs-files-$(CONFIG_BMP_LOGO) += logo.bmp logo.bmp-file := $(call strip_quotes,$(CONFIG_FSP2_0_LOGO_FILE_NAME)) logo.bmp-type := raw +ifeq ($(CONFIG_BMP_LOGO_COMPRESS_LZMA),y) logo.bmp-compression := LZMA +endif +ifeq ($(CONFIG_BMP_LOGO_COMPRESS_LZ4),y) +logo.bmp-compression := LZ4 +endif
ifneq ($(call strip_quotes,$(CONFIG_FSP_HEADER_PATH)),) CPPFLAGS_common+=-I$(CONFIG_FSP_HEADER_PATH)