From 55069d15d8a6dcd7f8eaaf36e85e5d7a53fdaae6 Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Fri, 1 Nov 2019 21:53:36 +0100 Subject: arch/riscv: Pass cbmem_top to ramstage via calling argument Tested on the Qemu-Virt target both 32 and 64 bit. Change-Id: I5c74cd5d3ee292931c5bbd2e4075f88381429f72 Signed-off-by: Arthur Heymans Reviewed-on: https://review.coreboot.org/c/coreboot/+/36558 Reviewed-by: Nico Huber Tested-by: build bot (Jenkins) --- src/arch/riscv/boot.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/arch/riscv/boot.c') diff --git a/src/arch/riscv/boot.c b/src/arch/riscv/boot.c index d3ae693376..aaaac485ea 100644 --- a/src/arch/riscv/boot.c +++ b/src/arch/riscv/boot.c @@ -36,7 +36,7 @@ struct arch_prog_run_args { static void do_arch_prog_run(struct arch_prog_run_args *args) { - int hart_id; + int hart_id = HLS()->hart_id; struct prog *prog = args->prog; void *fdt = HLS()->fdt; @@ -49,11 +49,8 @@ static void do_arch_prog_run(struct arch_prog_run_args *args) else run_payload(prog, fdt, RISCV_PAYLOAD_MODE_S); } else { - void (*doit)(int hart_id, void *fdt) = prog_entry(prog); - - hart_id = HLS()->hart_id; - - doit(hart_id, fdt); + void (*doit)(int hart_id, void *fdt, void *arg) = prog_entry(prog); + doit(hart_id, fdt, prog_entry_arg(prog)); } die("Failed to run stage"); -- cgit v1.2.3