[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 07/23] hw/mips/bootloader: Propagate CPU env to bl_gen_jalr()
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 07/23] hw/mips/bootloader: Propagate CPU env to bl_gen_jalr() |
Date: |
Mon, 13 Jan 2025 01:47:32 +0100 |
Propagate the target specific CPU env to the locally
declared bl_gen_jalr() function.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/mips/bootloader.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/mips/bootloader.c b/hw/mips/bootloader.c
index 7cf1f01d225..9f35b23653a 100644
--- a/hw/mips/bootloader.c
+++ b/hw/mips/bootloader.c
@@ -128,9 +128,9 @@ static void bl_gen_dsll(const CPUMIPSState *env, void **p,
}
}
-static void bl_gen_jalr(void **p, bl_reg rs)
+static void bl_gen_jalr(const CPUMIPSState *env, void **p, bl_reg rs)
{
- if (bootcpu_supports_isa(&MIPS_CPU(first_cpu)->env, ISA_NANOMIPS32)) {
+ if (bootcpu_supports_isa(env, ISA_NANOMIPS32)) {
uint32_t insn = 0;
insn = deposit32(insn, 26, 6, 0b010010); /* JALRC */
@@ -247,7 +247,7 @@ static void bl_gen_load_ulong(void **p, bl_reg rt,
target_ulong imm)
void bl_gen_jump_to(void **p, target_ulong jump_addr)
{
bl_gen_load_ulong(p, BL_REG_T9, jump_addr);
- bl_gen_jalr(p, BL_REG_T9);
+ bl_gen_jalr(&MIPS_CPU(first_cpu)->env, p, BL_REG_T9);
bl_gen_nop(&MIPS_CPU(first_cpu)->env, p); /* delay slot */
}
--
2.47.1
- [PATCH 00/23] hw/mips: Remove all uses of &first_cpu, Philippe Mathieu-Daudé, 2025/01/12
- [PATCH 01/23] hw/mips/cps: Keep reference of vCPUs in MIPSCPSState, Philippe Mathieu-Daudé, 2025/01/12
- [PATCH 03/23] hw/mips/boston: Replace bl_gen_write_ulong() -> bl_gen_write_u64(), Philippe Mathieu-Daudé, 2025/01/12
- [PATCH 02/23] hw/mips/malta: Check CPU index instead of using &first_cpu, Philippe Mathieu-Daudé, 2025/01/12
- [PATCH 04/23] hw/mips/bootloader: Propagate CPU env to bootcpu_supports_isa(), Philippe Mathieu-Daudé, 2025/01/12
- [PATCH 05/23] hw/mips/bootloader: Propagate CPU env to bl_gen_nop(), Philippe Mathieu-Daudé, 2025/01/12
- [PATCH 06/23] hw/mips/bootloader: Propagate CPU env to bl_gen_dsll(), Philippe Mathieu-Daudé, 2025/01/12
- [PATCH 08/23] hw/mips/bootloader: Propagate CPU env to bl_gen_sw(), Philippe Mathieu-Daudé, 2025/01/12
- [PATCH 09/23] hw/mips/bootloader: Propagate CPU env to bl_gen_sd(), Philippe Mathieu-Daudé, 2025/01/12
- [PATCH 07/23] hw/mips/bootloader: Propagate CPU env to bl_gen_jalr(),
Philippe Mathieu-Daudé <=
- [PATCH 10/23] hw/mips/bootloader: Propagate CPU env to bl_gen_li(), Philippe Mathieu-Daudé, 2025/01/12
- [PATCH 11/23] hw/mips/bootloader: Propagate CPU env to bl_gen_dli(), Philippe Mathieu-Daudé, 2025/01/12
- [PATCH 12/23] hw/mips/bootloader: Propagate CPU env to bl_gen_load_ulong(), Philippe Mathieu-Daudé, 2025/01/12
- [PATCH 13/23] hw/mips/bootloader: Propagate CPU to bl_gen_jump_to(), Philippe Mathieu-Daudé, 2025/01/12
- [PATCH 14/23] hw/mips/bootloader: Propagate CPU to bl_gen_jump_kernel(), Philippe Mathieu-Daudé, 2025/01/12
- [PATCH 15/23] hw/mips/bootloader: Propagate CPU to bl_gen_write_ulong(), Philippe Mathieu-Daudé, 2025/01/12
- [PATCH 16/23] hw/mips/bootloader: Propagate CPU to bl_gen_write_u32(), Philippe Mathieu-Daudé, 2025/01/12
- [PATCH 18/23] hw/mips/boston: Propagate CPU to gen_firmware(), Philippe Mathieu-Daudé, 2025/01/12
- [PATCH 17/23] hw/mips/bootloader: Propagate CPU to bl_gen_write_u64(), Philippe Mathieu-Daudé, 2025/01/12
- [PATCH 19/23] hw/mips/fuloong: Propagate CPU to write_bootloader(), Philippe Mathieu-Daudé, 2025/01/12