]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
lmb: Add the Rockchip architecture as requiring DMA below 4G
authorHeiko Stuebner <heiko@sntech.de>
Sat, 13 Jun 2026 17:24:44 +0000 (19:24 +0200)
committerTom Rini <trini@konsulko.com>
Mon, 15 Jun 2026 19:32:29 +0000 (13:32 -0600)
Loading EFI parts like a Debian-Installer on Rockchip SoCs creates
interesting results, in that on some boards the Grub bootloader can't
find any partitions on a USB-Stick, or loading a kernel from Grub spews
    EHCI fail timeout STS_IAA set
messages before failing and on others the loading something like efivars
from an eMMC creates read errors and making the MMC vanish from U-Boot.

This only affected boards with at least 4GB of RAM.

These boards have at least 256MB of memory placed above the actual 4GB
address space (due to the iomem being in between) and while kernel,
initramfs, dt are generally loaded to predefined addresses, additional
EFI parts (efivars, etc) are likely just loaded "somewhere" and it seems
this always landed in that higher up memory part.

Also in the Linux-kernel peripherals like EMMC, USB, etc already run
with a 32bit dma-mask set.

So far, I've seen this on RK3568 and RK3588, but as the same peripherals
are used on most Rockchip SoCs, it makes sense to limit this on all.

So add ARCH_ROCKCHIP to the default-y list of LMB_LIMIT_DMA_BELOW_RAM_TOP.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
lib/Kconfig

index cf13ac1bdaddc4194e59f425ebaf93634e914179..9e0f0ad7d068c36b57afa6b8cc3694be73d21d21 100644 (file)
@@ -1298,7 +1298,7 @@ config SPL_LMB_ARCH_MEM_MAP
 config LMB_LIMIT_DMA_BELOW_RAM_TOP
        bool
        depends on LMB
-       default y if ARCH_BCM283X
+       default y if ARCH_BCM283X || ARCH_ROCKCHIP
        help
          Some architectures can not DMA above ram_top boundary,
          which is after 4 GiB or 32-bit boundary too. Limit the