Juan Manuel Cruz | d15251f | 2015-05-20 11:40:39 -0500 | [diff] [blame] | 1 | # Kconfig - random generator driver configuration options |
| 2 | |
| 3 | # |
| 4 | # Copyright (c) 2014-2015 Wind River Systems, Inc. |
| 5 | # |
David B. Kinder | ac74d8b | 2017-01-18 17:01:01 -0800 | [diff] [blame] | 6 | # SPDX-License-Identifier: Apache-2.0 |
Juan Manuel Cruz | d15251f | 2015-05-20 11:40:39 -0500 | [diff] [blame] | 7 | # |
| 8 | |
Marcus Shawcroft | 954baea | 2016-11-28 20:39:43 +0000 | [diff] [blame] | 9 | menuconfig RANDOM_GENERATOR |
Kumar Gala | 9ec2f3b | 2016-05-24 18:17:13 -0500 | [diff] [blame] | 10 | bool |
Marcus Shawcroft | 954baea | 2016-11-28 20:39:43 +0000 | [diff] [blame] | 11 | prompt "Random Drivers" |
Kumar Gala | 9ec2f3b | 2016-05-24 18:17:13 -0500 | [diff] [blame] | 12 | default n |
| 13 | help |
Marcus Shawcroft | 954baea | 2016-11-28 20:39:43 +0000 | [diff] [blame] | 14 | Include RANDOM drivers in system config. |
| 15 | |
| 16 | if RANDOM_GENERATOR |
| 17 | |
Maureen Helm | aa995f8 | 2017-01-02 14:24:58 -0600 | [diff] [blame] | 18 | source "drivers/random/Kconfig.mcux" |
Marcus Shawcroft | 954baea | 2016-11-28 20:39:43 +0000 | [diff] [blame] | 19 | |
| 20 | config 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 Korovkin | 27bcb43 | 2015-05-27 17:14:51 -0400 | [diff] [blame] | 26 | |
Marcus Shawcroft | 4127775 | 2016-11-19 23:46:22 +0000 | [diff] [blame] | 27 | config 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 | |
| 34 | config 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 Gala | 9ec2f3b | 2016-05-24 18:17:13 -0500 | [diff] [blame] | 48 | config TEST_RANDOM_GENERATOR |
Juan Manuel Cruz | f98466d | 2015-03-18 16:24:43 -0600 | [diff] [blame] | 49 | bool |
| 50 | prompt "Non-random number generator" |
Marcus Shawcroft | 954baea | 2016-11-28 20:39:43 +0000 | [diff] [blame] | 51 | depends on RANDOM_GENERATOR && ! RANDOM_HAS_DRIVER |
Juan Manuel Cruz | f98466d | 2015-03-18 16:24:43 -0600 | [diff] [blame] | 52 | default n |
Juan Manuel Cruz | f98466d | 2015-03-18 16:24:43 -0600 | [diff] [blame] | 53 | help |
Dmitriy Korovkin | 27bcb43 | 2015-05-27 17:14:51 -0400 | [diff] [blame] | 54 | 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 Cruz | f98466d | 2015-03-18 16:24:43 -0600 | [diff] [blame] | 59 | |
Kumar Gala | 9ec2f3b | 2016-05-24 18:17:13 -0500 | [diff] [blame] | 60 | config X86_TSC_RANDOM_GENERATOR |
Dmitriy Korovkin | 27bcb43 | 2015-05-27 17:14:51 -0400 | [diff] [blame] | 61 | bool |
| 62 | prompt "x86 timestamp counter based number generator" |
Anas Nashif | 77ba3c3 | 2015-10-09 06:20:52 -0400 | [diff] [blame] | 63 | depends on TEST_RANDOM_GENERATOR && X86 |
Dmitriy Korovkin | 27bcb43 | 2015-05-27 17:14:51 -0400 | [diff] [blame] | 64 | default y |
| 65 | help |
| 66 | This options enables number generator based on timestamp counter |
David B. Kinder | d748577 | 2016-08-17 16:33:08 -0700 | [diff] [blame] | 67 | of x86 boards, obtained with rdtsc instruction. |
Dmitriy Korovkin | 27bcb43 | 2015-05-27 17:14:51 -0400 | [diff] [blame] | 68 | |
Kumar Gala | 9ec2f3b | 2016-05-24 18:17:13 -0500 | [diff] [blame] | 69 | config TIMER_RANDOM_GENERATOR |
Dmitriy Korovkin | 27bcb43 | 2015-05-27 17:14:51 -0400 | [diff] [blame] | 70 | 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 Shawcroft | 1bea527 | 2016-06-22 17:53:28 +0100 | [diff] [blame] | 78 | |
Marcus Shawcroft | 954baea | 2016-11-28 20:39:43 +0000 | [diff] [blame] | 79 | endif |