OSDN Git Service

hw/arm/armsse: Make 0x5... alias region work for per-CPU devices
authorPeter Maydell <peter.maydell@linaro.org>
Thu, 21 Feb 2019 18:17:48 +0000 (18:17 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 21 Feb 2019 18:17:48 +0000 (18:17 +0000)
commit3733f80308d2a7f23f5e39b039e0547aba6c07f1
tree42c2e7141ebdefd2ae8e3c2c60b27d49265181b7
parent1486f1bac3eb81b43138aa5a7e1434798fe4bd97
hw/arm/armsse: Make 0x5... alias region work for per-CPU devices

The region 0x40010000 .. 0x4001ffff and its secure-only alias
at 0x50010000... are for per-CPU devices. We implement this by
giving each CPU its own container memory region, where the
per-CPU devices live. Unfortunately, the alias region which
makes devices mapped at 0x4... addresses also appear at 0x5...
is only implemented in the overall "all CPUs" container. The
effect of this bug is that the CPU_IDENTITY register block appears
only at 0x4001f000, but not at the 0x5001f000 alias where it should
also appear. Guests (like very recent Arm Trusted Firmware-M)
which try to access it at 0x5001f000 will crash.

Fix this by moving the handling for this alias from the "all CPUs"
container to the per-CPU container. (We leave the aliases for
0x1... and 0x3... in the overall container, because there are
no per-CPU devices there.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20190215180500.6906-1-peter.maydell@linaro.org
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
hw/arm/armsse.c
include/hw/arm/armsse.h