From: Greg Allen <gallen@arlut.utexas.edu>
To: linuxppc-dev@lists.linuxppc.org
Subject: Directly accessing I/O ports
Date: Thu, 18 Jul 2002 19:06:12 -0500 [thread overview]
Message-ID: <p05111b16b95d05434f09@[10.8.16.89]> (raw)
I'd like to get the Linux ethernet card diagnostic tool,
eepro100-diag.c (from http://www.scyld.com/diag/index.html) running
on the PowerPC.
Unfortunately, it uses iopl() and inw()/outw()/inl()/outl() to access
the entire I/O port space directly in userland. In fact, much of this
family of utils does the same thing.
I tried something like:
io_fd = open("/dev/port", O_RDWR);
iobase = mmap(0, device_size, PROT_READ|PROT_WRITE, MAP_SHARED,
io_fd, device_base);
but I can't get it to work.
Are there suggestions (or code snippets) as to how I should proceed?
For that matter, what's the *right* way to access this sort of thing
from userland?
Thanks,
-Greg
--
Gregory E. Allen, MSEE Engineering Scientist
Applied Research Laboratories: The University of Texas at Austin
Please help find my missing daughter: http://FindSabrina.org/
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
next reply other threads:[~2002-07-19 0:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-19 0:06 Greg Allen [this message]
2002-07-20 18:10 ` Directly accessing I/O ports Benjamin Herrenschmidt
2002-07-22 17:00 ` Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='p05111b16b95d05434f09@[10.8.16.89]' \
--to=gallen@arlut.utexas.edu \
--cc=linuxppc-dev@lists.linuxppc.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.