summaryrefslogtreecommitdiffstats
path: root/src/lib/cbmem_stage_cache.c
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2017-09-05 22:43:05 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2017-09-08 03:17:52 +0000
commitd87e4b346943110a6d919aa52444bb420e2755be (patch)
tree504cf11ac99f37a8eaae4a885583ad08ffbc99d0 /src/lib/cbmem_stage_cache.c
parent534b23639bd1ee82e752f0a8593e46c1d03d8d2c (diff)
downloadcoreboot-d87e4b346943110a6d919aa52444bb420e2755be.tar.gz
coreboot-d87e4b346943110a6d919aa52444bb420e2755be.tar.bz2
coreboot-d87e4b346943110a6d919aa52444bb420e2755be.zip
stage_cache: Add rmodule params in metadata
The change allows to update rmodule parameters after it has been loaded from stage cache. Change-Id: Ib825ffe245d447ad3a8246f7dbd52c6e34103a0c Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/21385 Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/lib/cbmem_stage_cache.c')
-rw-r--r--src/lib/cbmem_stage_cache.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/cbmem_stage_cache.c b/src/lib/cbmem_stage_cache.c
index 3fc99db72682..2947972ac5e1 100644
--- a/src/lib/cbmem_stage_cache.c
+++ b/src/lib/cbmem_stage_cache.c
@@ -29,6 +29,7 @@ void stage_cache_add(int stage_id, const struct prog *stage)
return;
meta->load_addr = (uintptr_t)prog_start(stage);
meta->entry_addr = (uintptr_t)prog_entry(stage);
+ meta->arg = (uintptr_t)prog_entry_arg(stage);
c = cbmem_add(CBMEM_ID_STAGEx_CACHE + stage_id, prog_size(stage));
if (c == NULL)
@@ -63,5 +64,6 @@ void stage_cache_load_stage(int stage_id, struct prog *stage)
memcpy(load_addr, c, size);
prog_set_area(stage, 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);
}