mirror of https://github.com/xqemu/xqemu.git
PCI: Fix bus address conversion
Pass physical addresses to map functions instead of PCI bus addresses. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
6bb4ca57a1
commit
cf61680217
5
hw/pci.c
5
hw/pci.c
|
@ -949,7 +949,12 @@ static void pci_update_mappings(PCIDevice *d)
|
||||||
* Teach them such cases, such that filtered_size < size and
|
* Teach them such cases, such that filtered_size < size and
|
||||||
* addr & (size - 1) != 0.
|
* addr & (size - 1) != 0.
|
||||||
*/
|
*/
|
||||||
|
if (r->type & PCI_BASE_ADDRESS_SPACE_IO) {
|
||||||
r->map_func(d, i, r->addr, r->filtered_size, r->type);
|
r->map_func(d, i, r->addr, r->filtered_size, r->type);
|
||||||
|
} else {
|
||||||
|
r->map_func(d, i, pci_to_cpu_addr(d->bus, r->addr),
|
||||||
|
r->filtered_size, r->type);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue