mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Fabian Pfitzner <f.pfitzner@pengutronix.de>
To: Sascha Hauer <s.hauer@pengutronix.de>,
	 BAREBOX <barebox@lists.infradead.org>
Cc: Fabian Pfitzner <f.pfitzner@pengutronix.de>
Subject: [PATCH] ARM: i.MX: fix fast auth wrong CSF file
Date: Fri, 10 Jul 2026 16:15:57 +0200	[thread overview]
Message-ID: <20260710-fpf-fast-auth-v1-1-5a2709d29ea4@pengutronix.de> (raw)

The commit [1], which integrates fast authentication support on
i.MX8 SoCs does not work as expected. The resulting CSF cannot be
verified correctly by the boot rom, leading to an invalid signature.

The CST user guide documentation states in `Table 10. Authenticate Data arguments`,
that the `Verification Index` must also be set to 0 when we use fast
auth. This commit fixes that.

With this change, the bootrom seems to validate the signature properly
now.

[1] 086d01264d ("ARM: i.MX: add support for fast authentication")

---
Signed-off-by: Fabian Pfitzner <f.pfitzner@pengutronix.de>
---
 include/mach/imx/habv4-imx8-gencsf.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/mach/imx/habv4-imx8-gencsf.h b/include/mach/imx/habv4-imx8-gencsf.h
index 337f2fab40d02703c8a3be7726528f5ac0db956b..897078651861283d2c47828b4079e847dad72946 100644
--- a/include/mach/imx/habv4-imx8-gencsf.h
+++ b/include/mach/imx/habv4-imx8-gencsf.h
@@ -66,7 +66,11 @@ hab File = CONFIG_HABV4_IMG_CRT_PEM
 
 hab [Authenticate Data]
 /* verification key index in key store (2...4) */
+#if defined(CONFIG_HABV4_FAST_AUTH)
+hab Verification index = 0
+#else
 hab Verification index = 2
+#endif
 
 hab_blocks
 

---
base-commit: 2c6a6478987a7fba5ce8a04d01213d6ce6f02d76
change-id: 20260710-fpf-fast-auth-01f2957f8584

Best regards,
-- 
Fabian Pfitzner <f.pfitzner@pengutronix.de>




             reply	other threads:[~2026-07-10 14:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-10 14:15 Fabian Pfitzner [this message]
2026-07-10 15:23 ` Marco Felsch
2026-07-10 21:36 ` Sascha Hauer

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=20260710-fpf-fast-auth-v1-1-5a2709d29ea4@pengutronix.de \
    --to=f.pfitzner@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.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