mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
pci_host: convert conf index and data ports to memory API
Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
parent
be35694da9
commit
d2c33733c8
9 changed files with 130 additions and 132 deletions
|
@ -368,10 +368,12 @@ PCIBus *ppc4xx_pci_init(CPUState *env, qemu_irq pci_irqs[4],
|
|||
cpu_register_physical_memory(config_space + PCIC0_CFGADDR, 4, index);
|
||||
|
||||
/* CFGDATA */
|
||||
index = pci_host_data_register_mmio(&controller->pci_state, 1);
|
||||
if (index < 0)
|
||||
goto free;
|
||||
cpu_register_physical_memory(config_space + PCIC0_CFGDATA, 4, index);
|
||||
memory_region_init_io(&controller->pci_state.data_mem,
|
||||
&pci_host_data_be_ops,
|
||||
&controller->pci_state, "pci-conf-data", 4);
|
||||
memory_region_add_subregion(get_system_memory(),
|
||||
config_space + PCIC0_CFGDATA,
|
||||
&controller->pci_state.data_mem);
|
||||
|
||||
/* Internal registers */
|
||||
index = cpu_register_io_memory(pci_reg_read, pci_reg_write, controller,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue