Reka Norman has uploaded a new patch set (#2). ( https://review.coreboot.org/c/coreboot/+/68641 )
Change subject: arch/x86/postcar_loader: Don't add postcar to stage cache ......................................................................
arch/x86/postcar_loader: Don't add postcar to stage cache
In romstage, CBMEM and TSEG are not yet cached, so reading/writing to the stage cache is slow. This means there isn't really any benefit to adding postcar to the stage cache: - During boot, adding it to the stage cache adds a few ms of boot time, since writing to uncached memory is slow. - During S3 resume, reading from stage cache takes roughly the same time as reading from SPI, so we get little or no savings anyway.
E.g. on nivviks, this change saves 6 ms of boot time and 2 ms of S3 resume time.
Adding postcar to stage cache: Boot: rmodule_stage_load() - 4 ms stage_cache_add() - 6 ms S3 resume: stage_cache_load_stage() - 6 ms
Not adding postcar to stage cache: Boot: rmodule_stage_load() - 4 ms S3 resume: rmodule_stage_load() - 4 ms
Savings: Boot time - 6 ms S3 resume time - 2 ms
------------------------------------ Savings on other devices:
nivviks anahera kindred treeya rmodule_stage_load() 4.0 1.4 0.8 2.8 stage_cache_add() 6.0 2.8 1.5 2.0 stage_cache_load_stage() 6.0 2.8 1.5 2.0
Boot time savings 6.0 2.8 1.5 2.0 S3 resume time savings 2.0 1.4 0.7 -0.8
BUG=b:247940538 TEST=On nivviks, boot and check S3 resume still works. Add logging to check postcar is added to stage cache when POSTCAR_IN_STAGE_CACHE is selected, and not added otherwise.
Change-Id: I3614c0874a6c71d13606b0b782ea445692d88bb1 Signed-off-by: Reka Norman rekanorman@chromium.org --- M src/arch/x86/Kconfig M src/arch/x86/postcar_loader.c 2 files changed, 67 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/41/68641/2