On STM32WB and dual-core STM32H7 MCUs, the RNG peripheral is shared between the cores and its access is protected by a hardware semaphore. Locking was not performed in the current entropy driver, leading to a race condition when multiple cores concurrently used the RNG. This commit implements the necessary logic for locking the HSEM during entropy generation on multi-core STM32 MCUs. It also reconfigures the RNG in case the configuration was changed by the other core, as this can happen e.g on STM32WB MCUs. Signed-off-by: Thomas Altenbach <taltenbach@witekio.com> |
||
|---|---|---|
| .. | ||
| arc | ||
| arm | ||
| arm64 | ||
| mips | ||
| nios2 | ||
| posix | ||
| riscv | ||
| sparc | ||
| x86 | ||
| xtensa | ||
| Kconfig | ||