From 5d90a1e298b427f05f8d0e553690e3c8ef0c8316 Mon Sep 17 00:00:00 2001 From: Lee Seoyeong Date: Wed, 9 Aug 2017 14:40:58 +0900 Subject: [PATCH] [COMMON] hw_random: add exyswd-rng's config in Kconfig and Makefile Change-Id: I7302ad3228fefedee3d51023d633d82b203da9c0 Signed-off-by: Keunyoung Park --- drivers/char/hw_random/Kconfig | 36 +++++++++++++++++++++++++++++++++ drivers/char/hw_random/Makefile | 1 + 2 files changed, 37 insertions(+) diff --git a/drivers/char/hw_random/Kconfig b/drivers/char/hw_random/Kconfig index 95a031e9eced..99e4a2fca1ca 100644 --- a/drivers/char/hw_random/Kconfig +++ b/drivers/char/hw_random/Kconfig @@ -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 diff --git a/drivers/char/hw_random/Makefile b/drivers/char/hw_random/Makefile index f3728d008fff..6f807998599a 100644 --- a/drivers/char/hw_random/Makefile +++ b/drivers/char/hw_random/Makefile @@ -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 -- 2.20.1