avr-gcc-list
[Top][All Lists]
Advanced

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

Re: [avr-gcc-list] uisp: Failed to get direct io-port acces


From: Theodore A. Roth
Subject: Re: [avr-gcc-list] uisp: Failed to get direct io-port acces
Date: Wed, 28 Aug 2002 10:02:38 -0700 (PDT)

Hi,

If you are doing something that uses any of these:

address@hidden:~/dev/tools/uisp-cvs/src$ grep ioperm *.C
DAPA.C:#define ioport_enable(port, num)  ioperm(port, num, 1)
DAPA.C:#define ioport_disable(port, num) ioperm(port, num, 0)
DAPA.C:#define ioport_enable(port, num)  ioperm(port, num, 1)
DAPA.C:#define ioport_disable(port, num) ioperm(port, num, 0)
DAPA.C:#define ioport_enable(port, num)  i386_set_ioperm(port, num, 1)
DAPA.C:#define ioport_disable(port, num) i386_set_ioperm(port, num, 0)
DAPA.C:      perror("ioperm");

then changing perms on files will do you no good. From the linux man page:

DESCRIPTION
       Ioperm sets the port access permission bits for  the  pro­
       cess  for num bytes starting from port address from to the
       value turn_on.  The use of  ioperm  requires  root  privi­
       leges.

       Only  the  first  0x3ff I/O ports can be specified in this
       manner.  For more ports, the iopl function must  be  used.
       Permissions  are  not  inherited on fork, but on exec they
       are. This is useful for giving port access permissions  to
       non-privileged tasks.

To avoid this, you need to use the ppdev interface instead of raw io. In
that case you will need r/w permissions on the device file
(/dev/ppdev???).

Hope that helps.

Ted Roth

On Wed, 28 Aug 2002, Klaus Rudolph wrote:

:) Hi all,
:)
:) i worked for many many month successfully with usip.
:) But today my linux give me no more access :-(
:)
:) I read the trick a long time ago, but i forgott it.
:) I have not installed any of the ppdev stuff.
:) Was there something to change
:) with /dev/xxx to o+rw ???
:)
:) Sorry for that silly question here.
:)
:)
:) Thanks
:)      Klaus
:) avr-gcc-list at http://avr1.org
:)

avr-gcc-list at http://avr1.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]