Skip to content
Commit 0d70262a authored by Russell King's avatar Russell King
Browse files

ARM: kexec: fix failure to boot crash kernel

When kexec was converted to DTB, the dtb address was passed between
machine_kexec_prepare() and machine_kexec() using a static variable.
This is bad news if you load a crash kernel followed by a normal
kernel or vice versa - the last loaded kernel overwrites the dtb
address.

This can result in kexec failures, as (eg) we try to boot the crash
kernel with the last loaded dtb.  For example, with:

the crash kernel fails to find the dtb.

Avoid this by defining a kimage architecture structure, and store
the address to be passed in r2 there, which will either be the ATAGs
or the dtb blob.

Fixes: 4cabd1d9 ("ARM: 7539/1: kexec: scan for dtb magic in segments")
Fixes: 42d720d1

 ("ARM: kexec: Make .text R/W in machine_kexec")
Reported-by: default avatarKeerthy <j-keerthy@ti.com>
Tested-by: default avatarKeerthy <j-keerthy@ti.com>
Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
parent 67556d7a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment