From 820dcfceb3901dbb00bb90c876e374126ca14e20 Mon Sep 17 00:00:00 2001 From: Xiang Wang Date: Thu, 19 Jul 2018 17:35:39 +0800 Subject: riscv: Simplify payload handling 1. Simplify payload code and convert it to C 2. Save the FDT pointer to HLS (hart-local storage). 3. Don't use mscratch to pass FDT pointer as it is used for exception handling. Change-Id: I32bf2a99e07a65358a7f19b899259f0816eb45e8 Signed-off-by: Xiang Wang Signed-off-by: Philipp Hug Reviewed-on: https://review.coreboot.org/c/31179 Reviewed-by: ron minnich Tested-by: build bot (Jenkins) --- src/arch/riscv/mcall.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/arch/riscv/mcall.c') diff --git a/src/arch/riscv/mcall.c b/src/arch/riscv/mcall.c index 47cdd88d4d..eaef6442c5 100644 --- a/src/arch/riscv/mcall.c +++ b/src/arch/riscv/mcall.c @@ -34,10 +34,11 @@ int mcalldebug; // set this interactively for copious debug. -void hls_init(uint32_t hart_id) +void hls_init(uint32_t hart_id, void *fdt) { printk(BIOS_SPEW, "hart %d: HLS is %p\n", hart_id, HLS()); memset(HLS(), 0, sizeof(*HLS())); + HLS()->fdt = fdt; HLS()->hart_id = hart_id; mtime_init(); -- cgit v1.2.3