PERFORCE change 94752 for review

John-Mark Gurney jmg at FreeBSD.org
Fri Apr 7 05:08:14 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=94752

Change 94752 by jmg at jmg_arlene on 2006/04/07 05:07:14

	fix misspelling, make printfs work (probably needs work for other
	arches), add prototypes..

Affected files ...

.. //depot/projects/kmacy_sun4v/src/sys/dev/pci/pci_pci.c#5 edit

Differences ...

==== //depot/projects/kmacy_sun4v/src/sys/dev/pci/pci_pci.c#5 (text+ko) ====

@@ -53,6 +53,9 @@
 #include "pcib_if.h"
 
 static int		pcib_probe(device_t dev);
+static int		pcib_is_prefetch_open(struct pcib_softc *sc);
+static int		pcib_is_nonprefetch_open(struct pcib_softc *sc);
+static int		pcib_is_io_open(struct pcib_softc *sc);
 
 static device_method_t pcib_methods[] = {
     /* Device interface */
@@ -151,14 +154,14 @@
 	    PCIR_MEMBASE_1, 2));
 	sc->memlimit  = PCI_PPBMEMLIMIT(0, pci_read_config(dev,
 	    PCIR_MEMLIMIT_1, 2));
-	memlow = pci_read_config(dev, PCIR_PMEMBASEL_1, 2);
+	memlow = pci_read_config(dev, PCIR_PMBASEL_1, 2);
 	if ((memlow & PCIM_BRMEM_MASK) == PCIM_BRMEM_64) {
 	    sc->pmembase  = PCI_PPBMEMBASE(pci_read_config(dev, PCIR_PMBASEH_1,
 		4), memlow);
 	} else {
 	    sc->pmembase  = PCI_PPBMEMBASE(0, memlow);
 	}
-	memhigh = pci_read_config(dev, PCIR_PMLIMITL_1, 4);
+	memlow = pci_read_config(dev, PCIR_PMLIMITL_1, 4);
 	if ((memlow & PCIM_BRMEM_MASK) == PCIM_BRMEM_64) {
 	    sc->pmemlimit  = PCI_PPBMEMBASE(pci_read_config(dev, PCIR_PMLIMITH_1,
 		4), memlow);
@@ -235,12 +238,12 @@
 	else
 	    device_printf(dev, "  I/O decode disabled.\n");
 	if (pcib_is_nonprefetch_open(sc))
-	    device_printf(dev, "  memory decode     0x%x-0x%x\n", sc->membase,
+	    device_printf(dev, "  memory decode     0x%lx-0x%lx\n", sc->membase,
 		sc->memlimit);
 	else
 	    device_printf(dev, "  memory decode disabled.\n");
 	if (pcib_is_prefetch_open(sc))
-	    device_printf(dev, "  prefetched decode 0x%x-0x%x\n", sc->pmembase,
+	    device_printf(dev, "  prefetched decode 0x%lx-0x%lx\n", sc->pmembase,
 		sc->pmemlimit);
 	else
 	    device_printf(dev, "  prefetched decode disabled.\n");
@@ -462,7 +465,7 @@
 		if (!ok && bootverbose)
 			device_printf(dev,
 			    "%s requested unsupported memory range "
-			    "0x%lx-0x%lx (decoding 0x%x-0x%x, 0x%x-0x%x)\n",
+			    "0x%lx-0x%lx (decoding 0x%lx-0x%lx, 0x%lx-0x%lx)\n",
 			    device_get_nameunit(child), start, end,
 			    sc->membase, sc->memlimit, sc->pmembase,
 			    sc->pmemlimit);


More information about the p4-projects mailing list