mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* short entropy delay causes RNG hardware error
@ 2024-08-05 16:01 Stefano Manni
  2024-08-05 16:56 ` Ahmad Fatoum
  0 siblings, 1 reply; 4+ messages in thread
From: Stefano Manni @ 2024-08-05 16:01 UTC (permalink / raw)
  To: barebox

Hello,

on a custom board based on imx6ul once linux starts I see lot of errors
like this:

  caam_jr 2141000.jr: 2000005b: CCB: desc idx 0: RNG: Hardware error

approximately every 10 seconds. And if I try to read from device the
same error occurs:

  ~# dd if=/dev/hwrng of=/dev/null bs=1 count=1
  caam_jr 2141000.jr: 2000005b: CCB: desc idx 0: RNG: Hardware error
  dd: /dev/hwrng: Invalid argument

No errors are fired in barebox where the RNG self-test is run
succesfully:

  rng_self_test: RNG software self-test passed
  caam 2140000.crypto@2140000.of: Instantiated RNG4 SH0
  caam 2140000.crypto@2140000.of: Instantiated RNG4 SH1
  caam 2140000.crypto@2140000.of: registering rng-caam

Here [1] I found that enlarging the entroy delay may help so I tried to
do the same in barebox by changing RTSDCTL_ENT_DLY_MIN from 3200 to
4800 and it succeded, I no longer see those errors in linux and trying
to read from the device works perfectly.

The strange thing is that on another board based on imx6sx I never see
those errors.

Is it something new to you? 
May we change the delay? On linux-imx 6.6.3 3200 is still used.

Best,
Stefano

[1] 
https://lore.kernel.org/all/CAOMZO5D0m1xCfgFifKz1H+oYQSfxsfuZp4U39rPMACmzv1fvjQ@mail.gmail.com/#t





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

end of thread, other threads:[~2024-08-06 17:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-05 16:01 short entropy delay causes RNG hardware error Stefano Manni
2024-08-05 16:56 ` Ahmad Fatoum
2024-08-06  8:33   ` Stefano Manni
2024-08-06 17:00     ` Ahmad Fatoum

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