On Thu, 31 Jan 2019 at 16:05, Leif Lindholm <leif.lindh...@linaro.org> wrote:
>
> On Wed, Jan 30, 2019 at 08:39:43PM +0100, Ard Biesheuvel wrote:
> > Expose the SoC's RNG peripheral via the EFI_RNG_PROTOCOL.
> > This is used by Linux to seed the KASLR routines.
> >
> > Contributed-under: TianoCore Contribution Agreement 1.1
> > Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org>
>
> Not tested, but looks fine. Only question: could we add those few
> #defines to IndustryStandard/Bcm2836.h (should that really be
> #IndustryStandard, btw?) rather than creating a tiny standalone one?
> (more below)
>

Sure.

Re IndustryStandard/, I deliberately chose something idiomatic for
EDK2, and this is the least inappropriate one. I could live with
Chipset/ as well, but dumping headers under Include/ directly is not
the solution IMO.

> > ---
> >  Silicon/Broadcom/Bcm283x/Drivers/RngDxe/RngDxe.c               | 204 
> > ++++++++++++++++++++
> >  Silicon/Broadcom/Bcm283x/Drivers/RngDxe/RngDxe.inf             |  45 +++++
> >  Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836Rng.h |  26 +++
> >  3 files changed, 275 insertions(+)
> >
>
> > diff --git a/Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836Rng.h 
> > b/Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836Rng.h
> > new file mode 100644
> > index 000000000000..8274e2fe8f77
> > --- /dev/null
> > +++ b/Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836Rng.h
> > @@ -0,0 +1,26 @@
> > + /** @file
> > + *
> > + *  Copyright (c) 2019 Linaro, Ltd. All rights reserved.
> > + *
> > + *  This program and the accompanying materials
> > + *  are licensed and made available under the terms and conditions of the 
> > BSD License
> > + *  which accompanies this distribution.  The full text of the license may 
> > be found at
> > + *  http://opensource.org/licenses/bsd-license.php
> > + *
> > + *  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
> > + *  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR 
> > IMPLIED.
> > + *
> > + **/
> > +
> > +#ifndef __BCM2836_RNG_H__
> > +#define __BCM2836_RNG_H__
> > +
> > +#define RNG_BASE_ADDRESS   (BCM2836_SOC_REGISTERS + 0x00104000)
>
> If we can't, this file needs to pull in Bcm2836.h anyway.
>

Yep.
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to