Revision 91011d4f
b/hw/pci.c | ||
---|---|---|
856 | 856 |
int i; |
857 | 857 |
uint32_t config_size = pci_config_size(d); |
858 | 858 |
|
859 |
for(i = 0; i < l && addr < config_size; val >>= 8, ++i, ++addr) {
|
|
860 |
uint8_t wmask = d->wmask[addr]; |
|
861 |
d->config[addr] = (d->config[addr] & ~wmask) | (val & wmask);
|
|
859 |
for (i = 0; i < l && addr + i < config_size; val >>= 8, ++i) {
|
|
860 |
uint8_t wmask = d->wmask[addr + i];
|
|
861 |
d->config[addr + i] = (d->config[addr + i] & ~wmask) | (val & wmask);
|
|
862 | 862 |
} |
863 | 863 |
if (ranges_overlap(addr, l, PCI_BASE_ADDRESS_0, 24) || |
864 | 864 |
ranges_overlap(addr, l, PCI_ROM_ADDRESS, 4) || |
Also available in: Unified diff