Program loading: Handoff cbmem_top via calling arguments
There are a lot of different implementations to pass information from romstage to ramstage. These could all be unified by passing this information via cbmem. Often however these methods exist for that very purpose. This solves this by passing cbmem_top via the programs arguments. Change-Id: Id2031f7bb81ce65fc318313c270eb1fbae3b2114 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/36272 Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
committed by
Patrick Georgi
parent
b7cc68ae6a
commit
5331a7cff9
@ -96,6 +96,8 @@ static void run_ramstage_from_resume(struct prog *ramstage)
|
||||
/* Load the cached ramstage to runtime location. */
|
||||
stage_cache_load_stage(STAGE_RAMSTAGE, ramstage);
|
||||
|
||||
prog_set_arg(ramstage, cbmem_top());
|
||||
|
||||
if (prog_entry(ramstage) != NULL) {
|
||||
printk(BIOS_DEBUG, "Jumping to image.\n");
|
||||
prog_run(ramstage);
|
||||
@ -148,6 +150,9 @@ void run_ramstage(void)
|
||||
|
||||
timestamp_add_now(TS_END_COPYRAM);
|
||||
|
||||
/* This overrides the arg fetched from the relocatable module */
|
||||
prog_set_arg(&ramstage, cbmem_top());
|
||||
|
||||
prog_run(&ramstage);
|
||||
|
||||
fail:
|
||||
|
Reference in New Issue
Block a user