Discussion:
help asm not working
(too old to reply)
Razzel
2005-04-16 22:29:22 UTC
Permalink
Is anyone else having trouble getting inb/outb commands to work in C?
Running Slackware 9.1 here.
If you have a solution I could sure use it.
RAZ
Lew Pitcher
2005-04-17 00:32:23 UTC
Permalink
Post by Razzel
Is anyone else having trouble getting inb/outb commands to work in C?
Running Slackware 9.1 here.
If you have a solution I could sure use it.
You /do/ realize that Linux (Slackware and other flavours) is a /secure/
operating system that doesn't permit user programs to perform direct I/O
without special permission, don't you?

You need to run your program as root (either from the root user, or as a
setuid root program), and you need to have the program issue an ioperm(2) or
iopl(2) call before you try to use the outb(2) family of I/O functions.

Are you /sure/ that your user program cannot use an existing device, and needs
direct I/O? If so, then make your program setuid root and have it invoke the
iopl(2)/ioperm(2) calls first.

- --
Lew Pitcher

Master Codewright & JOAT-in-training | GPG public key available on request
Registered Linux User #112576 (http://counter.li.org/)
Slackware - Because I know what I'm doing.

Loading...