[PATCH v2] ARM: kexec: selective MMU identity mapping

Russell King - ARM Linux linux at arm.linux.org.uk
Wed Feb 2 17:47:45 EST 2011


On Wed, Feb 02, 2011 at 05:27:40PM -0500, Nicolas Pitre wrote:
> On Wed, 2 Feb 2011, Russell King - ARM Linux wrote:
> 
> > It's known to work on Assabet.  It works on SA1100 because the kernel
> > mapping is already a 1:1 mapping.
> D'oh.
> 
> > What setup_mm_for_reboot() is doing on Assabet though is making the
> > flash available for cpu_reset(0) to be able to call, not making the
> > kernel code for cpu_reset() available for calling.
> 
> Right.  So if RAM is located at 0xd0000000 instead then this won't work 
> as intended.

It'll work as intended for cpu resetting, except for v6 and v7 as they
don't have the necessary code in their cpu_reset() function to work,
and secondly perversely, v6 and v7 CPUs stall the pipeline when turning
the MMU off, while previous CPUs didn't.  Meanwhile, many other
instructions which did stall the pipeline no longer do.

> And overwriting the entire user space is not the best thing to do for
> kexec anyway.

Probably not.  As I see it, having RAM located above PAGE_OFFSET in phys
address space, but not being a 1:1 mapping, will always be a problem.
What if it ends up overwriting the L2 cache controller mapping?



More information about the linux-arm-kernel mailing list