All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ardb@kernel.org>
To: Huacai Chen <chenhuacai@kernel.org>
Cc: linux-efi <linux-efi@vger.kernel.org>,
	loongarch@lists.linux.dev,  Arnd Bergmann <arnd@arndb.de>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	 Huacai Chen <chenhuacai@loongson.cn>,
	Xi Ruoyao <xry111@xry111.site>
Subject: Re: [PATCH v2 8/8] efi/loongarch: libstub: remove dependency on flattened DT
Date: Thu, 22 Sep 2022 15:51:56 +0200	[thread overview]
Message-ID: <CAMj1kXF8JOuTSZONzF20Qz6xhrou7puwjWMK8z7u7aDg1yGBkg@mail.gmail.com> (raw)
In-Reply-To: <CAMj1kXH_vWCxr1r1j7kJ43PcmgAUeuf=QdrbXU2fanEgeCTTgQ@mail.gmail.com>

On Thu, 22 Sept 2022 at 15:19, Ard Biesheuvel <ardb@kernel.org> wrote:
>
> On Thu, 22 Sept 2022 at 15:18, Ard Biesheuvel <ardb@kernel.org> wrote:
> >
> > On Thu, 22 Sept 2022 at 15:12, Huacai Chen <chenhuacai@kernel.org> wrote:
> > >
> > > On Thu, Sep 22, 2022 at 9:10 PM Ard Biesheuvel <ardb@kernel.org> wrote:
> > > >
> > > > On Thu, 22 Sept 2022 at 15:09, Huacai Chen <chenhuacai@kernel.org> wrote:
> > > > >
> > > > > On Thu, Sep 22, 2022 at 8:50 PM Ard Biesheuvel <ardb@kernel.org> wrote:
> > > > > >
> > > > > > On Thu, 22 Sept 2022 at 14:08, Huacai Chen <chenhuacai@kernel.org> wrote:
> > > > > > >
> > > > > > > Hi, Ard,
> > > > > > >
> > > > > > > On Thu, Sep 22, 2022 at 4:59 PM Ard Biesheuvel <ardb@kernel.org> wrote:
> > > > > > > >
> > > > > > > > On Thu, 22 Sept 2022 at 09:42, Huacai Chen <chenhuacai@kernel.org> wrote:
> > > > > > > > >
> > > > > > > > > On Thu, Sep 22, 2022 at 3:25 PM Ard Biesheuvel <ardb@kernel.org> wrote:
> > > > > > > > > >
> > > > > > > > > > On Thu, 22 Sept 2022 at 09:22, Huacai Chen <chenhuacai@kernel.org> wrote:
> > > > > > > > > > >
> > > > > > > > > > > On Thu, Sep 22, 2022 at 3:13 PM Ard Biesheuvel <ardb@kernel.org> wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > On Thu, 22 Sept 2022 at 04:15, Huacai Chen <chenhuacai@kernel.org> wrote:
> > > > > > > > > > > > >
> > > > > > > > > > > > > On Wed, Sep 21, 2022 at 4:15 PM Ard Biesheuvel <ardb@kernel.org> wrote:
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > On Wed, 21 Sept 2022 at 06:02, Huacai Chen <chenhuacai@kernel.org> wrote:
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Acked-by: Huacai Chen <chenhuacai@loongson.cn>
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Thank you Huacai
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > I have created a separate tag with these patches applied onto the
> > > > > > > > > > > > > > first loongarch efi enablement patch (see below)
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > I would prefer to keep the loongarch trees separate for the next merge
> > > > > > > > > > > > > > window, but if needed to avoid massive conflicts, you could merge the
> > > > > > > > > > > > > > tag into the loongarch tree and rebase your changes on top. But please
> > > > > > > > > > > > > > take care not to rebase those patches themselves: the commit SHAs need
> > > > > > > > > > > > > > to remain the same.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > However, if the conflicts are only minor, you can just explain in your
> > > > > > > > > > > > > > PR to Linus what the resolution should look like.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > The tag can be found here:
> > > > > > > > > > > > > > https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git/tag/?h=efi-loongarch-for-v6.1-2
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > I have merged this into the EFI tree as well and pushed it out; it
> > > > > > > > > > > > > > should appear in -next tomorrow.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > b093dc55ba9a efi/loongarch: libstub: remove dependency on flattened DT
> > > > > > > > > > > > > > 102faf0747c2 efi: libstub: install boot-time memory map as config table
> > > > > > > > > > > > > > 7318926e7bc9 efi: libstub: remove DT dependency from generic stub
> > > > > > > > > > > > > > 7cb6671e3caa efi: libstub: unify initrd loading between architectures
> > > > > > > > > > > >
> > > > > > > > > > > > I will have to respin the initrd patch, unfortunately, as it breaks
> > > > > > > > > > > > x86. So the signed tag will be updated, and the SHAs above will change
> > > > > > > > > > > > as well.
> > > > > > > > > > > Emm, initrd is also broken on LoongArch, the core kernel gets an
> > > > > > > > > > > EFI_INVALID_TABLE_ADDR address.
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > OK, I will investigate. This was working fine before so I'm not sure
> > > > > > > > > > what happened there.
> > > > > > > > > >
> > > > > > > >
> > > > > > > > I cannot reproduce this. Can you reproduce it with qemu? If so, can
> > > > > > > > you share your command line and .config etc?
> > > > > > > In qemu we also OK, but on a real machine efistub fails at
> > > > > > > efi_bs_call(locate_device_path, &lf2_proto_guid, &dp, &handle), maybe
> > > > > > > our UEFI BIOS has some problems? On a real machine we use grub and
> > > > > > > there is no "initrd" command in UEFI shell.
> > > > > > >
> > > > > >
> > > > > > Ah ok, so i guess your GRUB lacks the LoadFile2 patches?
> > > > > >
> > > > > > https://lists.gnu.org/archive/html/grub-devel/2022-09/msg00057.html
> > > > > Maybe it is a GRUB problem (I'll discuss with GRUB team), but why
> > > > > without this series the GRUB can load initrd? Because in the old way
> > > > > UEFI BIOS fill initrd information to FDT?
> > > > >
> > > >
> > > > No GRUB loads the initrd and creates a DT with a /chosen node to
> > > > record the initrd base and size.
> > > Without this series, efistub also fails at
> > > efi_bs_call(locate_device_path, &lf2_proto_guid, &dp, &handle), but
> > > initrd works well, this makes me puzzled.
> > >
> >
> > That is because you don't have DTB support in the core kernel yet right?
>
> Never mind - what exact commit are you testing this with?

OK, so the existing code only does

early_init_dt_scan(fdt_ptr);
early_init_fdt_reserve_self();
efi_system_table = efi_get_fdt_params(&data);

so it never parses the /chosen node, and therefore does not discover the initrd.

I suppose you may have been running with the loongson-2k patches?

But actually, this describes exactly the problem that I am addressing
with this series: you have been inadvertently relying on DT hardware
support for initrd functionality ...

  reply	other threads:[~2022-09-22 13:52 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-20 18:35 [PATCH v2 0/8] efi: disentangle the generic EFI stub from FDT Ard Biesheuvel
2022-09-20 18:35 ` [PATCH v2 1/8] efi: libstub: drop pointless get_memory_map() call Ard Biesheuvel
2022-09-20 18:35 ` [PATCH v2 2/8] efi: libstub: avoid efi_get_memory_map() for allocating the virt map Ard Biesheuvel
2022-09-20 18:35 ` [PATCH v2 3/8] efi: libstub: simplify efi_get_memory_map() and struct efi_boot_memmap Ard Biesheuvel
2022-09-20 18:35 ` [PATCH v2 4/8] efi: libstub: remove pointless goto kludge Ard Biesheuvel
2022-09-20 18:35 ` [PATCH v2 5/8] efi: libstub: unify initrd loading between architectures Ard Biesheuvel
2022-09-20 18:35 ` [PATCH v2 6/8] efi: libstub: remove DT dependency from generic stub Ard Biesheuvel
2022-09-20 18:35 ` [PATCH v2 7/8] efi: libstub: install boot-time memory map as config table Ard Biesheuvel
2022-09-20 18:35 ` [PATCH v2 8/8] efi/loongarch: libstub: remove dependency on flattened DT Ard Biesheuvel
2022-09-21  4:00   ` Huacai Chen
2022-09-21  8:14     ` Ard Biesheuvel
2022-09-22  2:15       ` Huacai Chen
2022-09-22  7:12         ` Ard Biesheuvel
2022-09-22  7:21           ` Huacai Chen
2022-09-22  7:24             ` Ard Biesheuvel
2022-09-22  7:41               ` Huacai Chen
2022-09-22  8:59                 ` Ard Biesheuvel
2022-09-22 12:07                   ` Huacai Chen
2022-09-22 12:50                     ` Ard Biesheuvel
2022-09-22 12:57                       ` Ard Biesheuvel
2022-09-22 13:08                       ` Huacai Chen
2022-09-22 13:10                         ` Ard Biesheuvel
2022-09-22 13:12                           ` Huacai Chen
2022-09-22 13:18                             ` Ard Biesheuvel
2022-09-22 13:19                               ` Ard Biesheuvel
2022-09-22 13:51                                 ` Ard Biesheuvel [this message]
2022-09-22 14:48                                   ` Huacai Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMj1kXF8JOuTSZONzF20Qz6xhrou7puwjWMK8z7u7aDg1yGBkg@mail.gmail.com \
    --to=ardb@kernel.org \
    --cc=arnd@arndb.de \
    --cc=chenhuacai@kernel.org \
    --cc=chenhuacai@loongson.cn \
    --cc=ilias.apalodimas@linaro.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=loongarch@lists.linux.dev \
    --cc=xry111@xry111.site \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.