Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Apr 1997 00:21:04 +0200 (CEST)
From:      Klaus Werner Krygier <krygier@kph.uni-mainz.de>
To:        freebsd-hackers@freebsd.org
Subject:   Re: special memory device
Message-ID:  <Pine.BSF.3.95q.970418234936.29149C-100000@krygierpc.kph.uni-mainz.de>
In-Reply-To: <19970416004851.LL04161@uriah.heep.sax.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 16 Apr 1997, J Wunsch wrote:

> As Klaus Werner Krygier wrote:
> 
> > Now I want to install a similar device which is compatible to the Sun
> > solution. It will never be used by read/write i/o but only by mmaped i/o.
> > It shall be able to do a dynamic remapping of the VMEbus window every time
> > an address is accessed which is out of the current 64 KB window using the
> > page fault mechanism. Is this possible?
> 
> This sounds hard to do.  Is your card using a real bus system (EISA,
> PCI), so that you could map the entire memory at once?  This would be
> the simplest solution.
> 

The card is a simple ISA card with an address space of only 64 KB, and I
want to access at least 16 MB of the VMEbus.

> Otherwise, i guess you gotta play VM games, by invalidating the pages
> for the currently invisible device memory.  You have to be notified
> about the page fault (no idea how this might be done, but i'm sure
> David or John could chime in here), invalidate the pages for the
> currently visible window, reprogram your card, and validate the pages
> for the now visible window.  Returning from the page fault handler
> will continue the application.
>

This is exaclty what I wanted to do. In my further tests I saw, that
the operating systems already does almost the work. The mmap routine of
my driver is called several times - not only during the execution of the
mmap system call but also later when the memory is accessed. I noticed
that for any page of the mmaped memory area it is called at the first
access of the page. This means that the notification about the page fault
seems to be done by calling the driver's mmap routine. Here I can
reprogram the interface card. The validation of the now visible window
is done automatically. The only problem that remains is, how to invalidate
the pages for the old window so that a page fault will be generated
again if this window is accessed later.

Regards,

Klaus Werner Krygier

+-----------------------------------------------------------------------+
| Dr. Klaus Werner Krygier            | Email: krygier@kph.uni-mainz.de |
| Institut für Kernphysik             |                                 |
| Johannes Gutenberg-Universität      | Tel:   +49-6131-39-2960         |
| J.J.Becher-Weg 45                   |        +49-6131-39-5192         |
| D-55099 Mainz                       | Fax:   +49-6131-39-2964         |
+-----------------------------------------------------------------------+




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95q.970418234936.29149C-100000>