]> www.infradead.org Git - users/dwmw2/qemu.git/commit
arm/arm-powerctl: set NSACR.{CP11, CP10} bits in arm_set_cpu_on()
authorNiek Linnenbank <nieklinnenbank@gmail.com>
Mon, 2 Dec 2019 21:09:43 +0000 (22:09 +0100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Mon, 11 May 2020 23:04:56 +0000 (18:04 -0500)
commita5f815514ae21216962baf3c3f9730ab0a2318c0
treed3ea1b6ea0fc0fe90828924aaddd6945e23e9198
parent2215837fe235af0f92246cc03be1782cdf35d724
arm/arm-powerctl: set NSACR.{CP11, CP10} bits in arm_set_cpu_on()

This change ensures that the FPU can be accessed in Non-Secure mode
when the CPU core is reset using the arm_set_cpu_on() function call.
The NSACR.{CP11,CP10} bits define the exception level required to
access the FPU in Non-Secure mode. Without these bits set, the CPU
will give an undefined exception trap on the first FPU access for the
secondary cores under Linux.

This is necessary because in this power-control codepath QEMU
is effectively emulating a bit of EL3 firmware, and has to set
the CPU up as the EL3 firmware would.

Fixes: fc1120a7f5
Cc: qemu-stable@nongnu.org
Signed-off-by: Niek Linnenbank <nieklinnenbank@gmail.com>
[PMM: added clarifying para to commit message]
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
(cherry picked from commit 0c7f8c43daf6556078e51de98aa13f069e505985)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
target/arm/arm-powerctl.c