U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/4] Add support for dynamic MMU configuration
@ 2025-07-03 13:35 Anshul Dalal
  2025-07-03 13:35 ` [PATCH v5 1/4] mach-k3: use minimal MMU table for all k3 Anshul Dalal
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Anshul Dalal @ 2025-07-03 13:35 UTC (permalink / raw)
  To: u-boot
  Cc: Anshul Dalal, vigneshr, trini, nm, robertcnelson, w.egorov,
	francesco.dolcini, ggiordano, m-chawdhry, a-nandan, afd, bb,
	u-kumar1, devarsht

Hi all,

In u-boot we only provide a single MMU table for all k3 platforms, this   does
not scale for devices where atf and optee lie outside the range   0x80000000 -
0x80080000 and 0x9e780000 - 0xa0000000 respectively.

There are also issues for devices with < 2GiB of memory (eg am62SiP with 512MiB
of RAM) as the maximum size is hardcoded to 2GiB. Furthermore higher DDR banks
are mapped even for devices with NR_DRAM_BANKS < 2.

Therefore this patch set adds the required functionality to create the MMU table
at runtime with proper configuration for the spl stage as well an added entry
for the framebuffer for supported platforms.

The patch set has been build tested on all effected platforms but boot-tested
only on TI's K3 EVMs and the beagleplay.

The following effected boards have not been boot tested:
 - phycore-am62a
 - phycore-am62x
 - phycore-am64x
 - verdin-am62
 - iot2050

Best Wishes,
Anshul
---
Changes in v5:
 - Don't create carveouts for every reserved-memory node
 - Only create carveouts for ATF/OP-TEE
 - Expand the call to k3_mem_map_init to vendor boards as well
 - Map area for framebuffer for CONFIG_VIDEO=y platforms
v4: https://lore.kernel.org/u-boot/20250618124210.1936140-1-anshuld@ti.com/

Changes for v4:
 - Add call to k3_mem_map_init for beagleplay
 - Mark reserved regions as non-cacheable
 - More debug logs
v3: https://lore.kernel.org/u-boot/20250617135844.2873701-1-anshuld@ti.com/

Changes for v3:
 - Remove unused memory regions in SPL's map
 - Add runtime addition of MMU entry for the framebuffer in SPL
 - Refactor k3_mem_map_init to use standard u-boot APIs
 - Unmap reserved-memory regions instead of keeping them uncached
v2: https://lore.kernel.org/u-boot/20250610160833.1705534-1-anshuld@ti.com/

Changes in v2:
- Removed dependency to:
  https://lore.kernel.org/u-boot/20250522150941.563959-1-anshuld@ti.com/
v1: https://lore.kernel.org/u-boot/20250602120054.1466951-1-anshuld@ti.com/
---
Anshul Dalal (4):
  mach-k3: use minimal MMU table for all k3
  mach-k3: add runtime configuration of MMU table
  mach-k3: add dynamic mmu fixups for SPL stage
  board: add call to k3_mem_map_init for all k3 boards

 arch/arm/mach-k3/arm64/arm64-mmu.c           | 182 ++++++++++++++++---
 arch/arm/mach-k3/common.c                    |  17 +-
 arch/arm/mach-k3/include/mach/k3-ddr.h       |   1 +
 arch/arm/mach-k3/r5/common.c                 |   5 +
 board/beagle/beagleplay/beagleplay.c         |   9 +-
 board/phytec/phycore_am62ax/phycore-am62ax.c |   9 +-
 board/phytec/phycore_am62x/phycore-am62x.c   |   3 +-
 board/phytec/phycore_am64x/phycore-am64x.c   |   3 +-
 board/siemens/iot2050/board.c                |   3 +-
 board/ti/common/k3-ddr.c                     |   9 +-
 board/toradex/verdin-am62/verdin-am62.c      |   3 +-
 11 files changed, 211 insertions(+), 33 deletions(-)

-- 
2.49.0


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-08-21  6:21 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-03 13:35 [PATCH v5 0/4] Add support for dynamic MMU configuration Anshul Dalal
2025-07-03 13:35 ` [PATCH v5 1/4] mach-k3: use minimal MMU table for all k3 Anshul Dalal
2025-07-03 13:35 ` [PATCH v5 2/4] mach-k3: add runtime configuration of MMU table Anshul Dalal
2025-07-07 20:15   ` Ilias Apalodimas
2025-08-14 14:11     ` Anshul Dalal
2025-08-21  6:20       ` Ilias Apalodimas
2025-07-03 13:35 ` [PATCH v5 3/4] mach-k3: add dynamic mmu fixups for SPL stage Anshul Dalal
2025-07-07 20:09   ` Ilias Apalodimas
2025-08-14 14:51     ` Anshul Dalal
2025-08-21  6:17       ` Ilias Apalodimas
2025-07-03 13:35 ` [PATCH v5 4/4] board: add call to k3_mem_map_init for all k3 boards Anshul Dalal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox