[PATCH] habv4: ignore engine failure due to RNG self-test in boot ROM
Stefano Manni
stefano.manni at gmail.com
Tue Jul 23 08:31:51 PDT 2024
From: Stefano Manni <stefano.manni at 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 at pengutronix.de>
Signed-off-by: Stefano Manni <stefano.manni at 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
More information about the barebox
mailing list