lkml.org 
[lkml]   [1997]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: what is wrong with this?
Date
From
> Andrew E. Mileski writes:
> > Try reading the man pages :-)
> I did. I tried using ioperm but no avail in my experience

The correct response would have been, "Only if you start reading the
whole message."

I apologize. I screwed up - I thought you were only trying to access
the I/O ports. Again, sorry.

> I had two fundamental problems with my approach.
>
> 1) a pointer into VIRTUAL MEMORY will never reach ioports.

It will if you map /dev/ioports. I don't really recommend it though,
as it is kinda slow.

> 2) gcc -O is imperative for outb/inb/outw/...etc to compile.
> initially I gave up on these because I couldn't compile
> without getting bad symbol references

Ya, this is a hiden gottcha.

> Exactly. Except iopl(3), in addition to raising the bitmap to take 8k,
> sets it to allow access to any ioport, thus ioperm is not necessary
> when iopl is called. Or so that is the current behavior. I know not
> if it is correct behavior.

Makes sense to me.

--
Andrew E. Mileski mailto:aem@ott.hookup.net
Linux Plug-and-Play Kernel Project http://www.redhat.com/linux-info/pnp/
XFree86 Matrox Team http://www.bf.rmit.edu.au/~ajv/xf86-matrox.html

\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.059 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site