summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Roth <martin.roth@amd.com>2023-01-04 18:54:28 -0700
committerMartin L Roth <gaumless@gmail.com>2023-01-08 01:21:58 +0000
commitcba09c8f13218461c590fe75871f7b059cbc83f8 (patch)
tree22fd3083d0250a34225edfeb0ef2eca969c3fe15
parent03511b4770f92af0da56497e1055cd0d6a6575d2 (diff)
mb/google/skyrim: Switch from LZMA to LZ4 compression for ramstage
Because skyrim is loading ramstage from SPI with the DMA engine, the size of the compressed image is less important to load speed than decompression time. Because the LZ4 decompression is so much faster than LZMA, compressing with LZ4 saves us roughly 30ms in boot time. For size, we're spending roughly 57KiB: fallback/ramstage 0x9b00 stage 130864 LZMA (305316 decompressed) fallback/ramstage 0x9b00 stage 189126 LZ4 (305316 decompressed) Right now we have 2MiB empty space in Skyrim's RO before this change, and roughly 550KiB empty space in RW, so there aren't currently any size worries. Just for fun, I also tested uncompressed ramstage, and it was still 18ms faster than LZMA, but that makes it roughly 12ms slower than LZ4. BUG=b:264409477 TEST=Boot skyrim, look at boot speed. Signed-off-by: Martin Roth <martin.roth@amd.corp-partner.google.com> Change-Id: Iedde6fc2db9d702c0ff2b0081e7baa254ac6699f Reviewed-on: https://review.coreboot.org/c/coreboot/+/71675 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
-rw-r--r--src/mainboard/google/skyrim/Kconfig1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mainboard/google/skyrim/Kconfig b/src/mainboard/google/skyrim/Kconfig
index 493ecb5941..94659dba40 100644
--- a/src/mainboard/google/skyrim/Kconfig
+++ b/src/mainboard/google/skyrim/Kconfig
@@ -37,6 +37,7 @@ config BOARD_SPECIFIC_OPTIONS
select I2C_TPM
select MAINBOARD_HAS_CHROMEOS
select MAINBOARD_HAS_TPM2
+ select MB_COMPRESS_RAMSTAGE_LZ4
select SOC_AMD_MENDOCINO
select SOC_AMD_COMMON_BLOCK_I2C3_TPM_SHARED_WITH_PSP
select SOC_AMD_COMMON_BLOCK_USE_ESPI