From 5331a7cff9ebf6f92542eee53e6556a4d5a0dc75 Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Wed, 23 Oct 2019 17:07:15 +0200 Subject: 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/36272 Reviewed-by: Nico Huber Reviewed-by: Aaron Durbin Tested-by: build bot (Jenkins) --- src/include/program_loading.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/include') diff --git a/src/include/program_loading.h b/src/include/program_loading.h index 601847d4f8..1b71fadb1b 100644 --- a/src/include/program_loading.h +++ b/src/include/program_loading.h @@ -137,6 +137,11 @@ static inline void prog_set_entry(struct prog *prog, void *e, void *arg) prog->arg = arg; } +static inline void prog_set_arg(struct prog *prog, void *arg) +{ + prog->arg = arg; +} + /* Locate the identified program to run. Return 0 on success. < 0 on error. */ int prog_locate(struct prog *prog); /* The prog_locate_hook() is called prior to CBFS traversal. The hook can be -- cgit v1.2.3