Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Oct 1997 23:56:07 +0930
From:      Mike Smith <mike@smith.net.au>
To:        Christoph Kukulies <kuku@gilberto.physik.RWTH-Aachen.DE>
Cc:        freebsd-hackers@freefall.FreeBSD.org
Subject:   Re: need help in ISA memory mapping 
Message-ID:  <199710231426.XAA00457@word.smith.net.au>
In-Reply-To: Your message of "Thu, 23 Oct 1997 09:46:58 %2B0200." <199710230746.JAA13974@gil.physik.rwth-aachen.de> 

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> A user program should be able to directly read/write into these memory
> locations via a pointer (byte or word). Is there a way tp 'map'
> this into a user address space?  Is it possible at all? 

Yup.  You just need to mmap() a friendly driver or memory extent.

> I can use the isa_dev structure in the kernel driver (I have written
> a minimum driver that probes the card) but this only works in kernel
> mode.

You could extend the driver trivially to offer mmap() facilities; this 
would be ideal as it would allow you to detect the correct location for 
the card & disallow the mapping if the card did not exist.

Have a look at the mapping stuff in syscons for an example.

mike





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199710231426.XAA00457>