blob: 4efccd7fadc2b893a164117e757e1887c9ee85cb [file] [log] [blame]
Juan Manuel Cruzd15251f2015-05-20 11:40:39 -05001# Kconfig - random generator driver configuration options
2
3#
4# Copyright (c) 2014-2015 Wind River Systems, Inc.
5#
David B. Kinderac74d8b2017-01-18 17:01:01 -08006# SPDX-License-Identifier: Apache-2.0
Juan Manuel Cruzd15251f2015-05-20 11:40:39 -05007#
8
Marcus Shawcroft954baea2016-11-28 20:39:43 +00009menuconfig RANDOM_GENERATOR
Kumar Gala9ec2f3b2016-05-24 18:17:13 -050010 bool
Marcus Shawcroft954baea2016-11-28 20:39:43 +000011 prompt "Random Drivers"
Kumar Gala9ec2f3b2016-05-24 18:17:13 -050012 default n
13 help
Marcus Shawcroft954baea2016-11-28 20:39:43 +000014 Include RANDOM drivers in system config.
15
16if RANDOM_GENERATOR
17
Maureen Helmaa995f82017-01-02 14:24:58 -060018source "drivers/random/Kconfig.mcux"
Marcus Shawcroft954baea2016-11-28 20:39:43 +000019
20config RANDOM_HAS_DRIVER
21 bool
22 default n
23 help
24 This is an option to be enabled by individual random driver
25 to signal that there is a true random driver.
Dmitriy Korovkin27bcb432015-05-27 17:14:51 -040026
Marcus Shawcroft41277752016-11-19 23:46:22 +000027config RANDOM_NAME
28 string "Random Device Name"
29 depends on RANDOM_GENERATOR
30 default "RANDOM_0"
31 help
32 Specify the device name to be used for the RANDOM driver.
33
34config SYS_LOG_RANDOM_LEVEL
35 int "Random Log level"
36 depends on SYS_LOG && RANDOM_GENERATOR
37 default 0
38 range 0 4
39 help
40 Sets log level for random driver.
41 Levels are:
42 - 0 OFF: do not write
43 - 1 ERROR: only write SYS_LOG_ERR
44 - 2 WARNING: write SYS_LOG_WRN in addition to previous level
45 - 3 INFO: write SYS_LOG_INF in addition to previous levels
46 - 4 DEBUG: write SYS_LOG_DBG in addition to previous levels
47
Kumar Gala9ec2f3b2016-05-24 18:17:13 -050048config TEST_RANDOM_GENERATOR
Juan Manuel Cruzf98466d2015-03-18 16:24:43 -060049 bool
50 prompt "Non-random number generator"
Marcus Shawcroft954baea2016-11-28 20:39:43 +000051 depends on RANDOM_GENERATOR && ! RANDOM_HAS_DRIVER
Juan Manuel Cruzf98466d2015-03-18 16:24:43 -060052 default n
Juan Manuel Cruzf98466d2015-03-18 16:24:43 -060053 help
Dmitriy Korovkin27bcb432015-05-27 17:14:51 -040054 This option signifies that the kernel's random number APIs are
55 permitted to return values that are not truly random.
56 This capability is provided for testing purposes, when a truly random
57 number generator is not available. The non-random number generator
58 should not be used in a production environment.
Juan Manuel Cruzf98466d2015-03-18 16:24:43 -060059
Kumar Gala9ec2f3b2016-05-24 18:17:13 -050060config X86_TSC_RANDOM_GENERATOR
Dmitriy Korovkin27bcb432015-05-27 17:14:51 -040061 bool
62 prompt "x86 timestamp counter based number generator"
Anas Nashif77ba3c32015-10-09 06:20:52 -040063 depends on TEST_RANDOM_GENERATOR && X86
Dmitriy Korovkin27bcb432015-05-27 17:14:51 -040064 default y
65 help
66 This options enables number generator based on timestamp counter
David B. Kinderd7485772016-08-17 16:33:08 -070067 of x86 boards, obtained with rdtsc instruction.
Dmitriy Korovkin27bcb432015-05-27 17:14:51 -040068
Kumar Gala9ec2f3b2016-05-24 18:17:13 -050069config TIMER_RANDOM_GENERATOR
Dmitriy Korovkin27bcb432015-05-27 17:14:51 -040070 bool
71 prompt "System timer clock based number generator"
72 depends on TEST_RANDOM_GENERATOR && !X86_TSC_RANDOM_GENERATOR
73 default y
74 help
75 This options enables number generator based on system timer
76 clock. This number generator is not random and used for
77 testing only.
Marcus Shawcroft1bea5272016-06-22 17:53:28 +010078
Marcus Shawcroft954baea2016-11-28 20:39:43 +000079endif