Revision f6bdfcc9 hw/pci.c

b/hw/pci.c
558 558
static void pci_init_w1cmask(PCIDevice *dev)
559 559
{
560 560
    /*
561
     * Note: It's okay to set w1mask even for readonly bits as
561
     * Note: It's okay to set w1cmask even for readonly bits as
562 562
     * long as their value is hardwired to 0.
563 563
     */
564 564
    pci_set_word(dev->w1cmask + PCI_STATUS,
......
588 588
    /* PCI_PREF_BASE_UPPER32 and PCI_PREF_LIMIT_UPPER32 */
589 589
    memset(d->wmask + PCI_PREF_BASE_UPPER32, 0xff, 8);
590 590

  
591
    pci_set_word(d->wmask + PCI_BRIDGE_CONTROL, 0xffff);
591
/* TODO: add this define to pci_regs.h in linux and then in qemu. */
592
#define  PCI_BRIDGE_CTL_VGA_16BIT	0x10	/* VGA 16-bit decode */
593
#define  PCI_BRIDGE_CTL_DISCARD		0x100	/* Primary discard timer */
594
#define  PCI_BRIDGE_CTL_SEC_DISCARD	0x200	/* Secondary discard timer */
595
#define  PCI_BRIDGE_CTL_DISCARD_STATUS	0x400	/* Discard timer status */
596
#define  PCI_BRIDGE_CTL_DISCARD_SERR	0x800	/* Discard timer SERR# enable */
597
    pci_set_word(d->wmask + PCI_BRIDGE_CONTROL,
598
                 PCI_BRIDGE_CTL_PARITY |
599
                 PCI_BRIDGE_CTL_SERR |
600
                 PCI_BRIDGE_CTL_ISA |
601
                 PCI_BRIDGE_CTL_VGA |
602
                 PCI_BRIDGE_CTL_VGA_16BIT |
603
                 PCI_BRIDGE_CTL_MASTER_ABORT |
604
                 PCI_BRIDGE_CTL_BUS_RESET |
605
                 PCI_BRIDGE_CTL_FAST_BACK |
606
                 PCI_BRIDGE_CTL_DISCARD |
607
                 PCI_BRIDGE_CTL_SEC_DISCARD |
608
                 PCI_BRIDGE_CTL_DISCARD_STATUS |
609
                 PCI_BRIDGE_CTL_DISCARD_SERR);
610
    /* Below does not do anything as we never set this bit, put here for
611
     * completeness. */
612
    pci_set_word(d->w1cmask + PCI_BRIDGE_CONTROL,
613
                 PCI_BRIDGE_CTL_DISCARD_STATUS);
592 614
}
593 615

  
594 616
static int pci_init_multifunction(PCIBus *bus, PCIDevice *dev)

Also available in: Unified diff