]> git.proxmox.com Git - mirror_qemu.git/commit - target/arm/cpu.h
hw/intc/armv7m_nvic: Implement cache ID registers
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)
commit43bbce7fbef22adf687dd84934fd0b2f8df807a8
tree6b723768dea3f977f642b110ca3a87d75ca8b10a
parentae7c5c855b71f2de23dbad3b97bbe1c0375d6fd3
hw/intc/armv7m_nvic: Implement cache ID registers

M profile cores have a similar setup for cache ID registers
to A profile:
 * Cache Level ID Register (CLIDR) is a fixed value
 * Cache Type Register (CTR) is a fixed value
 * Cache Size ID Registers (CCSIDR) are a bank of registers;
   which one you see is selected by the Cache Size Selection
   Register (CSSELR)

The only difference is that they're in the NVIC memory mapped
register space rather than being coprocessor registers.
Implement the M profile view of them.

Since neither Cortex-M3 nor Cortex-M4 implement caches,
we don't need to update their init functions and can leave
the ctr/clidr/ccsidr[] fields in their ARMCPU structs at zero.
Newer cores (like the Cortex-M33) will want to be able to
set these ID registers to non-zero values, though.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20180209165810.6668-6-peter.maydell@linaro.org
hw/intc/armv7m_nvic.c
target/arm/cpu.h
target/arm/machine.c