aboutsummaryrefslogtreecommitdiff
path: root/hw/char
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2023-07-10 17:55:56 +0200
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2023-08-31 19:47:43 +0200
commit7e66d52b0c4d12c8d8c9fc11630908bc630070c0 (patch)
tree2f9e2f1713f03775f14f90172fa06aadd5d7255a /hw/char
parent53c7c924228a9227bfdbb4d2f92e657cb805a37d (diff)
hw/char/pl011: Restrict MemoryRegionOps implementation access sizes
The pl011_read() and pl011_write() handlers shift the offset argument by 2, so are implemented on a 32-bit boundary. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230710175102.32429-2-philmd@linaro.org>
Diffstat (limited to 'hw/char')
-rw-r--r--hw/char/pl011.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/char/pl011.c b/hw/char/pl011.c
index 77bbc2a982..73f1a3aea2 100644
--- a/hw/char/pl011.c
+++ b/hw/char/pl011.c
@@ -358,6 +358,8 @@ static const MemoryRegionOps pl011_ops = {
.read = pl011_read,
.write = pl011_write,
.endianness = DEVICE_NATIVE_ENDIAN,
+ .impl.min_access_size = 4,
+ .impl.max_access_size = 4,
};
static bool pl011_clock_needed(void *opaque)