[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4 06/10] RISC-V: Add Linux load logic

From: Leif Lindholm
Subject: Re: [PATCH v4 06/10] RISC-V: Add Linux load logic
Date: Thu, 17 Jan 2019 14:50:19 +0000
User-agent: NeoMutt/20170113 (1.7.2)

On Thu, Jan 17, 2019 at 01:24:29PM +0100, Daniel Kiper wrote:
> > +static grub_err_t
> > +finalize_params_linux (void)
> > +{
> > +  int node, retval;
> > +
> Please drop this empty line.
> > +  void *fdt;
> > +
> > +  fdt = grub_fdt_load (0x400);
> Why this number? Please define constant or add a comment here.
> Whichever is better. And I can see the same value in ARM64. So,
> maybe it is worth using the same constant here and there. Anyway,
> please fix it somehow.

So, this one is my fault.
It effectively comes down to "the space made available for the chosen
node" - meaning space for the initrd start/end address nodes (and
their associated strings), and now the address-cells node as well.
So we need "some extra space".
(The parameter is the "extra space" that will be dynamically added to
the DT - the static struct is separately accounted for if we're
creating an empty one.)

Since at the point this memory gets allocated we're already very close
to jumping into the kernel, it didn't feel worth trying to calculate
the exact number of bytes needed.

I agree it's ugly. Would you be OK with a centralised


reply via email to

[Prev in Thread] Current Thread [Next in Thread]