mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: barebox@lists.infradead.org
Subject: Re: ARM, MMU and IO space mapping
Date: Thu, 1 Dec 2011 15:26:36 +0100	[thread overview]
Message-ID: <20111201142636.GP27267@pengutronix.de> (raw)
In-Reply-To: <87y5ux6zai.fsf@free.fr>

On Wed, Nov 30, 2011 at 11:06:13PM +0100, Robert Jarzmik wrote:
> Sascha Hauer <s.hauer@pengutronix.de> writes:
> 
> > We use high vectors at 0xfff00000, so there won't be vectors at 0x0. the
> > 0x0 mapping is only used to catch NULL pointer derefs.
> 
> > That said, being able to catch NULL pointers is a very good thing,
> > especially when there is flash at 0x0 which might be accidently
> > overwritten by some code acting on NULL pointers.
> I don't know if it can be that easily overwritten, but catching NPE is always
> good, it's true.
> 
> > With MMU we could just remap the flash in board code and pass the
> > remapped address as resource to the cfi driver. While I think the
> > cleanest solution would be to use ioremap in all drivers (and make
> > this a no-op on most boards) I don't think it's worth it at the moment.
> OK, remap in board, and input virtual mapping address into io ressource, simple
> enough. OK, I'll try that.
> That would require a function in arch/arm/cpu/mmu.c, to remap a physical address
> range into a virtual one, wouldn't it ? Would you have a suggestion for the API
> ? As in map_io_section(u32 phys_addr, void *virt) ?

How about adding a size parameter ;)

Yes, this looks good enough for now.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2011-12-01 14:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-24 11:24 Robert Jarzmik
2011-11-24 12:04 ` Sascha Hauer
2011-11-24 14:23   ` Marc Kleine-Budde
2011-11-24 20:09   ` Robert Jarzmik
2011-11-24 20:25     ` Marc Kleine-Budde
2011-11-25  0:01     ` Sascha Hauer
2011-11-27 22:30       ` Robert Jarzmik
2011-11-28  7:43         ` Sascha Hauer
2011-11-28 17:43           ` Robert Jarzmik
2011-11-29  8:15             ` Sascha Hauer
2011-11-30 22:06               ` Robert Jarzmik
2011-12-01 14:26                 ` Sascha Hauer [this message]
2011-12-01 14:34                   ` Marc Kleine-Budde
2011-12-11 13:01                   ` Robert Jarzmik

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=20111201142636.GP27267@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=robert.jarzmik@free.fr \
    /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