| e9c080a6 | 29-Apr-2022 |
Andrew Davis <afd@ti.com> |
plat-rcar: Switch to hw_get_random_bytes()
hw_get_random_byte() is no longer used. The default crypto_rng_read() calls hw_get_random_bytes() now so implement just hw_get_random_bytes().
Signed-off-
plat-rcar: Switch to hw_get_random_bytes()
hw_get_random_byte() is no longer used. The default crypto_rng_read() calls hw_get_random_bytes() now so implement just hw_get_random_bytes().
Signed-off-by: Andrew Davis <afd@ti.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| b875fcfb | 05-Jul-2022 |
Andrew Davis <afd@ti.com> |
plat-k3: Switch to hw_get_random_bytes()
hw_get_random_byte() is no longer used. The default crypto_rng_read() calls hw_get_random_bytes() now so implement just hw_get_random_bytes().
Signed-off-by
plat-k3: Switch to hw_get_random_bytes()
hw_get_random_byte() is no longer used. The default crypto_rng_read() calls hw_get_random_bytes() now so implement just hw_get_random_bytes().
Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 184b8857 | 05-Jul-2022 |
Andrew Davis <afd@ti.com> |
plat-k3: Factor out sa2ul_rng_read128()
The core function is a 128bit RNG read. Factor this out into its own function to help with the switch to hw_get_random_bytes().
Signed-off-by: Andrew Davis <
plat-k3: Factor out sa2ul_rng_read128()
The core function is a 128bit RNG read. Factor this out into its own function to help with the switch to hw_get_random_bytes().
Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| bc842791 | 05-Jul-2022 |
Andrew Davis <afd@ti.com> |
drivers: xiphera_trng: Switch to hw_get_random_bytes()
hw_get_random_byte() is no longer used. The default crypto_rng_read() calls hw_get_random_bytes() now so implement just hw_get_random_bytes().
drivers: xiphera_trng: Switch to hw_get_random_bytes()
hw_get_random_byte() is no longer used. The default crypto_rng_read() calls hw_get_random_bytes() now so implement just hw_get_random_bytes().
Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 830d8c4c | 29-Apr-2022 |
Andrew Davis <afd@ti.com> |
drivers: hi16xx_rng: Switch to hw_get_random_bytes()
hw_get_random_byte() is no longer used. The default crypto_rng_read() calls hw_get_random_bytes() now so implement just hw_get_random_bytes().
S
drivers: hi16xx_rng: Switch to hw_get_random_bytes()
hw_get_random_byte() is no longer used. The default crypto_rng_read() calls hw_get_random_bytes() now so implement just hw_get_random_bytes().
Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 671dbd1e | 29-Apr-2022 |
Andrew Davis <afd@ti.com> |
drivers: dra7_rng: Switch to hw_get_random_bytes()
hw_get_random_byte() is no longer used. The default crypto_rng_read() calls hw_get_random_bytes() now so implement just hw_get_random_bytes().
Sig
drivers: dra7_rng: Switch to hw_get_random_bytes()
hw_get_random_byte() is no longer used. The default crypto_rng_read() calls hw_get_random_bytes() now so implement just hw_get_random_bytes().
Signed-off-by: Andrew Davis <afd@ti.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 6594a67e | 29-Apr-2022 |
Andrew Davis <afd@ti.com> |
drivers: dra7_rng: Factor out dra7_rng_read64()
The core function is a 64bit RNG read. Factor this out into its own function to help with the switch to hw_get_random_bytes().
Signed-off-by: Andrew
drivers: dra7_rng: Factor out dra7_rng_read64()
The core function is a 64bit RNG read. Factor this out into its own function to help with the switch to hw_get_random_bytes().
Signed-off-by: Andrew Davis <afd@ti.com> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| c6712bd0 | 29-Apr-2022 |
Andrew Davis <afd@ti.com> |
drivers: dra7_rng: Use cpu_spin_lock_xsave helper function
Does the same thing, saves us a line or two.
Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Etienne Carriere <etienne.carriere@lina
drivers: dra7_rng: Use cpu_spin_lock_xsave helper function
Does the same thing, saves us a line or two.
Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| d11c29c3 | 29-Apr-2022 |
Andrew Davis <afd@ti.com> |
drivers: dra7_rng: Only fetch RNG base VA once
No reason to do this every time we want to get a random byte. Fetch this once on init and keep it in a static global.
Signed-off-by: Andrew Davis <afd
drivers: dra7_rng: Only fetch RNG base VA once
No reason to do this every time we want to get a random byte. Fetch this once on init and keep it in a static global.
Signed-off-by: Andrew Davis <afd@ti.com> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| cb2478ef | 05-Jul-2022 |
Andrew Davis <afd@ti.com> |
drivers: stm32_rng: Switch to hw_get_random_bytes()
hw_get_random_byte() is no longer used. The default crypto_rng_read() calls hw_get_random_bytes() now so we do not need to override this and can s
drivers: stm32_rng: Switch to hw_get_random_bytes()
hw_get_random_byte() is no longer used. The default crypto_rng_read() calls hw_get_random_bytes() now so we do not need to override this and can simply implement just hw_get_random_bytes().
Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 23b77ea3 | 05-Jul-2022 |
Andrew Davis <afd@ti.com> |
drivers: smccc_trng: Switch to hw_get_random_bytes()
hw_get_random_byte() is no longer used. The default crypto_rng_read() calls hw_get_random_bytes() now so we do not need to override this and can
drivers: smccc_trng: Switch to hw_get_random_bytes()
hw_get_random_byte() is no longer used. The default crypto_rng_read() calls hw_get_random_bytes() now so we do not need to override this and can simply implement just hw_get_random_bytes().
Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| f6406a3c | 29-Apr-2022 |
Andrew Davis <afd@ti.com> |
drivers: imx_rngb: Switch to hw_get_random_bytes()
hw_get_random_byte() is no longer used. The default crypto_rng_read() calls hw_get_random_bytes() now so we do not need to override this and can si
drivers: imx_rngb: Switch to hw_get_random_bytes()
hw_get_random_byte() is no longer used. The default crypto_rng_read() calls hw_get_random_bytes() now so we do not need to override this and can simply implement just hw_get_random_bytes().
Signed-off-by: Andrew Davis <afd@ti.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 6b8ebe45 | 29-Apr-2022 |
Andrew Davis <afd@ti.com> |
drivers: se050: rng: Switch to hw_get_random_bytes()
hw_get_random_byte() is no longer used. The default crypto_rng_read() calls hw_get_random_bytes() now so we do not need to override this and can
drivers: se050: rng: Switch to hw_get_random_bytes()
hw_get_random_byte() is no longer used. The default crypto_rng_read() calls hw_get_random_bytes() now so we do not need to override this and can simply implement just hw_get_random_bytes().
Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| e7d4dea3 | 29-Apr-2022 |
Andrew Davis <afd@ti.com> |
drivers: caam: rng: Switch to hw_get_random_bytes()
hw_get_random_byte() is no longer used. The default crypto_rng_read() calls hw_get_random_bytes() now so we do not need to override this and can s
drivers: caam: rng: Switch to hw_get_random_bytes()
hw_get_random_byte() is no longer used. The default crypto_rng_read() calls hw_get_random_bytes() now so we do not need to override this and can simply implement just hw_get_random_bytes().
Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 8af02d37 | 29-Apr-2022 |
Andrew Davis <afd@ti.com> |
drivers: atmel_trng: Switch to hw_get_random_bytes()
hw_get_random_byte() is no longer used. The default crypto_rng_read() calls hw_get_random_bytes() now so we do not need to override this and can
drivers: atmel_trng: Switch to hw_get_random_bytes()
hw_get_random_byte() is no longer used. The default crypto_rng_read() calls hw_get_random_bytes() now so we do not need to override this and can simply implement just hw_get_random_bytes().
Signed-off-by: Andrew Davis <afd@ti.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 60296dff | 29-Apr-2022 |
Andrew Davis <afd@ti.com> |
core: rng_hw: Add dummy hw_get_random_byte()
This is only used so we can start removing hw_get_random_byte() from platforms without causing compile errors. It is never called.
Signed-off-by: Andrew
core: rng_hw: Add dummy hw_get_random_byte()
This is only used so we can start removing hw_get_random_byte() from platforms without causing compile errors. It is never called.
Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| e8a31001 | 29-Apr-2022 |
Andrew Davis <afd@ti.com> |
plar: rcar: Use common crypto_rng_read() over hw_get_random_byte()
This has the same effect and removes the last user of hw_get_random_byte() allowing us to start converting platforms to hw_get_rand
plar: rcar: Use common crypto_rng_read() over hw_get_random_byte()
This has the same effect and removes the last user of hw_get_random_byte() allowing us to start converting platforms to hw_get_random_bytes() and removing hw_get_random_byte().
Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| d3126240 | 29-Apr-2022 |
Andrew Davis <afd@ti.com> |
core: pta: Use common crypto_rng_read() over hw_get_random_byte()
This PTA is one of the only direct users of hw_get_random_byte(), the common path is through crypto_rng_read().
This does mean in s
core: pta: Use common crypto_rng_read() over hw_get_random_byte()
This PTA is one of the only direct users of hw_get_random_byte(), the common path is through crypto_rng_read().
This does mean in systems without a HW RNG this may go through the software PRNG, but this path is locked out by build-time checks on platforms that enable this PTA already.
Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| ce127af5 | 03-May-2022 |
Andrew Davis <afd@ti.com> |
plat-rcar: Software PRNG should be disabled when using hardware generator
On RCAR_GEN3 platforms, a hardware random number generator is available and the HWRNG_PTA is enabled. For this to work right
plat-rcar: Software PRNG should be disabled when using hardware generator
On RCAR_GEN3 platforms, a hardware random number generator is available and the HWRNG_PTA is enabled. For this to work right the software PRNG should be disabled.
Signed-off-by: Andrew Davis <afd@ti.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 391a3854 | 29-Apr-2022 |
Andrew Davis <afd@ti.com> |
core: Add hw_get_random_bytes()
Currently there are two options for supporting hardware RNG, implementing hw_get_random_byte() or overriding crypto_rng_read().
crypto_rng_read() is provided by eith
core: Add hw_get_random_bytes()
Currently there are two options for supporting hardware RNG, implementing hw_get_random_byte() or overriding crypto_rng_read().
crypto_rng_read() is provided by either a software PRNG or by a hardware RNG through a weak function in rng_hw.c. This weak function repeatedly calls hw_get_random_byte(). This can be an unneeded slowdown for platforms that fetch more than one byte of randomness per call to their HW RNG (all of them). The usual pattern is to store these extra bytes in a FIFO and feed them out one at a time. But since the only two callers of hw_get_random_byte() are themselves users of more than one byte this indirection is unnecessary. To get around this some platforms have also started overriding crypto_rng_read() which makes the API flow a bit less intuitive than it could be.
Plan here is that platforms only need to implement hw_get_random_bytes(). This can be called with length = 1 if we only need a single byte. But in the more common case we get a performance boost and simplify the RNG call flow.
To start we keep hw_get_random_byte() and have the new hw_get_random_bytes() use it to get platform HW RNG byte at a time. When we finish moving all plats over to hw_get_random_bytes() then hw_get_random_byte() can be removed.
Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 1c81e5f9 | 06-Jul-2022 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
drivers: stm32_gpio: temporary GPIO configuration for STM32MP13
This temporary change set all configured GPIOs to non-secure state on STM32MP13 platform. This change is needed while we align all com
drivers: stm32_gpio: temporary GPIO configuration for STM32MP13
This temporary change set all configured GPIOs to non-secure state on STM32MP13 platform. This change is needed while we align all components.
Changes I2C driver to assign I2C pins to secure world for STM32MP13.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| b5ec47ff | 05-Jul-2022 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
plat-stm32mp1: temporary ETZPC configuration
As device-tree configuration for the ETZPC is not yet handled, add a temporary configuration in the platform main.
Signed-off-by: Gatien Chevallier <gat
plat-stm32mp1: temporary ETZPC configuration
As device-tree configuration for the ETZPC is not yet handled, add a temporary configuration in the platform main.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| dedaf8ca | 07-Jul-2022 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
plat-stm32mp1: add APB6 memory mapping
This patch adds the secure memory mapping for APB6.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.ca
plat-stm32mp1: add APB6 memory mapping
This patch adds the secure memory mapping for APB6.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 3fc66f53 | 06-Jul-2022 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
plat-stm32mp1: define specific STM32MP13 peripheral addresses
Some peripheral addresses differ from STM32MP15 to STM32MP13. This change adds support for those differences.
Signed-off-by: Gatien Che
plat-stm32mp1: define specific STM32MP13 peripheral addresses
Some peripheral addresses differ from STM32MP15 to STM32MP13. This change adds support for those differences.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 200aed24 | 06-Jul-2022 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
plat-stm32mp1: tzc400: support STM32MP13
On STM32MP13 platforms, there is only one TZC filter unit. Therefore, differentiate the TZC_FILTERS_MASK from the STM32MP15, which has two.
Signed-off-by: G
plat-stm32mp1: tzc400: support STM32MP13
On STM32MP13 platforms, there is only one TZC filter unit. Therefore, differentiate the TZC_FILTERS_MASK from the STM32MP15, which has two.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|