You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ut...@apache.org on 2021/02/17 13:22:54 UTC

[mynewt-core] 05/05: trng: kinetis: seed RNGA with SIM->UIDL

This is an automated email from the ASF dual-hosted git repository.

utzig pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit e53ca22057ee66e7772aebc2ffb73ef70aa22b1a
Author: Fabio Utzig <ut...@apache.org>
AuthorDate: Tue Feb 16 19:15:10 2021 -0300

    trng: kinetis: seed RNGA with SIM->UIDL
    
    This follows the recommendation from NXP SDK.
    
    Signed-off-by: Fabio Utzig <ut...@apache.org>
---
 hw/drivers/trng/trng_kinetis/src/trng_kinetis.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/drivers/trng/trng_kinetis/src/trng_kinetis.c b/hw/drivers/trng/trng_kinetis/src/trng_kinetis.c
index 4f3821c..7f38cdf 100644
--- a/hw/drivers/trng/trng_kinetis/src/trng_kinetis.c
+++ b/hw/drivers/trng/trng_kinetis/src/trng_kinetis.c
@@ -191,6 +191,7 @@ kinetis_trng_dev_open(struct os_dev *dev, uint32_t wait, void *arg)
 
 #if USE_RNGA
         RNGA_Init(RNG);
+        RNGA_Seed(RNG, SIM->UIDL);
 #elif USE_TRNG
         (void)TRNG_GetDefaultConfig(&default_config);
         TRNG_Init(TRNG0, &default_config);