diff options
author | Jamin Lin <jamin_lin@aspeedtech.com> | 2025-05-22 10:33:04 +0800 |
---|---|---|
committer | Cédric Le Goater <clg@redhat.com> | 2025-05-25 23:39:11 +0200 |
commit | e6941ac106190490d8b455eedc5b368e6d94d4cc (patch) | |
tree | 5070e9d0d3de5dae55bc91ec93106e0e126e37ae /python/scripts | |
parent | 567accba673326a37b7c9210f613c86afe2965ff (diff) | |
download | qemu-e6941ac106190490d8b455eedc5b368e6d94d4cc.zip qemu-e6941ac106190490d8b455eedc5b368e6d94d4cc.tar.gz qemu-e6941ac106190490d8b455eedc5b368e6d94d4cc.tar.bz2 |
hw/arm/aspeed_ast27x0: Fix RAM size detection failure on BE hosts
On big-endian hosts, the aspeed_ram_capacity_write() function previously passed
the address of a 64-bit "data" variable directly to address_space_write(),
assuming host and guest endianness matched.
However, the data is expected to be written in little-endian format to DRAM.
On big-endian hosts, this led to incorrect data being written into DRAM,
which caused the guest firmware to misdetect the DRAM size.
As a result, U-Boot fails to boot and hangs.
- Replaces the "address_space_write()" call with "address_space_stl_le()",
which performs an explicit 32-bit little-endian write.
- Updating the MemoryRegionOps to restrict access to exactly 4 bytes
using .valid.{min,max}_access_size = 4 and .impl.min_access_size = 4.
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Fixes: 7436db1 ("aspeed/soc: fix incorrect dram size for AST2700")
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20250522023305.2486536-4-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'python/scripts')
0 files changed, 0 insertions, 0 deletions