direct I/O access

John-Mark Gurney gurney_j at resnet.uoregon.edu
Sat May 19 16:38:45 UTC 2007


rmgls at wanadoo.fr wrote this message on Sat, May 19, 2007 at 17:01 +0200:
> i am trying to port my old assembler soft for Dos to FreeBSD.
> i need to write and read directly to the midi and scsi device.
> when i try something like this i receive a coredump on the outb line.
> 
> SORRY, i am NOT nor a C nor a FreeBSD expert!!!
> all i know is Assembly language!
> 
> Can you enlight me please?

Take a look at io(4)...  FreeBSD restricts access to the hardware to
ensure that the userland does not mess up the state that the kernel
has established...

In the Unix world, it is standard to write a kernel device driver that
does the hardware access side of things, and then provide a device for
the program use the hardware...  This ensures that the hardware can be
shared and conflicts do not arrise...

Just make sure you don't load devices for the hardware that you plan to
direectly access if you continue down that route...

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."


More information about the freebsd-multimedia mailing list