Thanks! That was it.  I had read the man pages, and "Linux device
drivers" (OReilley) and could find no documentation regarding the value
to feed to iopl() other than the iopl(2) that was mentioned in the man
page for iob.

    Is there a good treatise for this somewhere?  Also about the entire
glibc stuff?

    btw, I do need to access ports above 0x3ff for an embedded project.
Due to an oops by Motorola on their MBX board propogating into embedded
RTOS systems, I'm getting the chance to prove Linux can handle what we
want to do.

thanks again,
bug

Glynn Clements wrote:

> Bug Hunter wrote:
>
> >     I'm running as root, trying to do i/o to one of the
> > parallel port areas using this program fragment:
> >
> > main()
> > {
> >
> >     iopl(2);
> >
> >    outb(0,0x3bd);
> >
> > }
> >
> >
> >     IOPL is successful.  However, I get a segmentation fault
> > at the outb() call.
>
> IIRC, you need to use iopl(3) to obtain access to I/O ports. In
> general, it's preferable to use ioperm() to obtain access only to the
> specific I/O ports which you need. You only need to use iopl() if you
> need to access ports above 0x3ff.
>
> --
> Glynn Clements <[EMAIL PROTECTED]>


Reply via email to