Subject: netbsd i386 1.6.1 question: (user mode hw io)
To: None <port-i386@netbsd.org>
From: Peter L. Peres <plp@actcom.co.il>
List: port-i386
Date: 12/23/2004 13:54:34
I have a small question. I am trying to port an old usermode hw io 
testing program that I wrote a long time ago from linux to netbsd. My 
question is, how does one do user mode hw io using bus_space_... 
functions when the handle for the bus space cannot be obtained in user 
mode. In particular i386_memio_map and unmap are not implemented 
anywhere in the header files supplied with netbsd-1.6.1 (I presume that 
they are implemented in the kernel sources since they exist in /netbsd). 
The other bus_space_... functions mostly *are* implemented in the 
headers.

So, am I trying to do something impossible, or not ? i.e. can I compile 
a user mode program, to be run as root, which uses bus_space_peek and 
_poke, or do I have to write a proper driver ? I know that this is 
'dangerous' etc but it is needed to debug and test certain hardware.

tia,
Peter