On Tue, Jul 27, 2021 at 2:51 PM Ard Biesheuvel [off-list ref] wrote:
On Tue, 27 Jul 2021 at 14:41, Arnd Bergmann [off-list ref] wrote:
quoted
On Tue, Jul 27, 2021 at 1:53 PM Huacai Chen [off-list ref] wrote:
As far as I understand it, this should be using the kernel's UEFI stub
as documented in Documentation/admin-guide/efi-stub.rst
That document describes how the EFI stub can load an initrd from the
partition that the kernel image itself was loaded from.
After loading it, the EFI stub still needs to tell the kernel proper
where the initrd lives in memory, and it uses either struct bootparam
(x86) or DT's /chosen node (other arches) for this.
I think we should avoid inventing yet another way of passing this
information, but if the architecture in question does not use DT (and
is != x86), I don't think we have a choice.
Ok, I see.
Would the existing early_param("initrd", early_initrd); in
init/do_mounts_initrd.c work for this then? This would be
similar to the proposed rd_start()/rd_size() early_parem
additions, but use architecture-independent code.
How is other information passed from grub to the efi stub
and from there to the kernel on loongarch?
I suppose at the minimum we need memory regions, ACPI
tables, and command line, in addition to the initrd.
Arnd