summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2018-04-23 14:55:09 -0600
committerAaron Durbin <adurbin@chromium.org>2018-04-24 14:39:09 +0000
commitc546c766c0a6525c07e51d0ee051a1080bf4cf62 (patch)
treecc1693b5eb83c2bed86ecc7c75f9a6d6fc8caac7 /src
parent6403167d290da235a732bd2d6157aa2124fb403a (diff)
arch/x86/postcar: add comment clarifying reason for finalize_load()
Certain platforms need to pass different stack pointer values to postcar depending on S3 resume or not. Add comments to ease the reader in understanding the point. If different stack values weren't needed the program was already cached in stage cache with the correct value. Change-Id: I7202c62e6202a14416cb49ad5348740174747c7d Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/25795 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Justin TerAvest <teravest@chromium.org> Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/arch/x86/postcar_loader.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/arch/x86/postcar_loader.c b/src/arch/x86/postcar_loader.c
index 55232380fc..11f048de7a 100644
--- a/src/arch/x86/postcar_loader.c
+++ b/src/arch/x86/postcar_loader.c
@@ -167,6 +167,9 @@ void run_postcar_phase(struct postcar_frame *pcf)
if (!IS_ENABLED(CONFIG_NO_STAGE_CACHE) &&
romstage_handoff_is_resume()) {
stage_cache_load_stage(STAGE_POSTCAR, &prog);
+ /* This is here to allow platforms to pass different stack
+ parameters between S3 resume and normal boot. On the
+ platforms where the values are the same it's a nop. */
finalize_load(prog.arg, pcf->stack);
} else
load_postcar_cbfs(&prog, pcf);