[PATCH v2 10/28] efi_loader: Use a separate struct for memory nodes

Simon Glass sjg at chromium.org
Thu Nov 28 20:11:07 CET 2024


Hi Heinrich,

On Thu, 28 Nov 2024 at 10:06, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
>
> On 28.11.24 16:47, Simon Glass wrote:
> > At present efi_memory uses struct efi_mem_desc for each node of its
> > memory list. This is convenient but is not ideal, since:
> >
> > - it means that the fields are under a 'desc' sub-structure
> > - it includes an unused 'reserved' field
> > - it includes virtual_start which is confusing as it is always the same
> >    as physical_start
> > - we must use u64 to store pointers, since that is how they are returned
> >    by calls to efi_get_memory_map()
> >
> > As a first step to tidying this up, create a new, private struct to hold
> > these fields.
> >
> > Signed-off-by: Simon Glass <sjg at chromium.org>
>
> The EFI memory map should be generated from LMB.

I sort-of agree with that, although it needs to be augmented with
images too. But that will take 2-3 more series to get to.

>
> We should not waste our time on code which shall be removed and possibly
> introduce regressions in the meantime.

I consider it a valuable use of my time, as unfortunately the LMB
stuff is going in the wrong direction, as will become apparent in the
years ahead.

Regards,
Simon


More information about the U-Boot mailing list