Re: [PATCH v2] efi/loongarch: Directly position the loaded image file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 19 Dec 2023 at 10:30, Ard Biesheuvel <ardb@xxxxxxxxxx> wrote:
>
> On Tue, 19 Dec 2023 at 10:27, Ainux Wang <ainux.wang@xxxxxxxxx> wrote:
> >
> > Ard Biesheuvel <ardb@xxxxxxxxxx> 于2023年12月19日周二 17:22写道:
> > >
> > > On Tue, 19 Dec 2023 at 10:14, <wangyao@xxxxxxxxxx> wrote:
> > > >
> > > > From: Wang Yao <wangyao@xxxxxxxxxx>
> > > >
> > > > The use of the 'kernel_offset' variable to position the image file that
> > > > has been loaded by UEFI or GRUB is unnecessary, because we can directly
> > > > position the loaded image file through using the image_base field of the
> > > > efi_loaded_image struct provided by UEFI.
> > > >
> > > > Replace kernel_offset with image_base to positon the image file that has
> > > > been loaded by UEFI or GRUB.
> > > >
> > > > Signed-off-by: Wang Yao <wangyao@xxxxxxxxxx>
> > > > ---
> > > >
> > > > v1->v2:
> > > > Rewrite the commit log include 'why', not just include 'how'.
> > > >
> > > >  arch/loongarch/include/asm/efi.h              | 2 --
> > > >  arch/loongarch/kernel/head.S                  | 1 -
> > > >  arch/loongarch/kernel/image-vars.h            | 1 -
> > > >  arch/loongarch/kernel/vmlinux.lds.S           | 1 -
> > > >  drivers/firmware/efi/libstub/loongarch-stub.c | 9 +++++----
> > > >  drivers/firmware/efi/libstub/loongarch-stub.h | 4 ++++
> > > >  drivers/firmware/efi/libstub/loongarch.c      | 6 ++++--
> > > >  7 files changed, 13 insertions(+), 11 deletions(-)
> > > >  create mode 100644 drivers/firmware/efi/libstub/loongarch-stub.h
> > > >
> > > > diff --git a/arch/loongarch/include/asm/efi.h b/arch/loongarch/include/asm/efi.h
> > > > index 91d81f9730ab..eddc8e79b3fa 100644
> > > > --- a/arch/loongarch/include/asm/efi.h
> > > > +++ b/arch/loongarch/include/asm/efi.h
> > > > @@ -32,6 +32,4 @@ static inline unsigned long efi_get_kimg_min_align(void)
> > > >
> > > >  #define EFI_KIMG_PREFERRED_ADDRESS     PHYSADDR(VMLINUX_LOAD_ADDRESS)
> > > >
> > > > -unsigned long kernel_entry_address(unsigned long kernel_addr);
> > > > -
> > >
> > > Why are you removing this? Won't that cause missing prototype warnings?
> > >
> > > The rest of the patch looks fine to me, but I haven't tested it.
> > >
> >
> > Because the efi_loaded_image_t struct is defined in the efistub.h.
> >
>
> And the other question?

OK, you replied to me in private

> So move the kernel_entry_address to the
> drivers/firmware/efi/libstub/loongarch-stub.h
>

which I missed when looking at the patch. So no, this should not cause
missing prototypes warnings.

I'll queue this up.

Thanks,





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux