PERFORCE change 94654 for review

John-Mark Gurney jmg at FreeBSD.org
Wed Apr 5 00:52:11 UTC 2006


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

Change 94654 by jmg at 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


More information about the p4-projects mailing list