OSDN Git Service

target/sh4: fix reset when using a kernel and an initrd
authorAurelien Jarno <aurelien@aurel32.net>
Tue, 16 May 2017 22:48:18 +0000 (00:48 +0200)
committerAurelien Jarno <aurelien@aurel32.net>
Tue, 30 May 2017 19:00:56 +0000 (21:00 +0200)
commit73479c5c87bf431c6344a80ab01456ed979447f1
tree86a121bfd648630a310de854354b3c437d0714a6
parent324189babbc0b70d9ce558deb63d33040d002b7a
target/sh4: fix reset when using a kernel and an initrd

When a masked exception happens, the SH4 CPU generates a non-masked
reset exception, which then jumps to the reset vector at address
0xA0000000. While this is emulated correctly in QEMU, this does not
work when using a kernel and initrd as this address then contain an
illegal instruction (and there is no guarantee the kernel and initrd
haven't been overwritten).

Therefore call qemu_system_reset_request to reload the kernel and initrd
and load the program counter to the kernel entry point.

Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target/sh4/helper.c