Searched hist:"825 dff97001f18e147666b66635d2b2b4d1c4085" (Results 1 – 1 of 1) sorted by relevance
| /optee_os/core/drivers/ |
| H A D | xiphera_trng.c | 825dff97001f18e147666b66635d2b2b4d1c4085 Fri Jul 29 11:27:27 UTC 2022 Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com> drivers: xiphera_trng: Allow interrupts while waiting for random
If for some reason getting new random values take a bit longer toggle interrupt masks on/off while waiting.
This allows pending interrupts to be served faster in REE side as getting new random might not be that important. At the same time it gives more time for random number generation to complete and not just performing spinning and waiting.
It was originally recommended by TRNG vendor not to cache previous partial results in memory. TRNG itself is rather fast so there should be always fresh bytes available for consumption. Thus to simplify the code remove the FIFO construct.
Signed-off-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
|