From: Anshul Dalal <anshuld@ti.com>
To: Anshul Dalal <anshuld@ti.com>, <u-boot@lists.denx.de>
Cc: Tom Rini <trini@konsulko.com>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
Dhruva Gole <d-gole@ti.com>, Mark Kettenis <kettenis@openbsd.org>,
Patrice Chotard <patrice.chotard@foss.st.com>,
"Moteen Shah" <m-shah@ti.com>, Beleswar Padhi <b-padhi@ti.com>,
Wadim Egorov <w.egorov@phytec.de>,
Chintan Vankar <c-vankar@ti.com>, Suhaas Joshi <s-joshi@ti.com>
Subject: Re: [PATCH master] mach-k3: enable mmu after reserved memory is unmapped
Date: Wed, 13 May 2026 10:21:39 +0530 [thread overview]
Message-ID: <DIHA24WPD5RR.375NLCSWPLE4E@ti.com> (raw)
In-Reply-To: <20260512-am62_firewall_exception_fix-v1-1-4b274718bdac@ti.com>
On Tue May 12, 2026 at 4:33 PM IST, Anshul Dalal wrote:
> Currently the sequence to enable caches for the A53/A72 core on K3
> devices looks as follows:
>
> 1. Map entire DDR banks
> 2. Setup page tables and enable MMU (done by mmu_setup)
> 3. Unmap reserved-memory regions
> 4. Enable caches
>
> However there is a brief period of execution between #2 and #3 where the
> core can issue speculative accesses to the entire DDR space (including
> the reserved-memory regions) despite the caches being disabled.
>
> A firewall exception is triggered whenever such speculative access is
> made to secure DDR region of TFA or OP-TEE. This patch fixes the issue
> by re-ordering the sequence as follows:
>
> 1. Map entire DDR banks
> 2. Setup page tables
> 3. Unmap reserved-memory regions
> 4. Enable MMU
> 5. Enable caches
>
> Fixes: f1c694b8fdde ("mach-k3: map all banks using mem_map_from_dram_banks")
> Signed-off-by: Anshul Dalal <anshuld@ti.com>
Forgot to add:
Reported-by: Suhaas Joshi <s-joshi@ti.com>
--
Anshul Dalal <anshuld@ti.com>
next prev parent reply other threads:[~2026-05-13 4:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-12 11:03 [PATCH master] mach-k3: enable mmu after reserved memory is unmapped Anshul Dalal
2026-05-13 4:51 ` Anshul Dalal [this message]
2026-05-18 8:04 ` Ilias Apalodimas
2026-05-18 9:12 ` Anshul Dalal
2026-05-18 9:48 ` Ilias Apalodimas
2026-05-18 10:08 ` 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=DIHA24WPD5RR.375NLCSWPLE4E@ti.com \
--to=anshuld@ti.com \
--cc=b-padhi@ti.com \
--cc=c-vankar@ti.com \
--cc=d-gole@ti.com \
--cc=ilias.apalodimas@linaro.org \
--cc=kettenis@openbsd.org \
--cc=m-shah@ti.com \
--cc=patrice.chotard@foss.st.com \
--cc=s-joshi@ti.com \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.