Subject: Re: mapping non-cacheable memory
To: Werner Vogels <vogels@cs.cornell.edu>
From: Paul Kranenburg <pk@cs.few.eur.nl>
List: port-sparc
Date: 02/21/1996 02:41:23
> Is it possible to create a segment of non-cacheable memory and map this into
> the user process? We need this for implementing direct user space data
> delivery on the sparcs that have no hardware cache coherency.

There's no mechanism to do this in a standard kernel. Your best bet would
be to construct a device driver that provides a `d_mmap' routine, which
a user program can access through mmap(2). Look at the various framebuffer
devices for examples.

This driver just needs an open(), close() and  map() routine,
something like:

	open(): if (not already open) { allocate some memory; }
	close(): { de-allocate memory }
	map(): { return address of memory, marking it non-cacheable; }

-pk