On 10/08/2012 07:21 PM, Andreas Färber wrote: > Am 08.10.2012 18:46, schrieb Bharat Bhushan: >> All devices are also placed under CCSR memory region. >> The CCSR memory region is exported to pci device. The MSI interrupt >> generation is the main reason to export the CCSR region to PCI device. >> This put the requirement to move mpic under CCSR region, but logically >> all devices should be under CCSR. So this patch places all emulated >> devices under ccsr region. >> >> + sysbus_connect_irq(s, 0, mpic[pci_irq_nrs[0]]); >> + sysbus_connect_irq(s, 1, mpic[pci_irq_nrs[1]]); >> + sysbus_connect_irq(s, 2, mpic[pci_irq_nrs[2]]); >> + sysbus_connect_irq(s, 3, mpic[pci_irq_nrs[3]]); >> + memory_region_add_subregion(ccsr, MPC8544_PCI_REGS_OFFSET, >> s->mmio[0].memory); > > ... I wonder if fiddling with SysBus MMIO is a good idea. > s->mmio[0].addr is not getting assigned this way, which is checked as > condition for deleting the subregion. But sysbus_mmio_map() only adds to > / deletes from get_system_memory(). > The alternative would be using a custom field rather than the > SysBus-internal one. Avi/Alex?
IMO yes. Or not use sysbus at all. -- error compiling committee.c: too many arguments to function