Paul Fagerburg submitted this change.

View Change


Approvals: build bot (Jenkins): Verified Sean Rhodes: Looks good to me, approved
Kconfig: Allow x86 to compress pre-ram stages if not run XIP

On the intel/glkrvp
compressed:
- romstage: 29659
- verstage: 31303
non compressed:
- romstage: 46244
- verstage: 47012

On qemu (with some additional patch to not run XIP)
compressed:
- romstage: 11203
non compressed:
- romstage: 13924

Even with a small romstage the size improvements are substantial,
which should result in a speedup when loading the stage. On the
up/squared loading romstage is sped up by 9ms.

TESTED: successfully boot the up/squared & google/vilboz.

Change-Id: Iac24d243c4bd4cb8c1db14a8e9fc43f508c2cd5d
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36613
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
---
M src/Kconfig
1 file changed, 37 insertions(+), 4 deletions(-)

diff --git a/src/Kconfig b/src/Kconfig
index 0d3879e..38126fa 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -173,14 +173,14 @@

config COMPRESS_PRERAM_STAGES
bool "Compress romstage and verstage with LZ4"
- depends on !ARCH_X86 && (HAVE_ROMSTAGE || HAVE_VERSTAGE)
+ depends on (HAVE_ROMSTAGE || HAVE_VERSTAGE) && NO_XIP_EARLY_STAGES
# Default value set at the end of the file
help
Compress romstage and (if it exists) verstage with LZ4 to save flash
space and speed up boot, since the time for reading the image from SPI
(and in the vboot case verifying it) is usually much greater than the
- time spent decompressing. Doesn't work for XIP stages (assume all
- ARCH_X86 for now) for obvious reasons.
+ time spent decompressing. Doesn't work for XIP stages for obvious
+ reasons.

config COMPRESS_BOOTBLOCK
bool
@@ -1370,7 +1370,7 @@
default y if !UNCOMPRESSED_RAMSTAGE

config COMPRESS_PRERAM_STAGES
- depends on !ARCH_X86
+ depends on (HAVE_ROMSTAGE || HAVE_VERSTAGE) && NO_XIP_EARLY_STAGES
default y

config INCLUDE_CONFIG_FILE

To view, visit change 36613. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Iac24d243c4bd4cb8c1db14a8e9fc43f508c2cd5d
Gerrit-Change-Number: 36613
Gerrit-PatchSet: 9
Gerrit-Owner: Arthur Heymans <arthur@aheymans.xyz>
Gerrit-Reviewer: Arthur Heymans <arthur@aheymans.xyz>
Gerrit-Reviewer: Julius Werner <jwerner@chromium.org>
Gerrit-Reviewer: Marshall Dawson <marshalldawson3rd@gmail.com>
Gerrit-Reviewer: Martin L Roth <gaumless@gmail.com>
Gerrit-Reviewer: Paul Fagerburg <pfagerburg@chromium.org>
Gerrit-Reviewer: Sean Rhodes <sean@starlabs.systems>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Aaron Durbin <adurbin@chromium.org>
Gerrit-CC: Elyes HAOUAS
Gerrit-CC: Elyes Haouas <ehaouas@noos.fr>
Gerrit-CC: Nico Huber <nico.h@gmx.de>
Gerrit-CC: Paul Menzel <paulepanter@mailbox.org>
Gerrit-MessageType: merged