]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
config: arch: k3: enable DMA_ADDR_T_64BIT
authorAnshul Dalal <anshuld@ti.com>
Wed, 3 Sep 2025 11:52:06 +0000 (17:22 +0530)
committerTom Rini <trini@konsulko.com>
Thu, 11 Sep 2025 16:03:02 +0000 (10:03 -0600)
ARCH_K3 encompasses both 32 and 64-bit cores on the same SoC, though the
DMA addresses are always 64-bit in size.

With the current implementation, the R5 SPL uses a u32 for dma_addr_t
which leads to data overflow when functions such as k3_nav_*_pop_mem try
to write a 64-bit address to dma_addr_t variable.

In certain cases it leads to stack corruption which manifest as boot
failures on certain compilers, such as SPI boot on GCC 14.2 or 13.3.

Therefore this patch selects CONFIG_DMA_ADDR_T_64BIT for all ARCH_K3.

Fixes: ffcc66e8fec5 ("dma: ti: add driver to K3 UDMA")
Signed-off-by: Anshul Dalal <anshuld@ti.com>
Reviewed-by: Prasanth Babu Mantena <p-mantena@ti.com>
arch/arm/Kconfig

index 40368abc297ec4748b3b3731e485dca3b53b8897..16db046f4b8de0183ae11f4da1a7983f3d412138 100644 (file)
@@ -833,6 +833,7 @@ config ARCH_K3
        select FIT
        select REGEX
        select FIT_SIGNATURE if ARM64
+       select DMA_ADDR_T_64BIT
        select LTO
        imply TI_SECURE_DEVICE
        imply DM_RNG if ARM64