qemu-cr16/hw
Jamin Lin 80a03b51b2 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>
(cherry picked from commit e6941ac106)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2025-05-29 10:31:23 +03:00
..
9pfs 9pfs: fix FD leak and reduce latency of v9fs_reclaim_fd() 2025-05-12 12:27:03 +03:00
acpi hw/i386/fw_cfg: Check ACPI availability with acpi_builtin() 2025-03-11 20:03:26 +01:00
adc include/hw/qdev-properties: Remove DEFINE_PROP_END_OF_LIST 2024-12-19 19:36:37 +01:00
alpha hw/boards: Do not create unusable default if=sd drives 2025-02-16 14:25:08 +01:00
arm hw/arm/aspeed_ast27x0: Fix RAM size detection failure on BE hosts 2025-05-29 10:31:23 +03:00
audio Accel & Exec patch queue 2024-12-21 11:07:00 -05:00
avr hw/boards: Do not create unusable default if=sd drives 2025-02-16 14:25:08 +01:00
block hw/block/m25p80: Categorize and add description 2025-03-31 16:33:23 +02:00
char hw/char/bcm2835_aux: Fix incorrect interrupt ID when RX disabled 2025-03-31 21:32:43 +02:00
core hw/core: Get default_cpu_type calling machine_class_default_cpu_type() 2025-04-29 10:01:21 +03:00
cpu hw/cpu/arm_mpcore: Remove default values for GIC external IRQs 2025-02-20 14:20:29 +00:00
cxl mem/cxl_type3: support 3, 6, 12 and 16 interleave ways 2025-02-21 07:18:42 -05:00
display hw/display/dm163: Add description 2025-03-31 16:33:53 +02:00
dma hw/dma/i82374: Categorize and add description 2025-03-31 16:34:01 +02:00
fsi hw: Use device_class_set_legacy_reset() instead of opencoding 2024-09-13 15:31:44 +01:00
gpio hw/gpio/imx_gpio: Fix interpretation of GDIR polarity 2025-05-08 12:18:57 +03:00
hppa hw/boards: Do not create unusable default if=sd drives 2025-02-16 14:25:08 +01:00
hyperv qapi: Move include/qapi/qmp/ to include/qobject/ 2025-02-10 15:33:16 +01:00
i2c hw/i2c/imx: Always set interrupt status bit if interrupt condition occurs 2025-05-11 09:16:33 +03:00
i386 hw/i386/amd_iommu: Assign pci-id 0x1419 for the AMD IOMMU device 2025-04-02 12:44:47 -04:00
ide dma: use current AioContext for dma_blk_io() 2025-03-13 17:57:23 +01:00
input Accel & Exec patch queue 2024-12-21 11:07:00 -05:00
intc aspeed queue: 2025-03-24 13:26:23 -04:00
ipack hw/ipack: Remove legacy qemu_allocate_irqs() use 2025-01-31 19:36:44 +01:00
ipmi Accel & Exec patch queue 2024-12-21 11:07:00 -05:00
isa hw: Declare various const data as 'const' 2025-02-16 14:26:07 +01:00
loongarch hw/loongarch/virt: Replace destination error with error_abort 2025-04-08 14:44:53 +08:00
m68k hw/boards: Do not create unusable default if=sd drives 2025-02-16 14:25:08 +01:00
mem mem/cxl_type3: support 3, 6, 12 and 16 interleave ways 2025-02-21 07:18:42 -05:00
microblaze hw/ssi/xilinx_spi: Make device endianness configurable 2025-02-16 14:34:57 +01:00
mips target/mips: Revert TARGET_PAGE_BITS_VARY 2025-03-31 21:32:43 +02:00
misc hw/misc/aspeed_hace: Ensure HASH_IRQ is always set to prevent firmware hang 2025-05-29 10:27:30 +03:00
net Revert "virtio-net: Copy received header to buffer" 2025-04-15 08:24:48 -04:00
nubus include/hw/qdev-properties: Remove DEFINE_PROP_END_OF_LIST 2024-12-19 19:36:37 +01:00
nvme hw/nvme: fix nvme hotplugging 2025-05-16 01:04:12 +03:00
nvram hw/nvram/xlnx-efuse: Do not expose as user-creatable 2025-03-31 21:32:43 +02:00
openrisc target/openrisc: Call cpu_openrisc_clock_init() in cpu_realize() 2025-03-06 15:46:18 +01:00
pci hw/pci-host: Remove unused pci_host_data_be_ops 2025-05-22 16:09:32 +03:00
pci-bridge pcie, virtio: Remove redundant pm_cap 2025-03-06 06:47:33 +01:00
pci-host hw/pci-host/gt64120: Fix endianness handling 2025-05-22 14:33:00 +03:00
ppc * exec/cpu-all: remove BSWAP_NEEDED 2025-03-23 11:04:40 -04:00
remote Memory pull request for 10.0 2025-02-19 08:36:26 +08:00
riscv hw/riscv: Fix type conflict of GLib function pointers 2025-05-20 09:55:35 +03:00
rtc hw/rtc/goldfish: keep time offset when resetting 2025-03-31 21:32:43 +02:00
rx hw/rx: Allow execution without either bios or kernel 2025-02-16 14:45:38 +01:00
s390x s390x: Fix leak in machine_set_loadparm 2025-05-16 00:54:49 +03:00
scsi scsi-disk: Apply error policy for host_status errors again 2025-04-08 14:59:19 +02:00
sd hw/sd/sdhci: free irq on exit 2025-03-31 21:32:43 +02:00
sensor hw: Make class data 'const' 2025-02-16 14:26:07 +01:00
sh4 exec: Declare tlb_flush*() in 'exec/cputlb.h' 2025-03-08 07:56:14 -08:00
smbios smbios: Fix buffer overrun when using path= option 2025-04-08 20:45:13 +02:00
sparc load_aout: replace bswap_needed with big_endian 2025-03-21 12:51:16 +01:00
sparc64 load_aout: replace bswap_needed with big_endian 2025-03-21 12:51:16 +01:00
ssi hw/ssi/pnv_spi: Put a limit to RDR match failures 2025-03-11 22:43:31 +10:00
timer rust: Kconfig: Factor out whether HPET is Rust or C 2025-03-20 09:23:24 +01:00
tpm hw/tpm: Have TPM TIS sysbus device inherit from DYNAMIC_SYS_BUS_DEVICE 2025-02-16 14:25:07 +01:00
tricore hw/boards: Do not create unusable default if=sd drives 2025-02-16 14:25:08 +01:00
uefi hw/uefi-vars-sysbus: allow for loongarch virt 2025-03-21 12:01:12 +01:00
ufs hw/ufs: Fix incorrect comment for segment_size and allocation_unit_size 2025-04-08 20:46:10 +02:00
usb hw/usb/hcd-xhci-pci: Adds property for disabling mapping in IRQ mode 2025-03-04 14:45:34 +01:00
vfio vfio/pci: Drop debug commentary from x-device-dirty-page-tracking 2025-03-11 19:04:58 +01:00
virtio virtio: Call set_features during reset 2025-05-16 01:00:59 +03:00
vmapple hw/vmapple/vmapple: Add vmapple machine type 2025-03-04 14:45:34 +01:00
watchdog hw/arm: Mark Allwinner Technology devices as little-endian 2025-02-16 14:41:46 +01:00
xen xen: mapcache: Split mapcache_grants by ro and rw 2025-05-11 09:15:20 +03:00
xenpv hw/boards: Do not create unusable default if=sd drives 2025-02-16 14:25:08 +01:00
xtensa hw/boards: Do not create unusable default if=sd drives 2025-02-16 14:25:08 +01:00
Kconfig Misc HW patches 2025-03-05 21:54:58 +08:00
meson.build Misc HW patches 2025-03-05 21:54:58 +08:00