ARM, MMU and IO space mapping

Robert Jarzmik robert.jarzmik at free.fr
Wed Nov 30 17:06:13 EST 2011


Sascha Hauer <s.hauer at 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) ?

Cheers.

-- 
Robert



More information about the barebox mailing list