linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Matt Porter <mporter@kernel.crashing.org>
To: scarayol@assystembrime.com
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: Read in /dev/port with Segmentation Fault
Date: Thu, 9 Jun 2005 02:12:51 -0700	[thread overview]
Message-ID: <20050609021250.A5659@cox.net> (raw)
In-Reply-To: <OF76EEFE38.5001E643-ONC125701B.00283639@brime.fr>; from scarayol@assystembrime.com on Thu, Jun 09, 2005 at 09:30:43AM +0200

On Thu, Jun 09, 2005 at 09:30:43AM +0200, scarayol@assystembrime.com wrote:
> Hi all,
> 
> I want to access to IO ports on a MPC885. The iopl() is not implemented, in
> my distribution, to use inw() outw().
> So I use /dev/port. It works for open("/dev/port",..) and lseek() but when
> i do a read()  i have a segmentation fault. I gave all the right to
> /dev/port
> Does anybody have an idea ?

You are trying to use x86-specific interfaces to x86-specific IO space.
By "IO ports" you must mean memory mapped I/O registers since you are
on PPC. From userspace, use mmap() to map physical address space to a
user virtual address range.

-Matt

  reply	other threads:[~2005-06-09  9:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-09  7:30 Read in /dev/port with Segmentation Fault scarayol
2005-06-09  9:12 ` Matt Porter [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-06-09 10:05 scarayol

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=20050609021250.A5659@cox.net \
    --to=mporter@kernel.crashing.org \
    --cc=linuxppc-embedded@ozlabs.org \
    --cc=scarayol@assystembrime.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).