Re: [PATCH v2 4/4] hw/openrisc/openrisc_sim: Add support for initrd loading

2022-02-17 Thread Stafford Horne
On Thu, Feb 17, 2022 at 06:04:32PM +, Peter Maydell wrote:
> On Thu, 10 Feb 2022 at 13:13, Stafford Horne  wrote:
> >
> > The initrd passed via the command line is loaded into memory.  It's
> > location and size is then added to the device tree so the kernel knows
> > where to find it.
> >
> > Signed-off-by: Stafford Horne 
> > ---
> >  hw/openrisc/openrisc_sim.c | 32 +++-
> >  1 file changed, 31 insertions(+), 1 deletion(-)
> >
> > diff --git a/hw/openrisc/openrisc_sim.c b/hw/openrisc/openrisc_sim.c
> > index d7c26af82c..5354797e20 100644
> > --- a/hw/openrisc/openrisc_sim.c
> > +++ b/hw/openrisc/openrisc_sim.c
> > @@ -187,6 +187,32 @@ static hwaddr openrisc_load_kernel(ram_addr_t ram_size,
> >  return 0;
> >  }
> >
> > +static hwaddr openrisc_load_initrd(Or1ksimState *s, const char *filename,
> > +hwaddr load_start, uint64_t mem_size)
> 
> Indentation here is off.

Ah, I was going off the indentation already in the file.  I will fix this.

i.e. should be:

static hwaddr openrisc_load_initrd(Or1ksimState *s, const char *filename,
   hwaddr load_start, uint64_t mem_size)

That's why its like that everywhere.  I might as well add another patch to fix
up indentation.

>
> Otherwise
> Reviewed-by: Peter Maydell 

Thanks!



Re: [PATCH v2 4/4] hw/openrisc/openrisc_sim: Add support for initrd loading

2022-02-17 Thread Peter Maydell
On Thu, 10 Feb 2022 at 13:13, Stafford Horne  wrote:
>
> The initrd passed via the command line is loaded into memory.  It's
> location and size is then added to the device tree so the kernel knows
> where to find it.
>
> Signed-off-by: Stafford Horne 
> ---
>  hw/openrisc/openrisc_sim.c | 32 +++-
>  1 file changed, 31 insertions(+), 1 deletion(-)
>
> diff --git a/hw/openrisc/openrisc_sim.c b/hw/openrisc/openrisc_sim.c
> index d7c26af82c..5354797e20 100644
> --- a/hw/openrisc/openrisc_sim.c
> +++ b/hw/openrisc/openrisc_sim.c
> @@ -187,6 +187,32 @@ static hwaddr openrisc_load_kernel(ram_addr_t ram_size,
>  return 0;
>  }
>
> +static hwaddr openrisc_load_initrd(Or1ksimState *s, const char *filename,
> +hwaddr load_start, uint64_t mem_size)

Indentation here is off.
Otherwise
Reviewed-by: Peter Maydell 

thanks
-- PMM