]> git.proxmox.com Git - mirror_qemu.git/commit - hw/intc/armv7m_nvic.c
nvic: Clear the vector arrays and prigroup on reset
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 6 Oct 2017 15:46:47 +0000 (16:46 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 6 Oct 2017 15:46:47 +0000 (16:46 +0100)
commit8ff26a3344b6e6d1eeb00b4043232a5bdbc0ebf9
tree5f5a1ce68821a8382d09fbab54fc1068173d8ec4
parentd858914435a13982c3ea981bb24dee958b2ca7c4
nvic: Clear the vector arrays and prigroup on reset

Reset for devices does not include an automatic clear of the
device state (unlike CPU state, where most of the state
structure is cleared to zero). Add some missing initialization
of NVIC state that meant that the device was left in the wrong
state if the guest did a warm reset.

(In particular, since we were resetting the computed state like
s->exception_prio but not all the state it was computed
from like s->vectors[x].active, the NVIC wound up in an
inconsistent state that could later trigger assertion failures.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 1506092407-26985-2-git-send-email-peter.maydell@linaro.org
hw/intc/armv7m_nvic.c