]> git.baikalelectronics.ru Git - arm-tf.git/commit
feat(fvp): emulate trapped RNDR
authorAndre Przywara <andre.przywara@arm.com>
Mon, 21 Nov 2022 17:07:25 +0000 (17:07 +0000)
committerManish Pandey <manish.pandey2@arm.com>
Wed, 21 Dec 2022 12:59:36 +0000 (12:59 +0000)
commit1ae75529bc2e5a213c3e458898c219c34aa99f65
tree523085f30f0fa8bb7c9eb9294f6b14c61f0dca25
parentccd81f1e097c3eafe38523110c8eebabbe662508
feat(fvp): emulate trapped RNDR

When a platform decides to use FEAT_RNG_TRAP, every RNDR or RNDRSS read
will trap into EL3. The platform can then emulate those instructions, by
either executing the real CPU instructions, potentially conditioning the
results, or use rate-limiting or filtering to protect the hardware
entropy pool. Another possiblitiy would be to use some platform specific
TRNG device to get entropy and returning this.

To demonstrate platform specific usage, add a demo implementation for the
FVP: It will execute the actual CPU instruction and just return the
result. This should serve as reference code to implement platform specific
policies.

We change the definition of read_rndr() and read_rndrrs() to use the
alternative sysreg encoding, so that all assemblers can handle that.

Add documentation about the new platform specific RNG handler function.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Change-Id: Ibce817b3b06ad20129d15531b81402e3cc3e9a9e
bl31/bl31_traps.c
docs/getting_started/porting-guide.rst
include/arch/aarch64/arch.h
include/arch/aarch64/arch_helpers.h
include/bl31/sync_handle.h
plat/arm/board/fvp/fvp_sync_traps.c [new file with mode: 0644]
plat/arm/board/fvp/platform.mk