mb/google/rex: LZ4 compress ramstage instead of LZMA

for saving boot time, change ramstage compression from LZMA to LZ4.
Boot time saving is around 35ms (30-37ms) while SPI size impact is 230KB.
For detail, refer below.

Existing: LZMA(55.6 ms)
   8:starting to load ramstage                         894,519 (0)
  15:starting LZMA decompress (ignore for x86)         903,556 (9,036)
  16:finished LZMA decompress (ignore for x86)         949,997 (46,441)
   9:finished loading ramstage                         950,179 (182)

Changed: LZ4(17.8ms)
   8:starting to load ramstage                         900,876 (0)
  17:starting LZ4 decompress (ignore for x86)          917,650 (16,774)
  18:finished LZ4 decompress (ignore for x86)          918,690 (1,040)
   9:finished loading ramstage                         918,849 (158)

Size impact (73KB * 3 = 219KB)
fallback/ramstage              0x62940    stage          240281 LZ4  (405524 decompressed)
fallback/ramstage              0x62940    stage          165452 LZMA (405524 decompressed)

BUG=b:286930648
TEST= Boot to OS and check boot time

Signed-off-by: Wonkyu Kim <wonkyu.kim@intel.com>
Change-Id: I6610f405d287bff2eb4eee6f09026e3361405ded
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75769
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
This commit is contained in:
Wonkyu Kim 2023-06-12 16:44:07 -07:00 committed by Subrata Banik
parent ccbfe76a70
commit 6d6831e5ba
1 changed files with 1 additions and 0 deletions

View File

@ -23,6 +23,7 @@ config BOARD_GOOGLE_REX_COMMON
select INTEL_LPSS_UART_FOR_CONSOLE
select MAINBOARD_DISABLE_STAGE_CACHE
select MAINBOARD_HAS_TPM2
select MB_COMPRESS_RAMSTAGE_LZ4
select PMC_IPC_ACPI_INTERFACE
select SOC_INTEL_COMMON_BLOCK_VARIANT_POWER_LIMIT
select SOC_INTEL_CSE_LITE_SKU