]> git.ipfire.org Git - thirdparty/u-boot.git/commit
mach-k3: add dynamic mmu fixups for SPL stage
authorAnshul Dalal <anshuld@ti.com>
Wed, 18 Jun 2025 12:42:09 +0000 (18:12 +0530)
committerTom Rini <trini@konsulko.com>
Fri, 27 Jun 2025 16:02:19 +0000 (10:02 -0600)
commitb77066d73261855af406422fbbe28a5d527f4dbf
treeade58874c92c618a27ab9e8ff31ac55a818c4c92
parent4628730ee6c40864dbe475e4ca91e47a92f371fe
mach-k3: add dynamic mmu fixups for SPL stage

On platforms with spl splash support i.e CONFIG_VIDEO=y, the top of DDR
is reserved for the framebuffer.

The size for the framebuffer is computed at runtime by video_reserve.
During the MMU configuration an entry corresponding to the framebuffer
should be dynamically created to properly map the required space for the
framebuffer.

Therefore this patch adds k3_spl_mem_map_init which adds the required
MMU entry by querying the gd after the framebuffer size has been
computed in spl_reserve_video_from_ram_top.

For non VIDEO=y platforms, the added k3_spl_mem_map_init function gets
optimized out of the final binary so overall, the spl size is not
impacted[1].

[1]: Tested on clang 19.1.7 and gcc 15.1.1

Signed-off-by: Anshul Dalal <anshuld@ti.com>
arch/arm/mach-k3/arm64/arm64-mmu.c
arch/arm/mach-k3/common.c
arch/arm/mach-k3/include/mach/k3-ddr.h