Re: [PATCH] efi/loongarch: Reintroduce efi_relocate_kernel() to relocate kernel

From: Ard Biesheuvel
Date: Wed Apr 05 2023 - 06:13:44 EST


On Wed, 5 Apr 2023 at 11:57, Huacai Chen <chenhuacai@xxxxxxxxxx> wrote:
>
> Hi, Ard,
>
> On Wed, Apr 5, 2023 at 4:20 PM Ard Biesheuvel <ardb@xxxxxxxxxx> wrote:
> >
> > On Wed, 5 Apr 2023 at 10:14, Huacai Chen <chenhuacai@xxxxxxxxxx> wrote:
> > >
> > > Hi, Ard,
> > >
> > > What is the status of this patch now?
> > >
> >
> > I'd still like to understand how zboot is affected. It has
> >
> > static unsigned long alloc_preferred_address(unsigned long alloc_size)
> > {
> > #ifdef EFI_KIMG_PREFERRED_ADDRESS
> > efi_physical_addr_t efi_addr = EFI_KIMG_PREFERRED_ADDRESS;
> >
> > if (efi_bs_call(allocate_pages, EFI_ALLOCATE_ADDRESS, EFI_LOADER_DATA,
> > alloc_size / EFI_PAGE_SIZE, &efi_addr) == EFI_SUCCESS)
> > return efi_addr;
> > #endif
> > return ULONG_MAX;
> > }
> >
> > and if I understand you correctly, we never needed this in the first place?
> Technically we don't need this, but I think setting a preferred
> address as before may be better (keeping the default behavior the same
> as before can avoid some unexpected problem).
>

OK makes sense

I have queued this up now, should appear in -next tomorrow.