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>
This commit is contained in:
Aaron Durbin 2018-04-23 14:55:09 -06:00
parent 6403167d29
commit c546c766c0
1 changed files with 3 additions and 0 deletions

View File

@ -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);