summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorhselasky <hselasky@FreeBSD.org>2012-03-29 15:33:44 +0000
committerhselasky <hselasky@FreeBSD.org>2012-03-29 15:33:44 +0000
commit6749f469aac0289072185f7a673279706ef32e3a (patch)
tree39fe7681cde63b5e766d945ff2c0f5bf8277e99a /sys/dev
parent9cd12cd0b386074bdfcb610c34e8027953b070be (diff)
downloadFreeBSD-src-6749f469aac0289072185f7a673279706ef32e3a.zip
FreeBSD-src-6749f469aac0289072185f7a673279706ef32e3a.tar.gz
Fix for boot issue: Don't disable BARs on AGP devices. In general:
Don't disable BARs on any PCI display devices, because doing that can sometimes cause the main memory bus to stop working, causing all memory reads to return nothing but 0xFFFFFFFF, even though the memory location was previously written. After a while a privileged instruction fault will appear and then nothing more can be debugged. The reason for this behaviour is unknown. MFC after: 1 week
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/pci.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
index 6c07859..2bded11 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -2590,6 +2590,27 @@ pci_write_bar(device_t dev, struct pci_map *pm, pci_addr_t base)
struct pci_devinfo *dinfo;
int ln2range;
+ /*
+ * Don't disable BARs on AGP devices. In general: Don't
+ * disable BARs on any PCI display devices, because doing that
+ * can sometimes cause the main memory bus to stop working,
+ * causing all memory reads to return nothing but 0xFFFFFFFF,
+ * even though the memory location was previously written.
+ * After a while a privileged instruction fault will appear
+ * and then nothing more can be debugged.
+ * The reason for this behaviour is unknown.
+ */
+ if (base == 0 && pci_get_class(dev) == PCIC_DISPLAY) {
+ device_printf(device_get_parent(dev),
+ "pci%d:%d:%d:%d BARs on display devices "
+ "should not be disabled.\n",
+ pci_get_domain(dev),
+ pci_get_bus(dev),
+ pci_get_slot(dev),
+ pci_get_function(dev));
+ return;
+ }
+
/* The device ROM BAR is always a 32-bit memory BAR. */
dinfo = device_get_ivars(dev);
if (PCIR_IS_BIOS(&dinfo->cfg, pm->pm_reg))
OpenPOWER on IntegriCloud