Write zeros into the base/bounds register bars. We need to do this
because NEWBUS (and I think some versions of Windows sometimes) writes 0xffffffff to these registers to disable them. When they are "disabled" like this, writing memory ranges to the pcic registers are ignored and you will get "card (null) (null)" when you insert a call otherwise.
This commit is contained in:
parent
6428acdc74
commit
c820d555c5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=79059
@ -314,6 +314,22 @@ pcic_pci_cardbus_init(device_t dev)
|
||||
|
||||
/* Turn off legacy address */
|
||||
pci_write_config(dev, CB_PCI_LEGACY16_IOADDR, 0, 2);
|
||||
|
||||
/*
|
||||
* Write zeros into the remaining BARs. This seems to turn off
|
||||
* the pci configuration of these things and make the cardbus
|
||||
* bridge use the values for memory programmed into the pcic
|
||||
* registers.
|
||||
*/
|
||||
pci_write_config(dev, CB_PCI_MEMBASE0, 0, 4);
|
||||
pci_write_config(dev, CB_PCI_MEMLIMIT0, 0, 4);
|
||||
pci_write_config(dev, CB_PCI_MEMBASE1, 0, 4);
|
||||
pci_write_config(dev, CB_PCI_MEMLIMIT1, 0, 4);
|
||||
pci_write_config(dev, CB_PCI_IOBASE0, 0, 4);
|
||||
pci_write_config(dev, CB_PCI_IOLIMIT0, 0, 4);
|
||||
pci_write_config(dev, CB_PCI_IOBASE1, 0, 4);
|
||||
pci_write_config(dev, CB_PCI_IOLIMIT1, 0, 4);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user