diff options
author | Michael Walle <michael@walle.cc> | 2020-06-27 23:58:52 +0300 |
---|---|---|
committer | Priyanka Jain <priyanka.jain@nxp.com> | 2020-07-27 11:46:29 +0300 |
commit | b980f9e2597b52ce71247e79d534349f7d174b38 (patch) | |
tree | 87db229d42e28fd2e81472fd05212f5760bfa39f /include | |
parent | c269a970f23fabbb0d35708ff021bf2962780f9f (diff) | |
download | u-boot-b980f9e2597b52ce71247e79d534349f7d174b38.tar.xz |
crypto/fsl: instantiate the RNG with prediciton resistance
If it is already instantiated tear it down first and then reinstanciate
it again with prediction resistance.
Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/fsl_sec.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/include/fsl_sec.h b/include/fsl_sec.h index 64b8751f2d..1c6f1eb23e 100644 --- a/include/fsl_sec.h +++ b/include/fsl_sec.h @@ -65,10 +65,9 @@ struct rng4tst { u32 rtfreqcnt; /* PRGM=0: freq. count register */ }; u32 rsvd1[40]; -#define RNG_STATE0_HANDLE_INSTANTIATED 0x00000001 -#define RNG_STATE1_HANDLE_INSTANTIATED 0x00000002 -#define RNG_STATE_HANDLE_MASK \ - (RNG_STATE0_HANDLE_INSTANTIATED | RNG_STATE1_HANDLE_INSTANTIATED) +#define RDSTA_IF(idx) (0x00000001 << (idx)) +#define RDSTA_PR(idx) (0x00000010 << (idx)) +#define RDSTA_MASK (RDSTA_PR(1) | RDSTA_PR(0) | RDSTA_IF(1) | RDSTA_IF(0)) #define RDSTA_SKVN 0x40000000 u32 rdsta; /*RNG DRNG Status Register*/ u32 rsvd2[15]; |