Skip to content

Commit 20ab88a

Browse files
shenkilegoater
authored andcommitted
hw/misc/aspeed_scu: Correct minimum access size for AST2500 / AST2600
Guest code was performing a byte load to the SCU MMIO region, leading to the guest code crashing (it should be using proper accessors, but that is not Qemu's bug). Hardware and the documentation[1] both agree that byte loads are okay, so change all of the aspeed SCU devices to accept a minimum access size of 1. [1] See the 'ARM Address Space Mapping' table in the ASPEED docs. This is section 6.1 in the ast2400 and ast2700, and 7.1 in the ast2500 and ast2600 datasheets. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2636 Signed-off-by: Joel Stanley <[email protected]> Reviewed-by: Troy Lee <[email protected]> Message-ID: <[email protected]> [PMD: Rebased, only including SCU changes] Signed-off-by: Philippe Mathieu-Daudé <[email protected]> Reviewed-by: Andrew Jeffery <[email protected]> Link: https://lore.kernel.org/qemu-devel/[email protected] Signed-off-by: Cédric Le Goater <[email protected]>
1 parent f0095c8 commit 20ab88a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hw/misc/aspeed_scu.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ static const MemoryRegionOps aspeed_ast2500_scu_ops = {
443443
.endianness = DEVICE_LITTLE_ENDIAN,
444444
.impl.min_access_size = 4,
445445
.impl.max_access_size = 4,
446-
.valid.min_access_size = 4,
446+
.valid.min_access_size = 1,
447447
.valid.max_access_size = 4,
448448
.valid.unaligned = false,
449449
};
@@ -787,7 +787,7 @@ static const MemoryRegionOps aspeed_ast2600_scu_ops = {
787787
.endianness = DEVICE_LITTLE_ENDIAN,
788788
.impl.min_access_size = 4,
789789
.impl.max_access_size = 4,
790-
.valid.min_access_size = 4,
790+
.valid.min_access_size = 1,
791791
.valid.max_access_size = 4,
792792
.valid.unaligned = false,
793793
};

0 commit comments

Comments
 (0)