arm64: Implement archrandom.h for ARMv8.5-RNG
Expose the ID_AA64ISAR0.RNDR field to userspace, as the RNG system registers are always available at EL0. Implement arch_get_random_seed_long using RNDR. Given that the TRNG is likely to be a shared resource between cores, and VMs, do not explicitly force re-seeding with RNDRRS. In order to avoid code complexity and potential issues with hetrogenous systems only provide values after cpufeature has finalized the system capabilities. Signed-off-by:Richard Henderson <richard.henderson@linaro.org> [Modified to only function after cpufeature has finalized the system capabilities and move all the code into the header -- broonie] Signed-off-by:
Mark Brown <broonie@kernel.org> Reviewed-by:
Mark Rutland <mark.rutland@arm.com> Reviewed-by:
Ard Biesheuvel <ardb@kernel.org> [will: Advertise HWCAP via /proc/cpuinfo] Signed-off-by:
Will Deacon <will@kernel.org>
Showing
- Documentation/arm64/cpu-feature-registers.rst 2 additions, 0 deletionsDocumentation/arm64/cpu-feature-registers.rst
- Documentation/arm64/elf_hwcaps.rst 4 additions, 0 deletionsDocumentation/arm64/elf_hwcaps.rst
- arch/arm64/Kconfig 12 additions, 0 deletionsarch/arm64/Kconfig
- arch/arm64/include/asm/archrandom.h 67 additions, 0 deletionsarch/arm64/include/asm/archrandom.h
- arch/arm64/include/asm/cpucaps.h 2 additions, 1 deletionarch/arm64/include/asm/cpucaps.h
- arch/arm64/include/asm/hwcap.h 1 addition, 0 deletionsarch/arm64/include/asm/hwcap.h
- arch/arm64/include/asm/sysreg.h 4 additions, 0 deletionsarch/arm64/include/asm/sysreg.h
- arch/arm64/include/uapi/asm/hwcap.h 1 addition, 0 deletionsarch/arm64/include/uapi/asm/hwcap.h
- arch/arm64/kernel/cpufeature.c 14 additions, 0 deletionsarch/arm64/kernel/cpufeature.c
- arch/arm64/kernel/cpuinfo.c 1 addition, 0 deletionsarch/arm64/kernel/cpuinfo.c
Loading
Please register or sign in to comment