Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Apr 2006 00:52:10 GMT
From:      John-Mark Gurney <jmg@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 94654 for review
Message-ID:  <200604050052.k350qAws088834@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=94654

Change 94654 by jmg@jmg_arlene on 2006/04/05 00:52:01

	try to make activate_resource work..

Affected files ...

.. //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/hv_pci.c#21 edit

Differences ...

==== //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/hv_pci.c#21 (text+ko) ====

@@ -52,6 +52,8 @@
 #include <sparc64/pci/ofw_pci.h>
 
 #include <machine/hv_pcivar.h>
+#include <machine/vmparam.h>
+#include <machine/tlb.h>
 
 #include "pcib_if.h"
 
@@ -425,25 +427,14 @@
 hvpci_activate_resource(device_t bus, device_t child, int type, int rid,
     struct resource *r) 
 {
-#if 0
 	void *p;
-	int error;
 
 	if (type == SYS_RES_MEMORY) {
-		/*
-		 * Need to memory-map the device space, as some drivers depend
-		 * on the virtual address being set and useable.
-		 */
-		error = sparc64_bus_mem_map(rman_get_bustag(r),
-		    rman_get_bushandle(r), rman_get_size(r), 0, 0, &p);
-		if (error != 0)
-			return (error);
+		/* XXX - we may still need to set the IE bit on the mapping */
+		p = (void *)TLB_PHYS_TO_DIRECT(rman_get_bushandle(r));
 		rman_set_virtual(r, p);
 	}
 	return (rman_activate_resource(r));
-#else
-	return (ENXIO);
-#endif
 }
 
 static int



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604050052.k350qAws088834>