linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: Steven Blakeslee <BlakesleeS@embeddedplanet.com>
Cc: "'linuxppc-embedded@lists.linuxppc.org'"
	<linuxppc-embedded@lists.linuxppc.org>
Subject: Re: execute from flash?
Date: Mon, 25 Feb 2002 21:50:37 +0100	[thread overview]
Message-ID: <20020225205042.64FC9109E3@denx.denx.de> (raw)
In-Reply-To: Your message of "Mon, 25 Feb 2002 15:17:14 EST." <D73A25AA6E54D511AD74009027B1110F0F30B0@ORION>


Steven,

in message <D73A25AA6E54D511AD74009027B1110F0F30B0@ORION> you wrote:
>
> Does anyone know how I can run a program in flash from my embedded linux
> kernel that is also running in flash?  Below is the code that I tried but it

I don't think your kernel is running from  flash.  It  is  stored  in
flash,  but  usually  then it gets loaded (and probably uncompressed)
into RAM, and is running from RAM.

YOu can do similar things whith your own code:  you  can  put  it  in
flash,  and load it from flash into RAM to run it. This requires that
you have some way to access  the  flash  memory  -  under  Unix  this
requires  either  a basic device driver (character device), or a more
sophisticated device driver (block device) that allows you to  put  a
filesystem in flash.

> 	int addr = 0xfff80000;

You cannot access arbitrary physical addresses  from  an  application
program.  Linux  uses  virtual memory, and you should get used to the
idea that you cannot access physical memory or devices except through
some special interfaces  provided  by  the  OS  (system  calls  which
usually require some device drivers).

Wolfgang Denk

--
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd@denx.de
I must follow the people.  Am I not their leader? - Benjamin Disraeli

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

  reply	other threads:[~2002-02-25 20:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-25 20:17 execute from flash? Steven Blakeslee
2002-02-25 20:50 ` Wolfgang Denk [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-02-25 22:23 Petersen, David (MED, GEMS-IT)

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=20020225205042.64FC9109E3@denx.denx.de \
    --to=wd@denx.de \
    --cc=BlakesleeS@embeddedplanet.com \
    --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).