summary refs log tree commit diff stats
path: root/hw/mips/fuloong2e.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2022-10-26 21:18:19 +0200
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2022-10-31 11:32:45 +0100
commit36d7487b2aa033e9792fb310c39d106ffcadaa4f (patch)
tree645b52ba691ecff5ac56610af00d4fdf4cdbfa1b /hw/mips/fuloong2e.c
parent3c43fc333be7747a29405bdf6b3bd9e82fa22164 (diff)
downloadfocaccia-qemu-36d7487b2aa033e9792fb310c39d106ffcadaa4f.tar.gz
focaccia-qemu-36d7487b2aa033e9792fb310c39d106ffcadaa4f.zip
hw/mips/bootloader: Allow bl_gen_jump_kernel to optionally set register
When one of the $sp/$a[0..3] register is already set, we might
want bl_gen_jump_kernel() to NOT set it again. Pass a boolean
argument for each register, to allow to optionally set them.

Tested-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Reviewed-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20221026191821.28167-2-philmd@linaro.org>
Diffstat (limited to 'hw/mips/fuloong2e.c')
-rw-r--r--hw/mips/fuloong2e.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/hw/mips/fuloong2e.c b/hw/mips/fuloong2e.c
index 50c61f0e4a..34befa5dd5 100644
--- a/hw/mips/fuloong2e.c
+++ b/hw/mips/fuloong2e.c
@@ -179,8 +179,12 @@ static void write_bootloader(CPUMIPSState *env, uint8_t *base,
     /* Second part of the bootloader */
     p = (uint32_t *)(base + 0x040);
 
-    bl_gen_jump_kernel(&p, ENVP_VADDR - 64, 2, ENVP_VADDR, ENVP_VADDR + 8,
-                       loaderparams.ram_size, kernel_addr);
+    bl_gen_jump_kernel(&p,
+                       true, ENVP_VADDR - 64,
+                       true, 2, true, ENVP_VADDR,
+                       true, ENVP_VADDR + 8,
+                       true, loaderparams.ram_size,
+                       kernel_addr);
 }
 
 static void main_cpu_reset(void *opaque)