mbox series

[0/2] Add OP-TEE based hwrng driver

Message ID 1545136651-25776-1-git-send-email-sumit.garg@linaro.org
Headers show
Series Add OP-TEE based hwrng driver | expand

Message

Sumit Garg Dec. 18, 2018, 12:37 p.m. UTC
On ARM SoC's with TrustZone enabled, peripherals like entropy sources
might not be accessible to normal world (linux in this case) and rather
accessible to secure world (OP-TEE in this case) only. So this driver
aims to provides a generic interface to OP-TEE based random number
generator service.

Example case is Developerbox based on Socionext's Synquacer SoC [1]
which provides 7 thermal sensors accessible from secure world only which
could be used as entropy sources (thermal/measurement noise).

[1] https://www.96boards.org/product/developerbox/

Sumit Garg (2):
  dt/bindings: add bindings for optional optee hw-rng node
  hwrng: add OP-TEE based rng driver

 .../bindings/arm/firmware/linaro,optee-tz.txt      |  16 ++
 MAINTAINERS                                        |   5 +
 drivers/char/hw_random/Kconfig                     |  15 ++
 drivers/char/hw_random/Makefile                    |   1 +
 drivers/char/hw_random/optee-rng.c                 | 236 +++++++++++++++++++++
 5 files changed, 273 insertions(+)
 create mode 100644 drivers/char/hw_random/optee-rng.c

-- 
2.7.4

Comments

Sumit Garg Dec. 18, 2018, 12:40 p.m. UTC | #1
Hi Daniel,

On Tue, 18 Dec 2018 at 18:07, Sumit Garg <sumit.garg@linaro.org> wrote:
>

> On ARM SoC's with TrustZone enabled, peripherals like entropy sources

> might not be accessible to normal world (linux in this case) and rather

> accessible to secure world (OP-TEE in this case) only. So this driver

> aims to provides a generic interface to OP-TEE based random number

> generator service.

>

> Example case is Developerbox based on Socionext's Synquacer SoC [1]

> which provides 7 thermal sensors accessible from secure world only which

> could be used as entropy sources (thermal/measurement noise).

>

> [1] https://www.96boards.org/product/developerbox/

>

> Sumit Garg (2):

>   dt/bindings: add bindings for optional optee hw-rng node

>   hwrng: add OP-TEE based rng driver

>


I have tried to create a generic optee-rng driver for Linux. Please
help me to review it before I post this patch-set in upstream.

Regards,
Sumit

>  .../bindings/arm/firmware/linaro,optee-tz.txt      |  16 ++

>  MAINTAINERS                                        |   5 +

>  drivers/char/hw_random/Kconfig                     |  15 ++

>  drivers/char/hw_random/Makefile                    |   1 +

>  drivers/char/hw_random/optee-rng.c                 | 236 +++++++++++++++++++++

>  5 files changed, 273 insertions(+)

>  create mode 100644 drivers/char/hw_random/optee-rng.c

>

> --

> 2.7.4

>