Subject: controlling mmap() cache attributes on i386?
To: None <port-i386@NetBSD.ORG, tech-kern@NetBSD.ORG>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: tech-kern
Date: 09/19/1996 01:47:37
Is there any way to control the caching attributes of pages
returned from a device's d_mmap() entry point?

I have a driver for a PCI device that sets up mapping registers for
host memory and DMAs into and out of those host-memory pages.  I want
to mmap() the device's DMA pages into a user address space.  I have
that all working, but for performance reasons I want to map the
relevant pages as *un*cached. (A hardware debugger shows a significant
win for uncached access, using play no-allocate-on-write tricks to
compare cached vs. uncached access)

The  x86 TLB entries seem to support this, other port's pmap
interface support setting bits to enable or disable caching
(e.g., sparc); yet I can't seem to find how to do this on i386.
Am I missing something obvious?

--Jonathan