Note that offsets are PReP ones, so this breaks compatibility with hardware which has different values.
Signed-off-by: Hervé Poussineau <hpous...@reactos.org> --- src/pci.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/pci.c b/src/pci.c index 38aad27..7c0ebad 100644 --- a/src/pci.c +++ b/src/pci.c @@ -1723,8 +1723,13 @@ static inline void pci_update_device (pci_bridge_t *bridge, addr = 0x30; /* PCI ROM */ else addr = 0x10 + (i * sizeof(uint32_t)); - pci_config_writel(bridge, device->bus, device->devfn, - addr, device->regions[i]); + if (device->regions[i] & 0x00000001) { + pci_config_writel(bridge, device->bus, device->devfn, + addr, device->regions[i] - 0x80000000); + } else { + pci_config_writel(bridge, device->bus, device->devfn, + addr, device->regions[i] - 0xc0000000); + } } } } -- 1.7.10.4