From: Anshul Dalal <anshuld@ti.com>
To: <u-boot@lists.denx.de>
Cc: Anshul Dalal <anshuld@ti.com>, <vigneshr@ti.com>,
<trini@konsulko.com>, <nm@ti.com>, <robertcnelson@gmail.com>,
<w.egorov@phytec.de>, <francesco.dolcini@toradex.com>,
<ggiordano@phytec.com>, <m-chawdhry@ti.com>, <a-nandan@ti.com>,
<afd@ti.com>, <bb@ti.com>, <u-kumar1@ti.com>, <devarsht@ti.com>
Subject: [PATCH v5 0/4] Add support for dynamic MMU configuration
Date: Thu, 3 Jul 2025 19:05:25 +0530 [thread overview]
Message-ID: <20250703133533.104758-1-anshuld@ti.com> (raw)
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
next reply other threads:[~2025-07-03 13:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-03 13:35 Anshul Dalal [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250703133533.104758-1-anshuld@ti.com \
--to=anshuld@ti.com \
--cc=a-nandan@ti.com \
--cc=afd@ti.com \
--cc=bb@ti.com \
--cc=devarsht@ti.com \
--cc=francesco.dolcini@toradex.com \
--cc=ggiordano@phytec.com \
--cc=m-chawdhry@ti.com \
--cc=nm@ti.com \
--cc=robertcnelson@gmail.com \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=u-kumar1@ti.com \
--cc=vigneshr@ti.com \
--cc=w.egorov@phytec.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox