Date: Fri, 13 May 2011 15:02:24 GMT From: John Baldwin <jhb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 193063 for review Message-ID: <201105131502.p4DF2OpI076466@skunkworks.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@193063?ac=10 Change 193063 by jhb@jhb_fiver on 2011/05/13 15:01:44 Add a tunable so I can enable the pcib clearing at boot time for testing. Affected files ... .. //depot/projects/pci/sys/dev/pci/pci_pci.c#21 edit Differences ... ==== //depot/projects/pci/sys/dev/pci/pci_pci.c#21 (text+ko) ==== @@ -108,6 +108,9 @@ DRIVER_MODULE(pcib, pci, pcib_driver, pcib_devclass, 0, 0); #ifdef NEW_PCIB +static int pcib_clear; +TUNABLE_INT("hw.pci.pcib_clear", &pcib_clear); + /* * NEW_PCIB todo: * - properly handle the ISA enable bit. If it is set, we should change @@ -254,19 +257,19 @@ dev = sc->dev; -#if 0 /* XXX: Gross hack, disable all windows for testing. */ - pci_write_config(dev, PCIR_IOBASEL_1, 0xff, 1); - pci_write_config(dev, PCIR_IOBASEH_1, 0xffff, 2); - pci_write_config(dev, PCIR_IOLIMITL_1, 0, 1); - pci_write_config(dev, PCIR_IOLIMITH_1, 0, 2); - pci_write_config(dev, PCIR_MEMBASE_1, 0xffff, 2); - pci_write_config(dev, PCIR_MEMLIMIT_1, 0, 2); - pci_write_config(dev, PCIR_PMBASEL_1, 0xffff, 2); - pci_write_config(dev, PCIR_PMBASEH_1, 0xffffffff, 4); - pci_write_config(dev, PCIR_PMLIMITL_1, 0, 2); - pci_write_config(dev, PCIR_PMLIMITH_1, 0, 4); -#endif + if (pcib_clear) { + pci_write_config(dev, PCIR_IOBASEL_1, 0xff, 1); + pci_write_config(dev, PCIR_IOBASEH_1, 0xffff, 2); + pci_write_config(dev, PCIR_IOLIMITL_1, 0, 1); + pci_write_config(dev, PCIR_IOLIMITH_1, 0, 2); + pci_write_config(dev, PCIR_MEMBASE_1, 0xffff, 2); + pci_write_config(dev, PCIR_MEMLIMIT_1, 0, 2); + pci_write_config(dev, PCIR_PMBASEL_1, 0xffff, 2); + pci_write_config(dev, PCIR_PMBASEH_1, 0xffffffff, 4); + pci_write_config(dev, PCIR_PMLIMITL_1, 0, 2); + pci_write_config(dev, PCIR_PMLIMITH_1, 0, 4); + } /* Determine if the I/O port window is implemented. */ val = pci_read_config(dev, PCIR_IOBASEL_1, 1);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105131502.p4DF2OpI076466>