OSDN Git Service

hw/intc/armv7m_nvic: Don't hardcode M profile ID registers in NVIC
authorPeter Maydell <peter.maydell@linaro.org>
Thu, 15 Feb 2018 18:29:37 +0000 (18:29 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 15 Feb 2018 18:29:49 +0000 (18:29 +0000)
commit5a53e2c1dc939fea1af92cc126ee546d8211d412
tree203d4352dccc7eb6cbda4009a2ff279e78e63abf
parent4ff55bcb0ee6452b768835f86d94bd727185f812
hw/intc/armv7m_nvic: Don't hardcode M profile ID registers in NVIC

Instead of hardcoding the values of M profile ID registers in the
NVIC, use the fields in the CPU struct. This will allow us to
give different M profile CPU types different ID register values.

This commit includes the addition of the missing ID_ISAR5,
which exists as RES0 in both v7M and v8M.

(The values of the ID registers might be wrong for the M4 --
this commit leaves the behaviour there unchanged.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20180209165810.6668-2-peter.maydell@linaro.org
hw/intc/armv7m_nvic.c
target/arm/cpu.c