linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Johnson <anj@aps.anl.gov>
To: "Karaaslan, Utku" <UKaraasl@drs.ca>
Cc: "'linuxppc-embedded@lists.linuxppc.org'"
	<linuxppc-embedded@lists.linuxppc.org>
Subject: Re: A Question on Physical Memory Access from Applications
Date: Wed, 08 Aug 2001 09:32:20 -0500	[thread overview]
Message-ID: <3B714D74.F5AF49D1@aps.anl.gov> (raw)
In-Reply-To: 47EE8DCFB8C6D311A23700508B8BAD5903DAF7@THEBRAIN2


"Karaaslan, Utku" wrote:
>
> I have a problem: we've got a number of ADA applications which are
> using direct memory access to certain hardware registers. Under
> VxWorks, this is not a problem as it lacks kernelspace/userspace
> separation. Under Linux, I know I can do direct memory access (through
> /dev/mem), but in this case I want to use the applications as they are,
> with no change to the ADA code. Is there any way to do physical memory
> access transparently wrt the application? Many thanks in advance.

If you don't mind inserting some code into the application startup then
you could probably do something with mmap(), either with /dev/mem or
(safer) by writing your own kernel driver for the relevent hardware that
supports mmap()ing just the relevent physical range into user-space (and
makes it non-cacheable).  It might be possible to use LD_PRELOAD to do
this at startup without changing the application at all, although I
suspect you might have to make some changes to get the address of the
mmapped region - I'm not sure that you could guarantee to place it where
you want in virtual memory.

HTH,

- Andrew
--
The world is such a cheerful place when viewed from upside-down
It makes a rise of every fall, a smile of every frown

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

  reply	other threads:[~2001-08-08 14:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-08 13:38 A Question on Physical Memory Access from Applications Karaaslan, Utku
2001-08-08 14:32 ` Andrew Johnson [this message]
2001-08-08 21:24 ` Rabeeh Khoury
  -- strict thread matches above, loose matches on Subject: below --
2001-08-09  5:55 eejape

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=3B714D74.F5AF49D1@aps.anl.gov \
    --to=anj@aps.anl.gov \
    --cc=UKaraasl@drs.ca \
    --cc=linuxppc-embedded@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 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).