Hi Ilias, On Wed, 11 Dec 2024 at 08:08, Ilias Apalodimas <[email protected]> wrote: > > Hi Simon, > > On Wed, 11 Dec 2024 at 15:54, Simon Glass <[email protected]> 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 > > That's interesting. The EFI spec does not define that and I looked as > back as 2.5. > Heinrich, this predates my involvement with EFI, do you remember why > it was added? > > Because it's defined in > > - 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() > > I don't understand the 'pointers' again here. It's a physical address. >
Let's have a call so I can explain this... > > > > As a first step to tidying this up, create a new, private struct to hold > > these fields. > > > > Signed-off-by: Simon Glass <[email protected]> > > --- > > > > (no changes since v2) > > > > Changes in v2: > > - Add new patch to use a separate stuct for memory nodes > > > > lib/efi_loader/efi_memory.c | 49 +++++++++++++++++++++++++++++++------ > > 1 file changed, 42 insertions(+), 7 deletions(-) > > Applied to sjg/master, thanks!

