summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/arch/riscv/payload.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/arch/riscv/payload.c b/src/arch/riscv/payload.c
index 8a07ff879f..f3ed5a44a6 100644
--- a/src/arch/riscv/payload.c
+++ b/src/arch/riscv/payload.c
@@ -44,7 +44,7 @@ void run_payload(struct prog *prog, void *fdt, int payload_mode)
write_csr(mepc, doit);
asm volatile(
"mv a0, %0\n\t"
- "mv a1, %0\n\t"
+ "mv a1, %1\n\t"
"mret" ::"r"(hart_id),
"r"(fdt)
: "a0", "a1");