mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
ppc/pegasos2: Access MV64361 registers via their memory region
Instead of relying on the mapped address of the MV64361 registers access them via their memory region. This is not a problem at reset time when these registers are mapped at the default address but the guest could change this later and then the RTAS calls accessing PCI config registers could fail. None of the guests actually do this so this only avoids a theoretical problem not seen in practice. Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Message-Id: <b6f768023603dc2c4d130720bcecdbea459b7668.1634241019.git.balaton@eik.bme.hu> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
94cd1ffbe1
commit
bd20cde50b
2 changed files with 54 additions and 60 deletions
|
@ -869,6 +869,7 @@ static void mv64361_realize(DeviceState *dev, Error **errp)
|
|||
s->base_addr_enable = 0x1fffff;
|
||||
memory_region_init_io(&s->regs, OBJECT(s), &mv64361_ops, s,
|
||||
TYPE_MV64361, 0x10000);
|
||||
sysbus_init_mmio(SYS_BUS_DEVICE(dev), &s->regs);
|
||||
for (i = 0; i < 2; i++) {
|
||||
g_autofree char *name = g_strdup_printf("pcihost%d", i);
|
||||
object_initialize_child(OBJECT(dev), name, &s->pci[i],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue