From 3b16e78a9e1de3d3e03f43c69ae92fc27317bd94 Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Mon, 23 Apr 2018 14:47:07 -0600 Subject: lib/ext_stage_cache: include prog arg in stage cache metadata MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In commit d87e4b34 (stage_cache: Add rmodule params in metadata) the cbmem stage cache was updatd to keep track of the arg from struct prog in the metadata. However, external stage cache did not get the same change. Fix that. BUG=b:72728953 Change-Id: Ifdaaa255cac0f413856410ff61bfb411a9554a31 Signed-off-by: Aaron Durbin Reviewed-on: https://review.coreboot.org/25794 Tested-by: build bot (Jenkins) Reviewed-by: Justin TerAvest Reviewed-by: Furquan Shaikh Reviewed-by: Kyösti Mälkki --- src/lib/ext_stage_cache.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/lib') diff --git a/src/lib/ext_stage_cache.c b/src/lib/ext_stage_cache.c index ab783473f3..c3d4aee190 100644 --- a/src/lib/ext_stage_cache.c +++ b/src/lib/ext_stage_cache.c @@ -78,6 +78,7 @@ void stage_cache_add(int stage_id, const struct prog *stage) meta->load_addr = (uintptr_t)prog_start(stage); meta->entry_addr = (uintptr_t)prog_entry(stage); + meta->arg = (uintptr_t)prog_entry_arg(stage); e = imd_entry_add(imd, CBMEM_ID_STAGEx_CACHE + stage_id, prog_size(stage)); @@ -166,7 +167,8 @@ void stage_cache_load_stage(int stage_id, struct prog *stage) memcpy((void *)(uintptr_t)meta->load_addr, c, size); prog_set_area(stage, (void *)(uintptr_t)meta->load_addr, size); - prog_set_entry(stage, (void *)(uintptr_t)meta->entry_addr, NULL); + prog_set_entry(stage, (void *)(uintptr_t)meta->entry_addr, + (void *)(uintptr_t)meta->arg); } static void stage_cache_setup(int is_recovery) -- cgit v1.2.3