mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] habv4: ignore engine failure due to RNG self-test in boot ROM
@ 2024-07-23 15:31 Stefano Manni
  2024-07-24  8:42 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Stefano Manni @ 2024-07-23 15:31 UTC (permalink / raw)
  To: barebox; +Cc: Rouven Czerwinski

From: Stefano Manni <stefano.manni@gmail.com>
Date: Tue, 23 Jul 2024 15:08:22 +0000
Subject: [PATCH] habv4: ignore engine failure due to RNG self-test in
boot ROM

Few i.MX chips which have HAB 4.2.3 or beyond, have oberserved
following warning message generated by HAB due to incorrect
implementation of RNG self-test in boot ROM:

	HABv4: Status: Operation completed with warning (0x69)
	HABv4: Config: Non-secure IC (0xf0)
	HABv4: State: Non-secure state (0x66)
	ERROR: HABv4: -------- HAB Event 0 --------
	ERROR: HABv4: event data:
	ERROR: HABv4:  db 00 24 42  69 30 e1 1d
	ERROR: HABv4:  00 08 00 02  40 00 36 06
	ERROR: HABv4:  55 55 00 03  00 00 00 00
	ERROR: HABv4:  00 00 00 00  00 00 00 00
	ERROR: HABv4:  00 00 00 01
	ERROR: HABv4: Status: Operation completed with warning (0x69)
	ERROR: HABv4: Reason: Engine failure (0x30)
	ERROR: HABv4: Context: Event logged in hab_rvt.entry() (0xe1)
	ERROR: HABv4: Engine: CAAM (0x1d)

On these chips it is recommended to run the software self-test
in order to discover any other failure in addition to the
false positivie above.

This patch filters out the event and not show it as suggested in [1].

[1] 
https://lore.barebox.org/barebox/ba1febb9b457f5876959f093f866b680e266f987.camel@pengutronix.de/

Suggested-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
Signed-off-by: Stefano Manni <stefano.manni@gmail.com>
---
 drivers/hab/habv4.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/hab/habv4.c b/drivers/hab/habv4.c
index c60a658b89..d3462eaeb7 100644
--- a/drivers/hab/habv4.c
+++ b/drivers/hab/habv4.c
@@ -553,6 +553,11 @@ static uint8_t
habv4_known_rng_fail_events[][RNG_FAIL_EVENT_SIZE] = {
 	  0x55, 0x55, 0x00, 0x03,  0x00, 0x00, 0x00, 0x00,
 	  0x00, 0x00, 0x00, 0x00,  0x00, 0x00, 0x00, 0x00,
 	  0x00, 0x00, 0x00, 0x01 },
+	{ 0xdb, 0x00, 0x24, 0x42,  0x69, 0x30, 0xe1, 0x1d,
+	  0x00, 0x08, 0x00, 0x02,  0x40, 0x00, 0x36, 0x06,
+	  0x55, 0x55, 0x00, 0x03,  0x00, 0x00, 0x00, 0x00,
+	  0x00, 0x00, 0x00, 0x00,  0x00, 0x00, 0x00, 0x00,
+	  0x00, 0x00, 0x00, 0x01 },
 };
 
 static bool is_known_rng_fail_event(const uint8_t *data, size_t len)
-- 
2.25.1





^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] habv4: ignore engine failure due to RNG self-test in boot ROM
  2024-07-23 15:31 [PATCH] habv4: ignore engine failure due to RNG self-test in boot ROM Stefano Manni
@ 2024-07-24  8:42 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2024-07-24  8:42 UTC (permalink / raw)
  To: barebox, Stefano Manni; +Cc: Rouven Czerwinski


On Tue, 23 Jul 2024 17:31:51 +0200, Stefano Manni wrote:
> boot ROM
> 
> Few i.MX chips which have HAB 4.2.3 or beyond, have oberserved
> following warning message generated by HAB due to incorrect
> implementation of RNG self-test in boot ROM:
> 
> 	HABv4: Status: Operation completed with warning (0x69)
> 	HABv4: Config: Non-secure IC (0xf0)
> 	HABv4: State: Non-secure state (0x66)
> 	ERROR: HABv4: -------- HAB Event 0 --------
> 	ERROR: HABv4: event data:
> 	ERROR: HABv4:  db 00 24 42  69 30 e1 1d
> 	ERROR: HABv4:  00 08 00 02  40 00 36 06
> 	ERROR: HABv4:  55 55 00 03  00 00 00 00
> 	ERROR: HABv4:  00 00 00 00  00 00 00 00
> 	ERROR: HABv4:  00 00 00 01
> 	ERROR: HABv4: Status: Operation completed with warning (0x69)
> 	ERROR: HABv4: Reason: Engine failure (0x30)
> 	ERROR: HABv4: Context: Event logged in hab_rvt.entry() (0xe1)
> 	ERROR: HABv4: Engine: CAAM (0x1d)
> 
> [...]

Applied, thanks!

[1/1] habv4: ignore engine failure due to RNG self-test in boot ROM
      https://git.pengutronix.de/cgit/barebox/commit/?id=04656c1bde1e (link may not be stable)

Best regards,
-- 
Sascha Hauer <s.hauer@pengutronix.de>




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-07-24  8:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-23 15:31 [PATCH] habv4: ignore engine failure due to RNG self-test in boot ROM Stefano Manni
2024-07-24  8:42 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox