[PATCH v4 00/25] efi: Tidy up confusion between pointers and addresses

Simon Glass sjg at chromium.org
Wed Dec 4 16:13:10 CET 2024


Hi Ilias,

On Wed, 4 Dec 2024 at 07:46, Ilias Apalodimas
<ilias.apalodimas at linaro.org> wrote:
>
> Hi Simon,
>
> On Sun, Dec 01, 2024 at 08:24:19AM -0700, Simon Glass wrote:
> > The EFI-loader implementation converts things back and forth between
> > addresses and pointers, with not much consistency in how this is done.
> >
> > Within most of U-Boot a pointer is a void * and an address is a ulong
> >
> > This convention is very helpful, since it is obvious in common code as
> > to whether you need to call map_sysmem() and friends, or not.
> >
> > As part of cleaning up the EFI memory-management, I found it almost
> > impossible to know in some cases whether something is an address or a
> > pointer. I decided to give up on that and come back to it when this is
> > resolved.
> >
> > This series starts applying the normal ulong/void * convention to the
> > EFI_loader code, so making things easier to follow. For now, u64 is
> > often used instead of ulong, but the effect is the same.
> >
> > The main changes are:
> > - Rather than using the external struct efi_mem_desc data-structure for
> >   internal bookkeeping, create a new one, so it can have different
> >   semantics
> > - Within efi_memory.c addresses are used, rather than addresses
> >   masquerading as pointers. The conversions are done in efi_boottime
> >
> > Link: https://lore.kernel.org/u-boot/20240725135629.3505072-1-sjg@chromium.org/
>
> In v3 I did ask you to run SCT and spent some time on IRC to explain how to
> run it.
> The existing code passes all tests related to memory allocations.
> This patch introduced 99 failures in MemoryAllocationServicesTest.
> Apart from all the other feedback, SCT must pass.

Hmm I must be doing something wrong, as it passed for me. I'll try again.

Regards,
Simon


More information about the U-Boot mailing list