lib/ext_stage_cache: include prog arg in stage cache metadata
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 <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/25794
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:
parent
c546c766c0
commit
3b16e78a9e
|
@ -78,6 +78,7 @@ void stage_cache_add(int stage_id, const struct prog *stage)
|
||||||
|
|
||||||
meta->load_addr = (uintptr_t)prog_start(stage);
|
meta->load_addr = (uintptr_t)prog_start(stage);
|
||||||
meta->entry_addr = (uintptr_t)prog_entry(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,
|
e = imd_entry_add(imd, CBMEM_ID_STAGEx_CACHE + stage_id,
|
||||||
prog_size(stage));
|
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);
|
memcpy((void *)(uintptr_t)meta->load_addr, c, size);
|
||||||
|
|
||||||
prog_set_area(stage, (void *)(uintptr_t)meta->load_addr, 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)
|
static void stage_cache_setup(int is_recovery)
|
||||||
|
|
Loading…
Reference in New Issue