mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
hw/loongarch/virt: Set iocsr address space per-board rather than percpu
LoongArch system has iocsr address space, most iocsr registers are per-board, however some iocsr register spaces banked for percpu such as ipi mailbox and extioi interrupt status. For banked iocsr space, each cpu has the same iocsr space, but separate data. This patch changes iocsr address space per-board rather percpu, for iocsr registers specified for cpu, MemTxAttrs.requester_id can be parsed for the cpu. With this patches, the total address space on board will be simple, only iocsr address space and system memory, rather than the number of cpu and system memory. Signed-off-by: Bibo Mao <maobibo@loongson.cn> Reviewed-by: Song Gao <gaosong@loongson.cn> Message-Id: <20231215100333.3933632-3-maobibo@loongson.cn> Signed-off-by: Song Gao <gaosong@loongson.cn>
This commit is contained in:
parent
fdd6ee0b76
commit
5e90b8db38
10 changed files with 128 additions and 104 deletions
|
@ -58,7 +58,6 @@ struct LoongArchExtIOI {
|
|||
uint8_t sw_coremap[EXTIOI_IRQS];
|
||||
qemu_irq parent_irq[EXTIOI_CPUS][LS3A_INTC_IP];
|
||||
qemu_irq irq[EXTIOI_IRQS];
|
||||
MemoryRegion extioi_iocsr_mem[EXTIOI_CPUS];
|
||||
MemoryRegion extioi_system_mem;
|
||||
};
|
||||
#endif /* LOONGARCH_EXTIOI_H */
|
||||
|
|
|
@ -47,7 +47,8 @@ struct LoongArchIPI {
|
|||
SysBusDevice parent_obj;
|
||||
MemoryRegion ipi_iocsr_mem;
|
||||
MemoryRegion ipi64_iocsr_mem;
|
||||
IPICore ipi_core;
|
||||
uint32_t num_cpu;
|
||||
IPICore *cpu;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue