[PATCH v3 2/3] efi: qemu: arm64: Add efi_rng_protocol implementation for the platform

Tuomas Tynkkynen tuomas.tynkkynen at iki.fi
Sat Dec 28 16:39:28 CET 2019


Hi,

On Sat, 28 Dec 2019 at 17:19, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
>
> On 12/28/19 4:03 PM, Sughosh Ganu wrote:
> >
> > On Sat, 28 Dec 2019 at 20:01, Heinrich Schuchardt <xypron.glpk at gmx.de
> > <mailto:xypron.glpk at gmx.de>> wrote:
> >
> >     On 12/27/19 3:26 PM, Sughosh Ganu wrote:
> >      > Add support for the EFI_RNG_PROTOCOL routines for the qemu arm64
> >      > platform. EFI_RNG_PROTOCOL is an uefi boottime service which is
> >      > invoked by the efi stub in the kernel for getting random seed for
> >      > kaslr.
> >      >
> >      > The routines are platform specific, and use the virtio-rng device on
> >      > the platform to get random data.
> >      >
> >      > The feature can be enabled through the following config
> >      > CONFIG_EFI_RNG_PROTOCOL
> >      >
> >      > Signed-off-by: Sughosh Ganu <sughosh.ganu at linaro.org
> >     <mailto:sughosh.ganu at linaro.org>>
...
>
> Adding the uclass_get_device() solution in a weak function is ok for me.
>
> When testing I already experienced that I had to issue the `virtio scan`
> command.
>

But in board_init() in qemu-arm.c we already call virtio_init(). If that is not
working correctly, there is a bug that should be fixed instead.

Maybe the problem is that PCI bus has not been scanned at the time of
that virtio_init() call (so everything would work correctly with virtio-mmio
but virtio-pci is broken)?


More information about the U-Boot mailing list