Age | Commit message (Collapse) | Author |
|
Add support for suspend and resume operation for PM in CAAM driver.
When the CAAM goes in suspend, the hardware is considered to do nothing.
On some platforms, the power of the CAAM is not turned off so it keeps
its configuration.
On other platforms, it doesn't so it is necessary to save the state of
the CAAM:
- JRs MID
- Address of input and output rings
Limitation:
When the CAAM is powered OFF, it is resetted so the JDKEK and TDKEK
changes. This impacts crypto transforms using MDHA split-keys
which are kept over suspend as they are encrypted with the JDKEK:
- hmac(*) from caamhash.c
- authenc(hmac(*),*) from caamalg.c
- echainiv(authenc(hmac(*),*)) from caamalg.c
The issue was already present in current code so this patch does not
add a regression in this regard.
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>
|
|
The TRNG as used in RNG4, used in CAAM has a documentation issue. The
effect is that it is possible that the entropy used to instantiate the
DRBG may be old entropy, rather than newly generated entropy. There is
proper programming guidance, but it is not in the documentation.
Signed-off-by: Aymen Sghaier <aymen.sghaier@nxp.com>
|
|
On i.MX8 platforms with SECO/SCU the RNG is not anymore instantiated
by the Kernel driver but by SECO. This is true for B0 revision and
later. A0 revision is not supported.
Signed-off-by: Aymen Sghaier <aymen.sghaier@nxp.com>
|
|
Move to debug level rather than error level the RNG init traces while
increasing entropy delays.
Signed-off-by: Aymen Sghaier <aymen.sghaier@nxp.com>
|
|
- For i.MX 6 and 7 check if the Secure Firmware (OPTEE) is present.
If present don't do the RNG instantation in the CAAM driver
Reviewed-by: Silvano Di Ninno <silvano.dininno@nxp.com>
Signed-off-by: Cedric Neveux <cedric.neveux@nxp.com>
|
|
Seen on i.MX8MQ EVK board revision B0 that the RNG instantiation
fail with default entropy delay. Retry process is fixed here to
be able to instantiate RNG successfully.
Reviewed-by: Silvano Di Ninno <silvano.dininno@nxp.com>
Signed-off-by: Aymen Sghaier <aymen.sghaier@nxp.com>
|
|
Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>
|
|
Move the code related to RNG instanciation to another file
to ease comprehension.
Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>
|