[COMMON] hw_random: add exyswd-rng's config in Kconfig and Makefile
authorLee Seoyeong <s1121.lee@samsung.com>
Wed, 9 Aug 2017 05:40:58 +0000 (14:40 +0900)
committerJunho Choi <junhosj.choi@samsung.com>
Thu, 24 May 2018 00:02:12 +0000 (09:02 +0900)
Change-Id: I7302ad3228fefedee3d51023d633d82b203da9c0
Signed-off-by: Keunyoung Park <keun0.park@samsung.com>
drivers/char/hw_random/Kconfig
drivers/char/hw_random/Makefile

index 95a031e9eced07ce3566387054c00610a9825ffe..99e4a2fca1caa79fb3e965723e5e96cc96771ace 100644 (file)
@@ -449,6 +449,42 @@ config HW_RANDOM_S390
 
          If unsure, say Y.
 
+config HW_RANDOM_EXYNOS_SWD
+       tristate "EXYNOS SWD HW random number generator support"
+       depends on ARCH_EXYNOS
+       default HW_RANDOM
+       ---help---
+         This driver provides kernel-side support for TRNG hardware
+         found in secure world by using smc call
+
+         To compile this driver as a module, choose M here: the
+         module will be called exynos-rng.
+
+         If unsure, say Y.
+
+config EXYRNG_FIPS_COMPLIANCE
+       bool "Compliant with FIPS 140-2"
+       depends on HW_RANDOM_EXYNOS_SWD
+
+choice
+       prompt "Fail Policy"
+       depends on EXYRNG_FIPS_COMPLIANCE
+       default EXYRNG_FAIL_POLICY_DISABLE
+
+config EXYRNG_FAIL_POLICY_DISABLE
+       bool "Disable RNG if the tests fail"
+       depends on EXYRNG_FIPS_COMPLIANCE
+
+config EXYRNG_FAIL_POLICY_RESET
+       bool "Reset if the tests fail"
+       depends on EXYRNG_FIPS_COMPLIANCE
+endchoice
+
+config EXYRNG_USE_CRYPTOMANAGER
+       tristate "Use CryptoManager"
+       depends on HW_RANDOM_EXYNOS_SWD
+       default n
+
 endif # HW_RANDOM
 
 config UML_RANDOM
index f3728d008fff9f1aa3a7fee446a3ece5f2727894..6f807998599a4af5ee7aefc47e2998e5fa412eaa 100644 (file)
@@ -5,6 +5,7 @@
 
 obj-$(CONFIG_HW_RANDOM) += rng-core.o
 rng-core-y := core.o
+obj-$(CONFIG_HW_RANDOM_EXYNOS_SWD) += exyswd-rng.o
 obj-$(CONFIG_HW_RANDOM_TIMERIOMEM) += timeriomem-rng.o
 obj-$(CONFIG_HW_RANDOM_INTEL) += intel-rng.o
 obj-$(CONFIG_HW_RANDOM_AMD) += amd-rng.o