Commit f2ae9de0 authored by Łukasz Stelmach's avatar Łukasz Stelmach Committed by Russell King

ARM: 8758/1: decompressor: restore r1 and r2 just before jumping to the kernel

The hypervisor setup before __enter_kernel destroys the value
sotred in r1. The value needs to be restored just before the jump.

Fixes: 6b52f7bd ("ARM: hyp-stub: Use r1 for the soft-restart address")
Signed-off-by: default avatarŁukasz Stelmach <l.stelmach@samsung.com>
Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
parent e07e3c33
...@@ -561,8 +561,6 @@ not_relocated: mov r0, #0 ...@@ -561,8 +561,6 @@ not_relocated: mov r0, #0
bl decompress_kernel bl decompress_kernel
bl cache_clean_flush bl cache_clean_flush
bl cache_off bl cache_off
mov r1, r7 @ restore architecture number
mov r2, r8 @ restore atags pointer
#ifdef CONFIG_ARM_VIRT_EXT #ifdef CONFIG_ARM_VIRT_EXT
mrs r0, spsr @ Get saved CPU boot mode mrs r0, spsr @ Get saved CPU boot mode
...@@ -1365,6 +1363,8 @@ __hyp_reentry_vectors: ...@@ -1365,6 +1363,8 @@ __hyp_reentry_vectors:
__enter_kernel: __enter_kernel:
mov r0, #0 @ must be 0 mov r0, #0 @ must be 0
mov r1, r7 @ restore architecture number
mov r2, r8 @ restore atags pointer
ARM( mov pc, r4 ) @ call kernel ARM( mov pc, r4 ) @ call kernel
M_CLASS( add r4, r4, #1 ) @ enter in Thumb mode for M class M_CLASS( add r4, r4, #1 ) @ enter in Thumb mode for M class
THUMB( bx r4 ) @ entry point is always ARM for A/R classes THUMB( bx r4 ) @ entry point is always ARM for A/R classes
......
Markdown is supported
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