Attention is currently required from: Subrata Banik, Reka Norman, Nick Vaccaro, Julius Werner, Angel Pons, Karthikeyan Ramasubramanian.

Reka Norman uploaded patch set #3 to this change.

View Change

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

Note AMD platforms from zork onwards don't use postcar due to PSP
verstage.

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, 70 insertions(+), 2 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/41/68641/3

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

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I3614c0874a6c71d13606b0b782ea445692d88bb1
Gerrit-Change-Number: 68641
Gerrit-PatchSet: 3
Gerrit-Owner: Reka Norman <rekanorman@chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Arthur Heymans <arthur@aheymans.xyz>
Gerrit-Reviewer: Julius Werner <jwerner@chromium.org>
Gerrit-Reviewer: Kangheui Won <khwon@chromium.org>
Gerrit-Reviewer: Karthikeyan Ramasubramanian <kramasub@chromium.org>
Gerrit-Reviewer: Nick Vaccaro <nvaccaro@chromium.org>
Gerrit-Reviewer: Subrata Banik <subratabanik@google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: V Sowmya <v.sowmya@intel.com>
Gerrit-Attention: Subrata Banik <subratabanik@google.com>
Gerrit-Attention: Reka Norman <rekanorman@chromium.org>
Gerrit-Attention: Nick Vaccaro <nvaccaro@chromium.org>
Gerrit-Attention: Julius Werner <jwerner@chromium.org>
Gerrit-Attention: Angel Pons <th3fanbus@gmail.com>
Gerrit-Attention: Karthikeyan Ramasubramanian <kramasub@chromium.org>
Gerrit-MessageType: newpatchset