From c546c766c0a6525c07e51d0ee051a1080bf4cf62 Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Mon, 23 Apr 2018 14:55:09 -0600 Subject: arch/x86/postcar: add comment clarifying reason for finalize_load() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-on: https://review.coreboot.org/25795 Tested-by: build bot (Jenkins) Reviewed-by: Justin TerAvest Reviewed-by: Furquan Shaikh Reviewed-by: Kyösti Mälkki --- src/arch/x86/postcar_loader.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/arch/x86/postcar_loader.c') 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); -- cgit v1.2.3