summaryrefslogtreecommitdiff
path: root/arch/arm64/kernel/relocate_kernel.S
diff options
context:
space:
mode:
authorAKASHI Takahiro <takahiro.akashi@linaro.org>2018-11-15 08:52:52 +0300
committerWill Deacon <will.deacon@arm.com>2018-12-06 17:38:53 +0300
commit4c9e7e649a3f291e1b939299458e6844c16afe70 (patch)
tree446f0a65db719795d0c0eb5c6a5757fb73151e34 /arch/arm64/kernel/relocate_kernel.S
parentf3b70e50942960ecc691367bb937e35cdc5e28d3 (diff)
downloadlinux-4c9e7e649a3f291e1b939299458e6844c16afe70.tar.xz
arm64: kexec_file: invoke the kernel without purgatory
On arm64, purgatory would do almost nothing. So just invoke secondary kernel directly by jumping into its entry code. While, in this case, cpu_soft_restart() must be called with dtb address in the fifth argument, the behavior still stays compatible with kexec_load case as long as the argument is null. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: James Morse <james.morse@arm.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/kernel/relocate_kernel.S')
-rw-r--r--arch/arm64/kernel/relocate_kernel.S3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm64/kernel/relocate_kernel.S b/arch/arm64/kernel/relocate_kernel.S
index f407e422a720..95fd94209aae 100644
--- a/arch/arm64/kernel/relocate_kernel.S
+++ b/arch/arm64/kernel/relocate_kernel.S
@@ -32,6 +32,7 @@
ENTRY(arm64_relocate_new_kernel)
/* Setup the list loop variables. */
+ mov x18, x2 /* x18 = dtb address */
mov x17, x1 /* x17 = kimage_start */
mov x16, x0 /* x16 = kimage_head */
raw_dcache_line_size x15, x0 /* x15 = dcache line size */
@@ -107,7 +108,7 @@ ENTRY(arm64_relocate_new_kernel)
isb
/* Start new image. */
- mov x0, xzr
+ mov x0, x18
mov x1, xzr
mov x2, xzr
mov x3, xzr