[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Direct I/O port access (x86)



Cox Family wrote (in a message from Monday 4)
 > 
 >   1. Open "/dev/io" in order to gain permissions needed to use 
 >      the 'inb' / 'outb' macros.
 > 
 >   2. Send data to the device using 'inb' / 'outb'.
 > 
 >   3. Close "/dev/io" (obviously ;-)
 > 
 > 
 > Would anyone care to take a guess as to where the problem may 
 > be?  Lack of permissions to access the sound device?

The method of openinig /dev/io (or /dev /console) has been withdrawn
for years. Use i386_iopl() instead. i386_iopl(1) grants permission to
use I/O ports and i386_iopl(0) dismisses the permission.

Note that you need to link your program with -li386 and run it as
root. 

					Matthieu