在2025年1月13日一月 下午7:55,Philippe Mathieu-Daudé写道:
> v2:
> - Add documentation
> - Reorder propagation to reduce code churn around &first_cpu
>
> v1:
> - Keep references to vCPUs in CPS and MaltaState,
> - Refactor the MIPS Bootloader API to take CPU argument
> - Access first CPU propagate from machine_init()
>
> Based-on: <20250112215835.29320-1-phi...@linaro.org>
> "hw/mips/loongson3: Remove uses of &first_cpu global"
Reviewed-by: Jiaxun Yang <jiaxun.y...@flygoat.com>
Also tested bootloader stuff :-)
>
> Philippe Mathieu-Daudé (19):
> hw/mips/cps: Keep reference of vCPUs in MIPSCPSState
> hw/mips/malta: Check CPU index instead of using &first_cpu
> hw/mips/malta: Keep reference of vCPUs in MaltaState
> hw/mips/malta: Propagate MaltaState to write_bootloader()
> hw/mips/malta: Propagate MaltaState to bl_setup_gt64120_jump_kernel()
> hw/mips/boston: Replace bl_gen_write_ulong() -> bl_gen_write_u64()
> hw/mips/boston: Propagate CPU to gen_firmware()
> hw/mips/fuloong: Propagate CPU to write_bootloader()
> hw/mips/bootloader: Document public API
> hw/mips/bootloader: Propagate CPU to bl_gen_write_u[32,64,long]()
> hw/mips/bootloader: Propagate CPU to bl_gen_jump_[to,kernel]()
> hw/mips/bootloader: Propagate CPU env to bl_gen_load_ulong()
> hw/mips/bootloader: Propagate CPU env to bl_gen_[d]li()
> hw/mips/bootloader: Propagate CPU env to bl_gen_s[w,d]()
> hw/mips/bootloader: Propagate CPU env to bl_gen_jalr()
> hw/mips/bootloader: Propagate CPU env to bl_gen_dsll()
> hw/mips/bootloader: Propagate CPU env to bl_gen_nop()
> hw/mips/bootloader: Propagate CPU env to bootcpu_supports_isa()
> hw/mips/bootloader: Remove use of &first_cpu in bootcpu_supports_isa()
>
> include/hw/mips/bootloader.h | 69 +++++++++++++++++++--
> include/hw/mips/cps.h | 1 +
> hw/mips/bootloader.c | 113 ++++++++++++++++++++---------------
> hw/mips/boston.c | 21 ++++---
> hw/mips/cps.c | 4 +-
> hw/mips/fuloong2e.c | 6 +-
> hw/mips/malta.c | 60 +++++++++++--------
> 7 files changed, 184 insertions(+), 90 deletions(-)
>
> --
> 2.47.1
--
- Jiaxun