mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* HAB warning on imx6sx
@ 2024-07-23 12:09 Stefano Manni
  2024-07-23 12:24 ` Rouven Czerwinski
  0 siblings, 1 reply; 5+ messages in thread
From: Stefano Manni @ 2024-07-23 12:09 UTC (permalink / raw)
  To: barebox

Hello,

on a board based on imx6sx I'm facing the following warning when HABv4
is enabled on barebox 2024.02:

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)

Have you ever experienced something like this? On another board based
on on imx6ul I've never seen it.

Should I ignore it? Maybe it disappears when I secure the device?

Best,
Stefano



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

* Re: HAB warning on imx6sx
  2024-07-23 12:09 HAB warning on imx6sx Stefano Manni
@ 2024-07-23 12:24 ` Rouven Czerwinski
  2024-07-23 12:44   ` Stefano Manni
  0 siblings, 1 reply; 5+ messages in thread
From: Rouven Czerwinski @ 2024-07-23 12:24 UTC (permalink / raw)
  To: Stefano Manni, barebox

Hi,

On Tue, 2024-07-23 at 14:09 +0200, Stefano Manni wrote:
> Hello,
> 
> on a board based on imx6sx I'm facing the following warning when
> HABv4
> is enabled on barebox 2024.02:
> 
> 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)
> 
> Have you ever experienced something like this? On another board based
> on on imx6ul I've never seen it.
> 
> Should I ignore it? Maybe it disappears when I secure the device?

This is a common warning on some i.MX6 devices which indicates a CAAM
RNG self-test failure, see the description in
drivers/crypto/caam/rng_self_test.c which should be run by the
bootloader to ensure that the RNG part of the CAAM is not faulty.
This requires the CAAM driver within barebox to be enabled.

Best regards,
Rouven Czerwinski



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

* Re: HAB warning on imx6sx
  2024-07-23 12:24 ` Rouven Czerwinski
@ 2024-07-23 12:44   ` Stefano Manni
  2024-07-23 13:18     ` Rouven Czerwinski
  0 siblings, 1 reply; 5+ messages in thread
From: Stefano Manni @ 2024-07-23 12:44 UTC (permalink / raw)
  To: Rouven Czerwinski, barebox

Hi,

On Tue, 2024-07-23 at 14:24 +0200, Rouven Czerwinski wrote:
> 
> This is a common warning on some i.MX6 devices which indicates a CAAM
> RNG self-test failure, see the description in
> drivers/crypto/caam/rng_self_test.c which should be run by the
> bootloader to ensure that the RNG part of the CAAM is not faulty.
> This requires the CAAM driver within barebox to be enabled.
> 

after enabling CAAM I see:

  rng_self_test: RNG software self-test passed
  caam 2100000.crypto@2100000.of: Instantiated RNG4 SH1

but the HAB warning is still there.

I read from drivers/crypto/caam/rng_self_test.c that the warning is
a false positive due to an incorrect implementation of the RNG
self-test procedure in the boot ROM.
So running the RNG selftest in the bootloader shoul help find
real RNG failures that may be obfuscated by this false positive.

Is correct my understanding?

Best,
Stefano




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

* Re: HAB warning on imx6sx
  2024-07-23 12:44   ` Stefano Manni
@ 2024-07-23 13:18     ` Rouven Czerwinski
  2024-07-23 14:54       ` Stefano Manni
  0 siblings, 1 reply; 5+ messages in thread
From: Rouven Czerwinski @ 2024-07-23 13:18 UTC (permalink / raw)
  To: Stefano Manni, barebox

On Tue, 2024-07-23 at 14:44 +0200, Stefano Manni wrote:
> Hi,
> 
> On Tue, 2024-07-23 at 14:24 +0200, Rouven Czerwinski wrote:
> > 
> > This is a common warning on some i.MX6 devices which indicates a
> > CAAM
> > RNG self-test failure, see the description in
> > drivers/crypto/caam/rng_self_test.c which should be run by the
> > bootloader to ensure that the RNG part of the CAAM is not faulty.
> > This requires the CAAM driver within barebox to be enabled.
> > 
> 
> after enabling CAAM I see:
> 
>   rng_self_test: RNG software self-test passed
>   caam 2100000.crypto@2100000.of: Instantiated RNG4 SH1
> 
> but the HAB warning is still there.
> 
> I read from drivers/crypto/caam/rng_self_test.c that the warning is
> a false positive due to an incorrect implementation of the RNG
> self-test procedure in the boot ROM.
> So running the RNG selftest in the bootloader shoul help find
> real RNG failures that may be obfuscated by this false positive.
> 
> Is correct my understanding?

Yes, this is correct. You'll probably want to send a patch to modify
the habv4_known_rng_fail_events[] array in drivers/hab/habv4.c, this
should prevent it from being displayed as an error. 

Best regards,
Rouven Czerwinski



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

* Re: HAB warning on imx6sx
  2024-07-23 13:18     ` Rouven Czerwinski
@ 2024-07-23 14:54       ` Stefano Manni
  0 siblings, 0 replies; 5+ messages in thread
From: Stefano Manni @ 2024-07-23 14:54 UTC (permalink / raw)
  To: Rouven Czerwinski, barebox

On Tue, 2024-07-23 at 15:18 +0200, Rouven Czerwinski wrote:
> 
> Yes, this is correct. You'll probably want to send a patch to modify
> the habv4_known_rng_fail_events[] array in drivers/hab/habv4.c, this
> should prevent it from being displayed as an error. 
> 

Thank you Rouven, patch is coming.

Best,
Stefano




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

end of thread, other threads:[~2024-07-23 14:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-23 12:09 HAB warning on imx6sx Stefano Manni
2024-07-23 12:24 ` Rouven Czerwinski
2024-07-23 12:44   ` Stefano Manni
2024-07-23 13:18     ` Rouven Czerwinski
2024-07-23 14:54       ` Stefano Manni

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