On Thursday, March 13th, 2025 at 11:11 AM, Ard Biesheuvel <[email protected]> wrote:
> > > On Thu, 13 Mar 2025 at 18:27, Ben Schneider [email protected] wrote: > > > Hi Ilias, > > > > On Thursday, March 13th, 2025 at 2:35 AM, Ilias Apalodimas > > [email protected] wrote: > > > > > Can you apply > > > https://source.denx.de/u-boot/custodians/u-boot-tpm/-/commit/b04e708c615c15423ffc80d73430bf2d36fb7c21 > > > and see if it fixes your problem? > > > > With this patch applied, efi_zboot_entry() appears to proceed to > > __decompress() using target = 0 (first entry on my device), but > > then I get the following messages: > > > > EFI stub: ERROR: EFI decompressor: Out of memory while allocating output > > buffer > > EFI stub: ERROR: EFI decompressor: Decompression failed > > efi_free_pages: illegal free 0x0, 0x1140 > > > Seems like the compression code gets confused by a buffer residing at > memory address 0x0. > > Could you try the below please? > > --- a/drivers/firmware/efi/libstub/randomalloc.c > +++ b/drivers/firmware/efi/libstub/randomalloc.c > @@ -75,6 +75,9 @@ > if (align < EFI_ALLOC_ALIGN) > align = EFI_ALLOC_ALIGN; > > + if (alloc_min == 0) > + alloc_min = align; > + > size = round_up(size, EFI_ALLOC_ALIGN); > > /* count the suitable slots in each memory map entry */ That did it! With both the patch for U-Boot and this one for the kernel applied, everything works perfectly. Ben

