hw/arm: make bitbanded IO optional on ARMv7-M
commita1c5a06224173043eb4ac5b280f0b78718121fa2
authorStefan Hajnoczi <stefanha@redhat.com>
Thu, 16 Aug 2018 13:05:28 +0000 (16 14:05 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 16 Aug 2018 13:05:28 +0000 (16 14:05 +0100)
tree0c05d1a4ad31d281b0b067a56ef0dbb220ad4407
parent0550e3bf7fd446bbce4768baa39bd64c3ab94636
hw/arm: make bitbanded IO optional on ARMv7-M

Some ARM CPUs have bitbanded IO, a memory region that allows convenient
bit access via 32-bit memory loads/stores.  This eliminates the need for
read-modify-update instruction sequences.

This patch makes this optional feature an ARMv7MState qdev property,
allowing boards to choose whether they want bitbanding or not.

Status of boards:
 * iotkit (Cortex M33), no bitband
 * mps2 (Cortex M3), bitband
 * msf2 (Cortex M3), bitband
 * stellaris (Cortex M3), bitband
 * stm32f205 (Cortex M3), bitband

As a side-effect of this patch, Peter Maydell noted that the Ethernet
controller on mps2 board is now accessible.  Previously they were hidden
by the bitband region (which does not exist on the real board).

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20180814162739.11814-2-stefanha@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/arm/armv7m.c
hw/arm/mps2.c
hw/arm/msf2-soc.c
hw/arm/stellaris.c
hw/arm/stm32f205_soc.c
include/hw/arm/armv7m.h