mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -06:00
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>
This commit is contained in:
parent
3c43fc333b
commit
36d7487b2a
4 changed files with 37 additions and 12 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue