From owner-freebsd-hackers Mon Oct 27 05:53:00 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id FAA20743 for hackers-outgoing; Mon, 27 Oct 1997 05:53:00 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from hda.hda.com (hda-bicnet.bicnet.net [208.220.66.37]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id FAA20738 for ; Mon, 27 Oct 1997 05:52:57 -0800 (PST) (envelope-from dufault@hda.hda.com) Received: (from dufault@localhost) by hda.hda.com (8.8.5/8.8.5) id IAA24466; Mon, 27 Oct 1997 08:03:00 -0500 (EST) From: Peter Dufault Message-Id: <199710271303.IAA24466@hda.hda.com> Subject: Re: mmap/mlock problem In-Reply-To: <199710271231.NAA03303@gil.physik.rwth-aachen.de> from Christoph Kukulies at "Oct 27, 97 01:31:56 pm" To: kuku@gilberto.physik.RWTH-Aachen.DE (Christoph Kukulies) Date: Mon, 27 Oct 1997 08:02:59 -0500 (EST) Cc: freebsd-hackers@freefall.FreeBSD.org X-Mailer: ELM [version 2.4ME+ PL25 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > 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? Peter -- Peter Dufault (dufault@hda.com) Realtime development, Machine control, HD Associates, Inc. Safety critical systems, Agency approval