Re: [PATCH v2 1/2] target/riscv/cpu.c: add riscv_bare_cpu_init()

2024-01-21 Thread Alistair Francis
On Tue, Jan 9, 2024 at 3:32 AM Daniel Henrique Barboza wrote: > > Next patch will add more bare CPUs. Their cpu_init() functions would be > glorified copy/pastes of rv64i_bare_cpu_init(), differing only by a > riscv_cpu_set_misa() call. > > Add a new .instance_init for the TYPE_RISCV_BARE_CPU typ

[PATCH v2 1/2] target/riscv/cpu.c: add riscv_bare_cpu_init()

2024-01-08 Thread Daniel Henrique Barboza
Next patch will add more bare CPUs. Their cpu_init() functions would be glorified copy/pastes of rv64i_bare_cpu_init(), differing only by a riscv_cpu_set_misa() call. Add a new .instance_init for the TYPE_RISCV_BARE_CPU typ to avoid this code repetition. While we're at it, add a better explanation