1# SPDX-License-Identifier: GPL-2.0-only 2# 3# Hardware Random Number Generator (RNG) configuration 4# 5 6menuconfig HW_RANDOM 7 tristate "Hardware Random Number Generator Core support" 8 default m 9 help 10 Hardware Random Number Generator Core infrastructure. 11 12 To compile this driver as a module, choose M here: the 13 module will be called rng-core. This provides a device 14 that's usually called /dev/hwrng, and which exposes one 15 of possibly several hardware random number generators. 16 17 These hardware random number generators do feed into the 18 kernel's random number generator entropy pool. 19 20 If unsure, say Y. 21 22if HW_RANDOM 23 24config HW_RANDOM_TIMERIOMEM 25 tristate "Timer IOMEM HW Random Number Generator support" 26 depends on HAS_IOMEM 27 help 28 This driver provides kernel-side support for a generic Random 29 Number Generator used by reading a 'dumb' iomem address that 30 is to be read no faster than, for example, once a second; 31 the default FPGA bitstream on the TS-7800 has such functionality. 32 33 To compile this driver as a module, choose M here: the 34 module will be called timeriomem-rng. 35 36 If unsure, say Y. 37 38config HW_RANDOM_INTEL 39 tristate "Intel HW Random Number Generator support" 40 depends on (X86 || COMPILE_TEST) && PCI 41 default HW_RANDOM 42 help 43 This driver provides kernel-side support for the Random Number 44 Generator hardware found on Intel i8xx-based motherboards. 45 46 To compile this driver as a module, choose M here: the 47 module will be called intel-rng. 48 49 If unsure, say Y. 50 51config HW_RANDOM_AMD 52 tristate "AMD HW Random Number Generator support" 53 depends on (X86 || COMPILE_TEST) 54 depends on PCI && HAS_IOPORT_MAP 55 default HW_RANDOM 56 help 57 This driver provides kernel-side support for the Random Number 58 Generator hardware found on AMD 76x-based motherboards. 59 60 To compile this driver as a module, choose M here: the 61 module will be called amd-rng. 62 63 If unsure, say Y. 64 65config HW_RANDOM_AIROHA 66 tristate "Airoha True HW Random Number Generator support" 67 depends on ARCH_AIROHA || COMPILE_TEST 68 default HW_RANDOM 69 help 70 This driver provides kernel-side support for the True Random Number 71 Generator hardware found on Airoha SoC. 72 73 To compile this driver as a module, choose M here: the 74 module will be called airoha-rng. 75 76 If unsure, say Y. 77 78config HW_RANDOM_ATMEL 79 tristate "Atmel Random Number Generator support" 80 depends on (ARCH_MICROCHIP || COMPILE_TEST) 81 default HW_RANDOM 82 help 83 This driver provides kernel-side support for the Random Number 84 Generator hardware found on Atmel AT91 devices. 85 86 To compile this driver as a module, choose M here: the 87 module will be called atmel-rng. 88 89 If unsure, say Y. 90 91config HW_RANDOM_BA431 92 tristate "Silex Insight BA431 Random Number Generator support" 93 depends on HAS_IOMEM 94 help 95 This driver provides kernel-side support for the Random Number 96 Generator hardware based on Silex Insight BA431 IP. 97 98 To compile this driver as a module, choose M here: the 99 module will be called ba431-rng. 100 101config HW_RANDOM_BCM2835 102 tristate "Broadcom BCM2835/BCM63xx Random Number Generator support" 103 depends on ARCH_BCM2835 || ARCH_BCM_NSP || ARCH_BCM_5301X || \ 104 ARCH_BCMBCA || BCM63XX || BMIPS_GENERIC || COMPILE_TEST 105 default HW_RANDOM 106 help 107 This driver provides kernel-side support for the Random Number 108 Generator hardware found on the Broadcom BCM2835 and BCM63xx SoCs. 109 110 To compile this driver as a module, choose M here: the 111 module will be called bcm2835-rng 112 113 If unsure, say Y. 114 115config HW_RANDOM_BCM74110 116 tristate "Broadcom BCM74110 Random Number Generator support" 117 depends on ARCH_BRCMSTB || COMPILE_TEST 118 default HW_RANDOM 119 help 120 This driver provides kernel-side support for the Random Number 121 Generator hardware found on the Broadcom BCM74110 SoCs. 122 123 To compile this driver as a module, choose M here: the 124 module will be called bcm74110-rng 125 126 If unsure, say Y. 127 128config HW_RANDOM_IPROC_RNG200 129 tristate "Broadcom iProc/STB RNG200 support" 130 depends on ARCH_BCM_IPROC || ARCH_BCM2835 || ARCH_BCMBCA || ARCH_BRCMSTB || COMPILE_TEST 131 default HW_RANDOM 132 help 133 This driver provides kernel-side support for the RNG200 134 hardware found on the Broadcom iProc and STB SoCs. 135 136 To compile this driver as a module, choose M here: the 137 module will be called iproc-rng200 138 139 If unsure, say Y. 140 141config HW_RANDOM_GEODE 142 tristate "AMD Geode HW Random Number Generator support" 143 depends on (X86_32 || COMPILE_TEST) 144 depends on PCI 145 default HW_RANDOM 146 help 147 This driver provides kernel-side support for the Random Number 148 Generator hardware found on the AMD Geode LX. 149 150 To compile this driver as a module, choose M here: the 151 module will be called geode-rng. 152 153 If unsure, say Y. 154 155config HW_RANDOM_N2RNG 156 tristate "Niagara2 Random Number Generator support" 157 depends on SPARC64 158 default HW_RANDOM 159 help 160 This driver provides kernel-side support for the Random Number 161 Generator hardware found on Niagara2 cpus. 162 163 To compile this driver as a module, choose M here: the 164 module will be called n2-rng. 165 166 If unsure, say Y. 167 168config HW_RANDOM_VIA 169 tristate "VIA HW Random Number Generator support" 170 depends on X86 171 default HW_RANDOM 172 help 173 This driver provides kernel-side support for the Random Number 174 Generator hardware found on VIA based motherboards. 175 176 To compile this driver as a module, choose M here: the 177 module will be called via-rng. 178 179 If unsure, say Y. 180 181config HW_RANDOM_IXP4XX 182 tristate "Intel IXP4xx NPU HW Pseudo-Random Number Generator support" 183 depends on ARCH_IXP4XX || COMPILE_TEST 184 default HW_RANDOM 185 help 186 This driver provides kernel-side support for the Pseudo-Random 187 Number Generator hardware found on the Intel IXP45x/46x NPU. 188 189 To compile this driver as a module, choose M here: the 190 module will be called ixp4xx-rng. 191 192 If unsure, say Y. 193 194config HW_RANDOM_OMAP 195 tristate "OMAP Random Number Generator support" 196 depends on ARCH_OMAP16XX || ARCH_OMAP2PLUS || ARCH_MVEBU || ARCH_K3 || COMPILE_TEST 197 default HW_RANDOM 198 help 199 This driver provides kernel-side support for the Random Number 200 Generator hardware found on OMAP16xx, OMAP2/3/4/5, AM33xx/AM43xx 201 multimedia processors, and Marvell Armada 7k/8k SoCs. 202 203 To compile this driver as a module, choose M here: the 204 module will be called omap-rng. 205 206 If unsure, say Y. 207 208config HW_RANDOM_OMAP3_ROM 209 tristate "OMAP3 ROM Random Number Generator support" 210 depends on ARCH_OMAP3 || COMPILE_TEST 211 default HW_RANDOM 212 help 213 This driver provides kernel-side support for the Random Number 214 Generator hardware found on OMAP34xx processors. 215 216 To compile this driver as a module, choose M here: the 217 module will be called omap3-rom-rng. 218 219 If unsure, say Y. 220 221config HW_RANDOM_OCTEON 222 tristate "Octeon Random Number Generator support" 223 depends on CAVIUM_OCTEON_SOC 224 default HW_RANDOM 225 help 226 This driver provides kernel-side support for the Random Number 227 Generator hardware found on Octeon processors. 228 229 To compile this driver as a module, choose M here: the 230 module will be called octeon-rng. 231 232 If unsure, say Y. 233 234config HW_RANDOM_PASEMI 235 tristate "PA Semi HW Random Number Generator support" 236 depends on PPC_PASEMI || (PPC && COMPILE_TEST) 237 default HW_RANDOM 238 help 239 This driver provides kernel-side support for the Random Number 240 Generator hardware found on PA Semi PWRficient SoCs. 241 242 To compile this driver as a module, choose M here: the 243 module will be called pasemi-rng. 244 245 If unsure, say Y. 246 247config HW_RANDOM_VIRTIO 248 tristate "VirtIO Random Number Generator support" 249 depends on VIRTIO 250 help 251 This driver provides kernel-side support for the virtual Random Number 252 Generator hardware. 253 254 To compile this driver as a module, choose M here: the 255 module will be called virtio-rng. If unsure, say N. 256 257config HW_RANDOM_MXC_RNGA 258 tristate "Freescale i.MX RNGA Random Number Generator" 259 depends on SOC_IMX31 || COMPILE_TEST 260 default HW_RANDOM 261 help 262 This driver provides kernel-side support for the Random Number 263 Generator hardware found on Freescale i.MX processors. 264 265 To compile this driver as a module, choose M here: the 266 module will be called mxc-rnga. 267 268 If unsure, say Y. 269 270config HW_RANDOM_IMX_RNGC 271 tristate "Freescale i.MX RNGC Random Number Generator" 272 depends on HAS_IOMEM 273 depends on SOC_IMX25 || SOC_IMX6SL || SOC_IMX6SLL || SOC_IMX6UL || COMPILE_TEST 274 default HW_RANDOM 275 help 276 This driver provides kernel-side support for the Random Number 277 Generator Version C hardware found on some Freescale i.MX 278 processors. Version B is also supported by this driver. 279 280 To compile this driver as a module, choose M here: the 281 module will be called imx-rngc. 282 283 If unsure, say Y. 284 285config HW_RANDOM_INGENIC_RNG 286 tristate "Ingenic Random Number Generator support" 287 depends on MACH_JZ4780 || MACH_X1000 || COMPILE_TEST 288 default HW_RANDOM 289 help 290 This driver provides kernel-side support for the Random Number Generator 291 hardware found in ingenic JZ4780 and X1000 SoC. MIPS Creator CI20 uses 292 JZ4780 SoC, YSH & ATIL CU1000-Neo uses X1000 SoC. 293 294 To compile this driver as a module, choose M here: the 295 module will be called ingenic-rng. 296 297 If unsure, say Y. 298 299config HW_RANDOM_INGENIC_TRNG 300 tristate "Ingenic True Random Number Generator support" 301 depends on MACH_X1830 || COMPILE_TEST 302 default HW_RANDOM 303 help 304 This driver provides kernel-side support for the True Random Number Generator 305 hardware found in ingenic X1830 SoC. YSH & ATIL CU1830-Neo uses X1830 SoC. 306 307 To compile this driver as a module, choose M here: the 308 module will be called ingenic-trng. 309 310 If unsure, say Y. 311 312config HW_RANDOM_NOMADIK 313 tristate "ST-Ericsson Nomadik Random Number Generator support" 314 depends on ARCH_NOMADIK || COMPILE_TEST 315 depends on ARM_AMBA 316 default HW_RANDOM 317 help 318 This driver provides kernel-side support for the Random Number 319 Generator hardware found on ST-Ericsson SoCs (8815 and 8500). 320 321 To compile this driver as a module, choose M here: the 322 module will be called nomadik-rng. 323 324 If unsure, say Y. 325 326config HW_RANDOM_PSERIES 327 tristate "pSeries HW Random Number Generator support" 328 depends on PPC64 && IBMVIO 329 default HW_RANDOM 330 help 331 This driver provides kernel-side support for the Random Number 332 Generator hardware found on POWER7+ machines and above 333 334 To compile this driver as a module, choose M here: the 335 module will be called pseries-rng. 336 337 If unsure, say Y. 338 339config HW_RANDOM_POWERNV 340 tristate "PowerNV Random Number Generator support" 341 depends on PPC_POWERNV 342 default HW_RANDOM 343 help 344 This is the driver for Random Number Generator hardware found 345 in POWER7+ and above machines for PowerNV platform. 346 347 To compile this driver as a module, choose M here: the 348 module will be called powernv-rng. 349 350 If unsure, say Y. 351 352config HW_RANDOM_HISI 353 tristate "Hisilicon Random Number Generator support" 354 depends on ARCH_HISI || COMPILE_TEST 355 default HW_RANDOM 356 help 357 This driver provides kernel-side support for the Random Number 358 Generator hardware found on Hisilicon Hip04 and Hip05 SoC. 359 360 To compile this driver as a module, choose M here: the 361 module will be called hisi-rng. 362 363 If unsure, say Y. 364 365config HW_RANDOM_HISTB 366 tristate "Hisilicon STB Random Number Generator support" 367 depends on ARCH_HISI || COMPILE_TEST 368 default ARCH_HISI 369 help 370 This driver provides kernel-side support for the Random Number 371 Generator hardware found on Hisilicon Hi37xx SoC. 372 373 To compile this driver as a module, choose M here: the 374 module will be called histb-rng. 375 376config HW_RANDOM_HISI_TRNG 377 tristate "HiSilicon True Random Number Generator support" 378 depends on ARM64 && ACPI 379 help 380 This driver provides kernel-side support for the True Random Number 381 Generator hardware found on some HiSilicon SoCs. 382 383 To compile this driver as a module, choose M here: the module will be 384 called hisi-trng-v2. 385 386config HW_RANDOM_ST 387 tristate "ST Microelectronics HW Random Number Generator support" 388 depends on ARCH_STI || COMPILE_TEST 389 help 390 This driver provides kernel-side support for the Random Number 391 Generator hardware found on STi series of SoCs. 392 393 To compile this driver as a module, choose M here: the 394 module will be called st-rng. 395 396config HW_RANDOM_XGENE 397 tristate "APM X-Gene True Random Number Generator (TRNG) support" 398 depends on ARCH_XGENE || COMPILE_TEST 399 default HW_RANDOM 400 help 401 This driver provides kernel-side support for the Random Number 402 Generator hardware found on APM X-Gene SoC. 403 404 To compile this driver as a module, choose M here: the 405 module will be called xgene_rng. 406 407 If unsure, say Y. 408 409config HW_RANDOM_STM32 410 tristate "STMicroelectronics STM32 random number generator" 411 depends on ARCH_STM32 || COMPILE_TEST 412 depends on HAS_IOMEM 413 default HW_RANDOM 414 help 415 This driver provides kernel-side support for the Random Number 416 Generator hardware found on STM32 microcontrollers. 417 418 To compile this driver as a module, choose M here: the 419 module will be called stm32-rng. 420 421 If unsure, say N. 422 423config HW_RANDOM_PIC32 424 tristate "Microchip PIC32 Random Number Generator support" 425 depends on MACH_PIC32 || COMPILE_TEST 426 default HW_RANDOM if MACH_PIC32 427 help 428 This driver provides kernel-side support for the Random Number 429 Generator hardware found on a PIC32. 430 431 To compile this driver as a module, choose M here. the 432 module will be called pic32-rng. 433 434 If unsure, say Y. 435 436config HW_RANDOM_POLARFIRE_SOC 437 tristate "Microchip PolarFire SoC Random Number Generator support" 438 depends on HW_RANDOM && POLARFIRE_SOC_SYS_CTRL 439 help 440 This driver provides kernel-side support for the Random Number 441 Generator hardware found on PolarFire SoC (MPFS). 442 443 To compile this driver as a module, choose M here. The 444 module will be called mfps_rng. 445 446 If unsure, say N. 447 448 449config HW_RANDOM_MESON 450 tristate "Amlogic Meson Random Number Generator support" 451 depends on ARCH_MESON || COMPILE_TEST 452 depends on HAS_IOMEM && OF 453 default HW_RANDOM if ARCH_MESON 454 help 455 This driver provides kernel-side support for the Random Number 456 Generator hardware found on Amlogic Meson SoCs. 457 458 To compile this driver as a module, choose M here. the 459 module will be called meson-rng. 460 461 If unsure, say Y. 462 463config HW_RANDOM_CAVIUM 464 tristate "Cavium ThunderX Random Number Generator support" 465 depends on PCI 466 depends on ARCH_THUNDER || (ARM64 && COMPILE_TEST) 467 default HW_RANDOM 468 help 469 This driver provides kernel-side support for the Random Number 470 Generator hardware found on Cavium SoCs. 471 472 To compile this driver as a module, choose M here: the 473 module will be called cavium_rng. 474 475 If unsure, say Y. 476 477config HW_RANDOM_MTK 478 tristate "Mediatek Random Number Generator support" 479 depends on ARCH_MEDIATEK || COMPILE_TEST 480 depends on HAS_IOMEM && OF 481 default HW_RANDOM if ARCH_MEDIATEK 482 help 483 This driver provides kernel-side support for the Random Number 484 Generator hardware found on Mediatek SoCs. 485 486 To compile this driver as a module, choose M here. the 487 module will be called mtk-rng. 488 489 If unsure, say Y. 490 491config HW_RANDOM_S390 492 tristate "S390 True Random Number Generator support" 493 depends on S390 494 default HW_RANDOM 495 help 496 This driver provides kernel-side support for the True 497 Random Number Generator available as CPACF extension 498 on modern s390 hardware platforms. 499 500 To compile this driver as a module, choose M here: the 501 module will be called s390-trng. 502 503 If unsure, say Y. 504 505config HW_RANDOM_EXYNOS 506 tristate "Samsung Exynos True Random Number Generator support" 507 depends on ARCH_EXYNOS || COMPILE_TEST 508 depends on HAS_IOMEM 509 default HW_RANDOM if ARCH_EXYNOS 510 help 511 This driver provides support for the True Random Number 512 Generator available in Exynos SoCs. 513 514 To compile this driver as a module, choose M here: the module 515 will be called exynos-trng. 516 517 If unsure, say Y. 518 519config HW_RANDOM_OPTEE 520 tristate "OP-TEE based Random Number Generator support" 521 depends on OPTEE 522 default HW_RANDOM 523 help 524 This driver provides support for OP-TEE based Random Number 525 Generator on ARM SoCs where hardware entropy sources are not 526 accessible to normal world (Linux). 527 528 To compile this driver as a module, choose M here: the module 529 will be called optee-rng. 530 531 If unsure, say Y. 532 533config HW_RANDOM_NPCM 534 tristate "NPCM Random Number Generator support" 535 depends on ARCH_NPCM || COMPILE_TEST 536 depends on HAS_IOMEM 537 default HW_RANDOM if ARCH_NPCM 538 help 539 This driver provides support for the Random Number 540 Generator hardware available in Nuvoton NPCM SoCs. 541 542 To compile this driver as a module, choose M here: the 543 module will be called npcm-rng. 544 545 If unsure, say Y. 546 547config HW_RANDOM_KEYSTONE 548 tristate "TI Keystone NETCP SA Hardware random number generator" 549 depends on ARCH_KEYSTONE || COMPILE_TEST 550 depends on HAS_IOMEM && OF 551 default HW_RANDOM 552 help 553 This option enables Keystone's hardware random generator. 554 555config HW_RANDOM_CCTRNG 556 tristate "Arm CryptoCell True Random Number Generator support" 557 depends on HAS_IOMEM && OF 558 help 559 Say 'Y' to enable the True Random Number Generator driver for the 560 Arm TrustZone CryptoCell family of processors. 561 Currently the CryptoCell 713 and 703 are supported. 562 The driver is supported only in SoC where Trusted Execution 563 Environment is not used. 564 Choose 'M' to compile this driver as a module. The module 565 will be called cctrng. 566 If unsure, say 'N'. 567 568config HW_RANDOM_XIPHERA 569 tristate "Xiphera FPGA based True Random Number Generator support" 570 depends on HAS_IOMEM 571 help 572 This driver provides kernel-side support for Xiphera True Random 573 Number Generator Intellectual Property Core. 574 575 To compile this driver as a module, choose M here: the 576 module will be called xiphera-trng. 577 578config HW_RANDOM_ARM_SMCCC_TRNG 579 tristate "Arm SMCCC TRNG firmware interface support" 580 depends on HAVE_ARM_SMCCC_DISCOVERY 581 default HW_RANDOM 582 help 583 Say 'Y' to enable the True Random Number Generator driver using 584 the Arm SMCCC TRNG firmware interface. This reads entropy from 585 higher exception levels (firmware, hypervisor). Uses SMCCC for 586 communicating with the firmware: 587 https://developer.arm.com/documentation/den0098/latest/ 588 589 To compile this driver as a module, choose M here: the 590 module will be called arm_smccc_trng. 591 592config HW_RANDOM_CN10K 593 tristate "Marvell CN10K Random Number Generator support" 594 depends on HW_RANDOM && PCI && (ARM64 || (64BIT && COMPILE_TEST)) 595 default HW_RANDOM if ARCH_THUNDER 596 help 597 This driver provides support for the True Random Number 598 generator available in Marvell CN10K SoCs. 599 600 To compile this driver as a module, choose M here. 601 The module will be called cn10k_rng. If unsure, say Y. 602 603config HW_RANDOM_JH7110 604 tristate "StarFive JH7110 Random Number Generator support" 605 depends on SOC_STARFIVE || COMPILE_TEST 606 help 607 This driver provides support for the True Random Number 608 Generator in StarFive JH7110 SoCs. 609 610 To compile this driver as a module, choose M here. 611 The module will be called jh7110-trng. 612 613config HW_RANDOM_ROCKCHIP 614 tristate "Rockchip True Random Number Generator" 615 depends on HW_RANDOM && (ARCH_ROCKCHIP || COMPILE_TEST) 616 depends on HAS_IOMEM 617 default HW_RANDOM 618 help 619 This driver provides kernel-side support for the True Random Number 620 Generator hardware found on some Rockchip SoCs like RK3566, RK3568 621 or RK3588. 622 623 To compile this driver as a module, choose M here: the 624 module will be called rockchip-rng. 625 626 If unsure, say Y. 627 628config HW_RANDOM_XILINX 629 tristate "Support for Xilinx True Random Generator" 630 depends on ZYNQMP_FIRMWARE || COMPILE_TEST 631 select CRYPTO_LIB_SHA512 632 help 633 Xilinx Versal SoC driver provides kernel-side support for True Random Number 634 Generator and Pseudo random Number in CTR_DRBG mode as defined in NIST SP800-90A. 635 636 To compile this driver as a module, choose M here: the module 637 will be called xilinx-trng. 638 639endif # HW_RANDOM 640 641config UML_RANDOM 642 depends on UML 643 select HW_RANDOM 644 tristate "UML Random Number Generator support" 645 help 646 This option enables UML's "hardware" random number generator. It 647 attaches itself to the host's /dev/random, supplying as much entropy 648 as the host has, rather than the small amount the UML gets from its 649 own drivers. It registers itself as a rng-core driver thus providing 650 a device which is usually called /dev/hwrng. This hardware random 651 number generator does feed into the kernel's random number generator 652 entropy pool. 653 654 If unsure, say Y. 655