Date: Mon, 27 Oct 1997 15:11:39 +0100 From: Christoph Kukulies <kuku@gilberto.physik.RWTH-Aachen.DE> To: Peter Dufault <dufault@hda.com> Cc: Christoph Kukulies <kuku@gilberto.physik.RWTH-Aachen.DE>, freebsd-hackers@freefall.FreeBSD.org Subject: Re: mmap/mlock problem Message-ID: <19971027151139.61831@gil.physik.rwth-aachen.de> In-Reply-To: <199710271303.IAA24466@hda.hda.com>; from Peter Dufault on Mon, Oct 27, 1997 at 08:02:59AM -0500 References: <199710271231.NAA03303@gil.physik.rwth-aachen.de> <199710271303.IAA24466@hda.hda.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Oct 27, 1997 at 08:02:59AM -0500, Peter Dufault wrote: > > The ISA mapped memory is a dual ported RAM which is > > controlled by the on board CPU on one end and the > > user process on the other end. Writing something > > into the ISA memory should not result in reading > > the same back from it. But the fact of the matter is > > that I read back what I'v written into it and this > > seems to me as if the memory is cached. > > > > I tried a mlock call on the mmapped region but this > > seems to fail in the user process. > > You shouldn't have to lock the region - the page tables for that > virtual section of your process are set up to map to those physical > addresses. Unplug the board and verify that you now can't write > to it so you know you're accessing the board - I think the map > will still succeed. > > Do you have to do some sort of hand shake with the CPU on the > I/O board? Yes, it seems so. Not in such an atomic level that some CPU data transfer acknowledge lines are tied to the memory locations but on some higher level. There is a 80186 on the board which communicates over some semaphores in the memory region with the outside world. You write a command into the location and that location must read as 0000 or FFFF if the board is ready or not resp.. Actually it's quite weird - I have the source of a DOS program which communicates with the board. (This is written for Borlandc/16 bit) > > Peter > > -- > Peter Dufault (dufault@hda.com) Realtime development, Machine control, > HD Associates, Inc. Safety critical systems, Agency approval -- Chris Christoph P. U. Kukulies kuku@gil.physik.rwth-aachen.de
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19971027151139.61831>