Revision 3e21ffc9 hw/pci.c
b/hw/pci.c | ||
---|---|---|
426 | 426 |
|
427 | 427 |
static void pci_init_wmask(PCIDevice *dev) |
428 | 428 |
{ |
429 |
int i; |
|
430 | 429 |
int config_size = pci_config_size(dev); |
431 | 430 |
|
432 | 431 |
dev->wmask[PCI_CACHE_LINE_SIZE] = 0xff; |
433 | 432 |
dev->wmask[PCI_INTERRUPT_LINE] = 0xff; |
434 | 433 |
pci_set_word(dev->wmask + PCI_COMMAND, |
435 | 434 |
PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER); |
436 |
for (i = PCI_CONFIG_HEADER_SIZE; i < config_size; ++i) |
|
437 |
dev->wmask[i] = 0xff; |
|
435 |
|
|
436 |
memset(dev->wmask + PCI_CONFIG_HEADER_SIZE, 0xff, |
|
437 |
config_size - PCI_CONFIG_HEADER_SIZE); |
|
438 | 438 |
} |
439 | 439 |
|
440 | 440 |
static void pci_init_wmask_bridge(PCIDevice *d) |
Also available in: Unified diff