[PATCH 1/7] lmb: default LMB_LIMIT_DMA_BELOW_RAM_TOP for 64-bit Mediatek SoCs

Sam Edwards cfsworks at gmail.com
Fri Jun 12 19:52:08 CEST 2026


On Fri, Jun 12, 2026 at 10:32 AM David Lechner <dlechner at baylibre.com> wrote:
>
> Add 64-bit Mediatek ARM SoCs to the default y setting of
> LMB_LIMIT_DMA_BELOW_RAM_TOP. These platforms have a 4GiB DMA limit, e.g.
> for the SD/MMC controller.

Hi David,

Is the 4GiB DMA limit due to the interconnect itself or are there
merely a few blocks that can't speak 64-bit? If the latter, I think
it'd be clearer to associate the setting with the culprit driver(s)
rather than the whole platform, so that it can be removed if/when
those drivers begin to use bounce buffers.

Marek: I fear that a lot of things are going to depend on this config
option being 'true' in the very near future, and with a lot of
still-unidentified drivers with bugs unveiled by this LMB change (e.g.
I spent much of last weekend chasing down a failure on RK3588 because
U-Boot's SDHCI-SDMA impl. assumes 32-bit addresses) would it be better
to make this setting default true for 2026.07 to buy us more time to
find those cases? I'm not very familiar with the rationale behind the
original change ("lmb: Reinstate access to memory above ram_top") but
it sounds like only some users need that access currently?

Best,
Sam

>
> Signed-off-by: David Lechner <dlechner at baylibre.com>
> ---
>  lib/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/Kconfig b/lib/Kconfig
> index cf13ac1bdad..27ad43125e4 100644
> --- a/lib/Kconfig
> +++ b/lib/Kconfig
> @@ -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_MEDIATEK && ARM64)
>         help
>           Some architectures can not DMA above ram_top boundary,
>           which is after 4 GiB or 32-bit boundary too. Limit the
>
> --
> 2.43.0
>
>


More information about the U-Boot mailing list