U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Anshul Dalal <anshuld@ti.com>
To: Anshul Dalal <anshuld@ti.com>, <u-boot@lists.denx.de>
Cc: <vigneshr@ti.com>, <trini@konsulko.com>, <afd@ti.com>,
	<m-chawdhry@ti.com>, <n-francis@ti.com>, <b-liu@ti.com>,
	<nm@ti.com>, <bb@ti.com>, <u-kumar1@ti.com>
Subject: Re: [PATCH v3 1/2] mach-k3: add runtime memory carveouts for MMU table
Date: Wed, 18 Jun 2025 18:18:42 +0530	[thread overview]
Message-ID: <DAPO65QJ47IV.1AX9GYAWDCG67@ti.com> (raw)
In-Reply-To: <20250617135844.2873701-1-anshuld@ti.com>

On Tue Jun 17, 2025 at 7:28 PM IST, Anshul Dalal wrote:
> In u-boot we only provide a single MMU table for all k3 platforms,
> this does not scale for devices with reserved memory outside the range
> 0x9e780000 - 0xa0000000 (eg j722s[1]) or for devices with < 2GiB of
> memory (eg am62-SIP with 512MiB of RAM).
>
> To properly configure the MMU on various k3 platforms, the
> reserved-memory regions need to be queried at runtime from the
> device-tree and the MMU table should be updated accordingly.
>
> This patch adds the required fixups to the MMU table (during proper
> U-boot stage) by marking the reserved regions as non cacheable and
> keeping the remaining area as cacheable.
>
> For the A-core SPL, the 128MiB region starting from SPL_TEXT_BASE
> is marked as cacheable i.e 0x80080000 to 0x88080000.
>
> The 128MiB size is chosen to allow for future use cases such as falcon
> boot from the A-Core SPL which would require loading kernel image from
> the SPL stage. This change also ensures the reserved memory regions that
> all exist past 0x88080000 are non cacheable preventing speculative
> accesses to those addresses.
>
> [1]:
> https://git.ti.com/cgit/ti-u-boot/ti-u-boot/tree/arch/arm/mach-k3/arm64/arm64-mmu.c?h=ti-u-boot-2025.01-next#n54
>
> Signed-off-by: Anshul Dalal <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/
> ---

[snip]

Superseded by v4:
https://lore.kernel.org/u-boot/20250618124210.1936140-1-anshuld@ti.com/

      parent reply	other threads:[~2025-06-18 12:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-17 13:58 [PATCH v3 1/2] mach-k3: add runtime memory carveouts for MMU table Anshul Dalal
2025-06-17 13:58 ` [PATCH v3 2/2] mach-k3: add dynamic mmu fixups for SPL stage Anshul Dalal
2025-06-18 10:26 ` [PATCH v3 1/2] mach-k3: add runtime memory carveouts for MMU table Kumar, Udit
2025-06-18 11:52   ` Anshul Dalal
2025-06-18 13:51     ` Kumar, Udit
2025-06-18 12:48 ` Anshul Dalal [this message]

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=DAPO65QJ47IV.1AX9GYAWDCG67@ti.com \
    --to=anshuld@ti.com \
    --cc=afd@ti.com \
    --cc=b-liu@ti.com \
    --cc=bb@ti.com \
    --cc=m-chawdhry@ti.com \
    --cc=n-francis@ti.com \
    --cc=nm@ti.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=u-kumar1@ti.com \
    --cc=vigneshr@ti.com \
    /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