random: Change testing random generator
The old random timer test was not random-looking enough on some platforms. Replace with new test which is psuedo-xoshiro. The generator is still deterministic and does not depend on entropy at all, but should look more random for testing. Change name of generator tree-wide also. Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
This commit is contained in:
parent
e065050f1b
commit
d6881de3b3
8 changed files with 44 additions and 21 deletions
|
@ -1,7 +1,7 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if (CONFIG_ENTROPY_DEVICE_RANDOM_GENERATOR OR
|
||||
CONFIG_TIMER_RANDOM_GENERATOR OR
|
||||
CONFIG_RANDOM_TEST_GENERATOR OR
|
||||
CONFIG_XOSHIRO_RANDOM_GENERATOR)
|
||||
zephyr_library()
|
||||
zephyr_library_sources_ifdef(CONFIG_USERSPACE rand32_handlers.c)
|
||||
|
@ -17,10 +17,10 @@ endif()
|
|||
# XOROSHIRO builds the XOSHIRO implementation because a Kconfig choice cannot
|
||||
# select another choice as a means of deprecating the symbol. Swapping out the
|
||||
# implementation lets out-of-tree users still build until the symbol is removed.
|
||||
zephyr_library_sources_ifdef(CONFIG_TIMER_RANDOM_GENERATOR rand32_timer.c)
|
||||
zephyr_library_sources_ifdef(CONFIG_XOROSHIRO_RANDOM_GENERATOR rand32_xoshiro128.c)
|
||||
zephyr_library_sources_ifdef(CONFIG_XOSHIRO_RANDOM_GENERATOR rand32_xoshiro128.c)
|
||||
zephyr_library_sources_ifdef(CONFIG_CTR_DRBG_CSPRNG_GENERATOR rand32_ctr_drbg.c)
|
||||
zephyr_library_sources_ifdef(CONFIG_RANDOM_TEST_GENERATOR rand32_test.c)
|
||||
|
||||
if (CONFIG_ENTROPY_DEVICE_RANDOM_GENERATOR OR CONFIG_HARDWARE_DEVICE_CS_GENERATOR)
|
||||
zephyr_library_sources(rand32_entropy_device.c)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue