2019-11-01 20:45:29 +08:00
|
|
|
# STM32 entropy generator driver configuration
|
|
|
|
|
2017-10-14 07:30:55 +08:00
|
|
|
# Copyright (c) 2017 Erwin Rol <erwin@erwinrol.com>
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
2020-04-03 22:18:59 +08:00
|
|
|
DT_COMPAT_ST_STM32_RNG := st,stm32-rng
|
|
|
|
|
2020-08-31 23:46:01 +08:00
|
|
|
menuconfig ENTROPY_STM32_RNG
|
2017-10-14 07:30:55 +08:00
|
|
|
bool "STM32 RNG driver"
|
2017-10-14 08:16:59 +08:00
|
|
|
depends on SOC_FAMILY_STM32
|
2017-10-14 07:30:55 +08:00
|
|
|
select ENTROPY_HAS_DRIVER
|
2017-10-31 18:56:57 +08:00
|
|
|
select USE_STM32_LL_RNG
|
2020-04-03 22:18:59 +08:00
|
|
|
default $(dt_compat_enabled,$(DT_COMPAT_ST_STM32_RNG))
|
2017-10-14 07:30:55 +08:00
|
|
|
help
|
|
|
|
This option enables the RNG processor, which is a entropy number
|
|
|
|
generator, based on a continuous analog noise, that provides
|
2018-07-02 00:15:15 +08:00
|
|
|
a entropy 32-bit value to the host when read. It is available for
|
2020-08-31 23:46:01 +08:00
|
|
|
F4 (except STM32F401 & STM32F411), L4, F7, H7 and G4 series.
|
|
|
|
|
|
|
|
if ENTROPY_STM32_RNG
|
|
|
|
|
|
|
|
config ENTROPY_STM32_THR_POOL_SIZE
|
|
|
|
int "Thread-mode random number pool size"
|
|
|
|
range ENTROPY_STM32_THR_THRESHOLD 256
|
|
|
|
default 8
|
|
|
|
help
|
|
|
|
Buffer length in bytes used to store entropy bytes generated by the
|
|
|
|
hardware to make them ready for thread mode consumers.
|
|
|
|
Please note, that size of the pool must be a power of 2.
|
|
|
|
|
|
|
|
config ENTROPY_STM32_THR_THRESHOLD
|
|
|
|
int "Thread-mode random number pool low-water threshold"
|
|
|
|
range 4 255
|
|
|
|
help
|
|
|
|
Low water-mark threshold in bytes to trigger entropy generation for
|
|
|
|
thread mode consumers. As soon as the number of available bytes in the
|
|
|
|
buffer goes below this number hardware entropy generation will be
|
|
|
|
started.
|
|
|
|
|
|
|
|
config ENTROPY_STM32_ISR_POOL_SIZE
|
|
|
|
int "ISR-mode random number pool size"
|
|
|
|
range ENTROPY_STM32_ISR_THRESHOLD 256
|
|
|
|
default 16
|
|
|
|
help
|
|
|
|
Buffer length in bytes used to store entropy bytes generated by the
|
|
|
|
hardware to make them ready for ISR consumers.
|
|
|
|
Please note, that size of the pool must be a power of 2.
|
|
|
|
|
|
|
|
config ENTROPY_STM32_ISR_THRESHOLD
|
|
|
|
int "ISR-mode random number pool low-water threshold"
|
|
|
|
range 12 255
|
|
|
|
help
|
|
|
|
Low water-mark threshold in bytes to trigger entropy generation for
|
|
|
|
ISR consumers. As soon as the number of available bytes in the
|
|
|
|
buffer goes below this number hardware entropy generation will be
|
|
|
|
started.
|
|
|
|
|
|
|
|
endif # ENTROPY_STM32_RNG
|