linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: Ed Okerson <ed.okerson@gmail.com>
Cc: linux-mips@linux-mips.org
Subject: Re: mmap KSEG1
Date: Fri, 4 Dec 2009 19:33:09 +0100	[thread overview]
Message-ID: <20091204183309.GA10383@alpha.franken.de> (raw)
In-Reply-To: <83f0348b0912040952h40d4d151n79ca5fc33a830ee2@mail.gmail.com>

On Fri, Dec 04, 2009 at 11:52:03AM -0600, Ed Okerson wrote:
> Is it possible to mmap an address in KSEG1 so a user space app can
> read/write to an IO device uncached?

well not exactly to KSEG1, since that is kernel exclusive address space,
but it's possible to map the physical address of the device:

Try

fd = open("/dev/mem", O_RDWR|O_SYNC);
io = mmap (NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, ioaddr);

where ioaddr is the physical address of the io device.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessary a
good idea.                                                [ RFC1925, 2.3 ]

      parent reply	other threads:[~2009-12-04 18:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-04 17:52 mmap KSEG1 Ed Okerson
2009-12-04 18:12 ` David Daney
2009-12-04 18:33 ` Thomas Bogendoerfer [this message]

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=20091204183309.GA10383@alpha.franken.de \
    --to=tsbogend@alpha.franken.de \
    --cc=ed.okerson@gmail.com \
    --cc=linux-mips@linux-mips.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 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).