[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 08/19] hw/mips/fuloong: Propagate CPU to write_bootloader()
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v2 08/19] hw/mips/fuloong: Propagate CPU to write_bootloader() |
Date: |
Mon, 13 Jan 2025 20:55:14 +0100 |
mips_fuloong2e_init() created the vCPU so has its reference,
propagate it to write_bootloader(), removing the &first_cpu use.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/mips/fuloong2e.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/mips/fuloong2e.c b/hw/mips/fuloong2e.c
index 16b6a5129e7..c4080a8a6e3 100644
--- a/hw/mips/fuloong2e.c
+++ b/hw/mips/fuloong2e.c
@@ -163,7 +163,7 @@ static uint64_t load_kernel(MIPSCPU *cpu)
return kernel_entry;
}
-static void write_bootloader(CPUMIPSState *env, uint8_t *base,
+static void write_bootloader(const MIPSCPU *cpu, uint8_t *base,
uint64_t kernel_addr)
{
uint32_t *p;
@@ -258,7 +258,7 @@ static void mips_fuloong2e_init(MachineState *machine)
loaderparams.kernel_cmdline = kernel_cmdline;
loaderparams.initrd_filename = initrd_filename;
kernel_entry = load_kernel(cpu);
- write_bootloader(env, memory_region_get_ram_ptr(bios), kernel_entry);
+ write_bootloader(cpu, memory_region_get_ram_ptr(bios), kernel_entry);
} else {
filename = qemu_find_file(QEMU_FILE_TYPE_BIOS,
machine->firmware ?: FULOONG_BIOSNAME);
--
2.47.1
- [PATCH v2 00/19] hw/mips: Remove all uses of &first_cpu, Philippe Mathieu-Daudé, 2025/01/13
- [PATCH v2 01/19] hw/mips/cps: Keep reference of vCPUs in MIPSCPSState, Philippe Mathieu-Daudé, 2025/01/13
- [PATCH v2 02/19] hw/mips/malta: Check CPU index instead of using &first_cpu, Philippe Mathieu-Daudé, 2025/01/13
- [PATCH v2 03/19] hw/mips/malta: Keep reference of vCPUs in MaltaState, Philippe Mathieu-Daudé, 2025/01/13
- [PATCH v2 04/19] hw/mips/malta: Propagate MaltaState to write_bootloader(), Philippe Mathieu-Daudé, 2025/01/13
- [PATCH v2 05/19] hw/mips/malta: Propagate MaltaState to bl_setup_gt64120_jump_kernel(), Philippe Mathieu-Daudé, 2025/01/13
- [PATCH v2 06/19] hw/mips/boston: Replace bl_gen_write_ulong() -> bl_gen_write_u64(), Philippe Mathieu-Daudé, 2025/01/13
- [PATCH v2 07/19] hw/mips/boston: Propagate CPU to gen_firmware(), Philippe Mathieu-Daudé, 2025/01/13
- [PATCH v2 08/19] hw/mips/fuloong: Propagate CPU to write_bootloader(),
Philippe Mathieu-Daudé <=
- [PATCH v2 09/19] hw/mips/bootloader: Document public API, Philippe Mathieu-Daudé, 2025/01/13
- [PATCH v2 11/19] hw/mips/bootloader: Propagate CPU to bl_gen_jump_[to, kernel](), Philippe Mathieu-Daudé, 2025/01/13
- [PATCH v2 12/19] hw/mips/bootloader: Propagate CPU env to bl_gen_load_ulong(), Philippe Mathieu-Daudé, 2025/01/13
- [PATCH v2 13/19] hw/mips/bootloader: Propagate CPU env to bl_gen_[d]li(), Philippe Mathieu-Daudé, 2025/01/13
- [PATCH v2 14/19] hw/mips/bootloader: Propagate CPU env to bl_gen_s[w, d](), Philippe Mathieu-Daudé, 2025/01/13
- [PATCH v2 16/19] hw/mips/bootloader: Propagate CPU env to bl_gen_dsll(), Philippe Mathieu-Daudé, 2025/01/13
- [PATCH v2 10/19] hw/mips/bootloader: Propagate CPU to bl_gen_write_u[32, 64, long](), Philippe Mathieu-Daudé, 2025/01/13
- [PATCH v2 15/19] hw/mips/bootloader: Propagate CPU env to bl_gen_jalr(), Philippe Mathieu-Daudé, 2025/01/13
- [PATCH v2 17/19] hw/mips/bootloader: Propagate CPU env to bl_gen_nop(), Philippe Mathieu-Daudé, 2025/01/13
- [PATCH v2 19/19] hw/mips/bootloader: Remove use of &first_cpu in bootcpu_supports_isa(), Philippe Mathieu-Daudé, 2025/01/13