PERFORCE change 209465 for review

Robert Watson rwatson at FreeBSD.org
Thu Apr 12 10:11:03 UTC 2012


http://p4web.freebsd.org/@@209465?ac=10

Change 209465 by rwatson at rwatson_svr_ctsrd_mipsbuild on 2012/04/12 10:10:30

	When offering up MTL frame buffer memory to userspace via mmap(),
	ask the VM system to configure the TLB entry uncached.

Affected files ...

.. //depot/projects/ctsrd/beribsd/src/sys/dev/terasic/mtllcd/terasic_mtllcd.c#3 edit

Differences ...

==== //depot/projects/ctsrd/beribsd/src/sys/dev/terasic/mtllcd/terasic_mtllcd.c#3 (text+ko) ====

@@ -40,6 +40,7 @@
 
 #include <machine/bus.h>
 #include <machine/resource.h>
+#include <machine/vm.h>
 
 #include <dev/terasic/mtllcd/terasic_mtllcd.h>
 
@@ -62,9 +63,10 @@
 	TERASIC_MTLLCD_LOCK(sc);
 	error = 0;
 	if (trunc_page(offset) == offset &&
-	    rman_get_size(sc->mtl_res) >= offset + PAGE_SIZE)
+	    rman_get_size(sc->mtl_res) >= offset + PAGE_SIZE) {
 		*paddr = rman_get_start(sc->mtl_res);
-	else
+		*memattr = VM_MEMATTR_UNCACHED;
+	} else
 		error = EINVAL;
 	TERASIC_MTLLCD_UNLOCK(sc);
 	return (error);


More information about the p4-projects mailing list