vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| We have some serious problems with enabling io and/or mem space decoding on pci devices where we shouldn't. We have seen this with pci bridge devices that weren't properly initialized by the firmware, but we have some evidence that vga legacy decodings are giving is problems too. The attached patch is a possible way to fix this, but might cause problems for people. To assess the impact we need to test this patch on as many systems as possible. If you see any changes in your dmesg, please mail me the before and after dmesg. Please also do this if your machine starts printing "enabling io space" or "enabling mem space" in dmesg. Thanks, Mark Index: pci.c ================================================== ================= RCS file: /cvs/src/sys/dev/pci/pci.c,v retrieving revision 1.45 diff -u -p -r1.45 pci.c - --- pci.c 22 Mar 2006 00:36:03 -0000 1.45 +++ pci.c 26 Jun 2006 17:52:52 -0000 @@ -233,6 +233,7 @@ pcisubmatch(struct device *parent, void success = (*cf->cf_attach->ca_match)(parent, match, aux); +#if 0 /* * My Dell BIOS does not enable certain non-critical PCI devices * for IO and memory cycles (e.g. network card). This is @@ -247,6 +248,7 @@ pcisubmatch(struct device *parent, void csr | PCI_COMMAND_MASTER_ENABLE | PCI_COMMAND_IO_ENABLE | PCI_COMMAND_MEM_ENABLE); } +#endif return (success); } Index: pci_map.c ================================================== ================= RCS file: /cvs/src/sys/dev/pci/pci_map.c,v retrieving revision 1.16 diff -u -p -r1.16 pci_map.c - --- pci_map.c 31 May 2006 08:58:05 -0000 1.16 +++ pci_map.c 26 Jun 2006 17:52:52 -0000 @@ -306,8 +306,21 @@ pci_mapreg_map(struct pci_attach_args *p bus_space_handle_t handle; bus_addr_t base; bus_size_t size; + pcireg_t csr; int flags; int rv; + + csr = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG); + if (PCI_MAPREG_TYPE(type) == PCI_MAPREG_TYPE_IO) { + if ((csr & PCI_COMMAND_IO_ENABLE) == 0) + printf(": enabling io space"); + csr |= PCI_COMMAND_IO_ENABLE; + } else { + if ((csr & PCI_COMMAND_MEM_ENABLE) == 0) + printf(": enabling mem space"); + csr |= PCI_COMMAND_MEM_ENABLE; + } + pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG, csr); if (PCI_MAPREG_TYPE(type) == PCI_MAPREG_TYPE_IO) { if ((pa->pa_flags & PCI_FLAGS_IO_ENABLED) == 0) |
| Thread Tools | |
| Display Modes | |
|
|