[PATCH v3 0/3] Add support for efi_rng_protocol

Sughosh Ganu sughosh.ganu at linaro.org
Fri Dec 27 15:26:13 CET 2019


The patch series adds support for the EFI_RNG_PROTOCOL routines for
qemu arm64 platform. The getrng routine, used to get the random bytes,
uses the virtio-rng device found on the platform. The protocol, once
installed, can be used by the efi stub in the kernel for getting
random bytes needed for the kaslr feature.

These patches apply on top of the patch series to add random number
generator driver uclass[1]

[1] - https://lists.denx.de/pipermail/u-boot/2019-December/394654.html

Changes since V2:
* Based on review comments from Heinrich Schuchardt, the rng drivers
  read all the bytes requested in the individual
  drivers. Corresponding changes made in getrng routine to remove the
  loop to read the bytes requested, since that would be handled in the
  drivers.

Changes since V1:
* Handle review comments from Heinrich Schuchardt.
* Change the logic in the getrng routine to implement a loop to read
  the number of bytes requested. This change is needed to handle the
  change in the rng uclass's read function, which now returns the
  number of bytes read, which might be less than the number of bytes
  requested.


Sughosh Ganu (3):
  efi_loader: Add guidcpy function
  efi: qemu: arm64: Add efi_rng_protocol implementation for the platform
  efi_rng_protocol: Install the efi_rng_protocol on the root node

 board/emulation/qemu-arm/qemu-arm.c | 41 +++++++++++++++++++
 include/efi_loader.h                |  9 ++++
 include/efi_rng.h                   | 32 +++++++++++++++
 lib/efi_loader/Kconfig              |  8 ++++
 lib/efi_loader/Makefile             |  1 +
 lib/efi_loader/efi_boottime.c       |  4 +-
 lib/efi_loader/efi_rng.c            | 82 +++++++++++++++++++++++++++++++++++++
 lib/efi_loader/efi_root_node.c      |  4 ++
 8 files changed, 179 insertions(+), 2 deletions(-)
 create mode 100644 include/efi_rng.h
 create mode 100644 lib/efi_loader/efi_rng.c

-- 
2.7.4



More information about the U-Boot mailing list