linux-stable/arch/xtensa
Guenter Roeck 4a5bf3e729 xtensa: xtfpga: Try software restart before simulating CPU reset
[ Upstream commit 012e974501 ]

Rebooting xtensa images loaded with the '-kernel' option in qemu does
not work. When executing a reboot command, the qemu session either hangs
or experiences an endless sequence of error messages.

  Kernel panic - not syncing: Unrecoverable error in exception handler

Reset code jumps to the CPU restart address, but Linux can not recover
from there because code and data in the kernel init sections have been
discarded and overwritten at this point.

XTFPGA platforms have a means to reset the CPU by writing 0xdead into a
specific FPGA IO address. When used in QEMU the kernel image loaded with
the '-kernel' option gets restored to its original state allowing the
machine to boot successfully.

Use that mechanism to attempt a platform reset. If it does not work,
fall back to the existing mechanism.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-10-27 09:54:25 +02:00
..
boot xtensa: virt: fix PCI IO ports mapping 2019-10-15 14:29:53 -07:00
configs xtensa: virt: add defconfig and DTS 2019-07-08 14:32:06 -07:00
include xtensa: use CONFIG_USE_OF instead of CONFIG_OF 2021-10-13 10:08:18 +02:00
kernel xtensa: call irqchip_init only when CONFIG_USE_OF is selected 2021-10-13 10:08:18 +02:00
lib xtensa: abstract 'entry' and 'retw' in assembly code 2019-07-08 10:04:48 -07:00
mm xtensa: use CONFIG_USE_OF instead of CONFIG_OF 2021-10-13 10:08:18 +02:00
oprofile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
platforms xtensa: xtfpga: Try software restart before simulating CPU reset 2021-10-27 09:54:25 +02:00
variants xtensa: add test_kc705_be variant 2018-08-20 12:34:45 -07:00
Kconfig xtensa: fix kconfig unmet dependency warning for HAVE_FUTEX_CMPXCHG 2021-09-12 08:56:39 +02:00
Kconfig.debug Kconfig: consolidate the "Kernel hacking" menu 2018-08-02 08:06:48 +09:00
Makefile xtensa: generate uapi header and syscall table header files 2018-12-02 23:45:41 -08:00