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

Russell King - ARM Linux linux at arm.linux.org.uk
Wed Feb 2 16:09:25 EST 2011


On Wed, Feb 02, 2011 at 03:43:29PM +0100, Per Fransson wrote:
> When restarting using the kernel kexec functionality the MMU
> needs to be turned off. Any code which does this needs to use
> identity mapped addresses to get reliable results. In the ARM
> kexec case this identity mapping is done:
> 
> - using the page table of the current task
> 
> - for all addresses normally used by user space,
>   i.e. 0x00000000-PAGE_OFFSET
> 
> If kexec is used at a kernel crash to collect a core dump this
> means that we lose important information.
> 
> This is what this patches does:
> 
> * Actually turns off the MMU, which has been omitted by mistake
> 
> * Sets up a more selective identity mapping
> 
> * Restores the old mapping once the MMU is off
> 
> Signed-off-by: Per Fransson <per.xx.fransson at stericsson.com>
> ---
> v2 changes:
> 
> * now uses (modified versions of) the identity mapping functions in idmap.c
>   as they look in 2.6.38-rc1. Some pud-level code has been added there in
>   linux-next.

Thanks.  As this been tested with ARMv4/v5 CPUs as well?



More information about the kexec mailing list