From: Philippe Schenker <dev@pschenker.ch>
To: u-boot@lists.denx.de
Cc: stefan@embear.ch,
Philippe Schenker <philippe.schenker@impulsing.ch>,
Andrew Davis <afd@ti.com>,
Andrew Goodbody <andrew.goodbody@linaro.org>,
Beleswar Padhi <b-padhi@ti.com>, Hari Nagalla <hnagalla@ti.com>,
Judith Mendez <jm@ti.com>, Peng Fan <peng.fan@nxp.com>,
Tom Rini <trini@konsulko.com>
Subject: [PATCH v2 5/6] remoteproc: k3-r5: Use verified image address
Date: Fri, 7 Nov 2025 14:01:04 +0100 [thread overview]
Message-ID: <20251107130216.3084134-6-dev@pschenker.ch> (raw)
In-Reply-To: <20251107130216.3084134-1-dev@pschenker.ch>
From: Philippe Schenker <philippe.schenker@impulsing.ch>
After ti_secure_image_post_process() authenticates the image, it may
relocate it to a different memory location and update image_addr to
point to the verified image.
However, rproc_elf_load_image() and rproc_elf_get_boot_addr() were
still using the original "addr" parameter, potentially operating on
the unverified or stale image location instead of the authenticated
image.
Use image_addr (cast to ulong to match function signatures) after
authentication to ensure all operations work with the verified image.
Signed-off-by: Philippe Schenker <philippe.schenker@impulsing.ch>
---
(no changes since v1)
drivers/remoteproc/ti_k3_r5f_rproc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/remoteproc/ti_k3_r5f_rproc.c b/drivers/remoteproc/ti_k3_r5f_rproc.c
index e7bd97a9088b..36ea449f5121 100644
--- a/drivers/remoteproc/ti_k3_r5f_rproc.c
+++ b/drivers/remoteproc/ti_k3_r5f_rproc.c
@@ -343,13 +343,13 @@ static int k3_r5f_load(struct udevice *dev, ulong addr, ulong size)
ti_secure_image_post_process(&image_addr, (size_t *)&size);
- ret = rproc_elf_load_image(dev, addr, size);
+ ret = rproc_elf_load_image(dev, (ulong)image_addr, size);
if (ret < 0) {
dev_err(dev, "Loading elf failedi %d\n", ret);
goto proc_release;
}
- boot_vector = rproc_elf_get_boot_addr(dev, addr);
+ boot_vector = rproc_elf_get_boot_addr(dev, (ulong)image_addr);
dev_dbg(dev, "%s: Boot vector = 0x%llx\n", __func__, boot_vector);
--
2.51.2
next prev parent reply other threads:[~2025-11-07 13:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-07 13:00 [PATCH v2 0/6] remoteproc: k3-r5: Build fixes and security improvements Philippe Schenker
2025-11-07 13:01 ` [PATCH v2 1/6] arm: dts: k3-am642-evm: Remove duplicate node Philippe Schenker
2025-11-10 9:21 ` Anshul Dalal
2025-11-07 13:01 ` [PATCH v2 2/6] remoteproc: k3-r5: cast size to size_t Philippe Schenker
2025-11-07 15:24 ` Andrew Davis
2025-11-07 16:00 ` Philippe Schenker
2025-11-07 16:24 ` Andrew Davis
2025-11-07 13:01 ` [PATCH v2 3/6] soc: ti: pruss: Fix size ptr type in probe Philippe Schenker
2025-11-07 13:01 ` [PATCH v2 4/6] mach-k3: security: Propagate verified image addr Philippe Schenker
2025-11-07 13:01 ` Philippe Schenker [this message]
2025-11-07 13:01 ` [PATCH v2 6/6] remoteproc: k3-r5: Implement is_running operation Philippe Schenker
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=20251107130216.3084134-6-dev@pschenker.ch \
--to=dev@pschenker.ch \
--cc=afd@ti.com \
--cc=andrew.goodbody@linaro.org \
--cc=b-padhi@ti.com \
--cc=hnagalla@ti.com \
--cc=jm@ti.com \
--cc=peng.fan@nxp.com \
--cc=philippe.schenker@impulsing.ch \
--cc=stefan@embear.ch \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.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.