# Re: \[PATCH 05/19\] LoongArch: Add boot and setup routines

- From: Arnd Bergmann \<arnd@arndb.de\>
- Date: 2021-07-27 13:14:28 
- List: linux-arch
- Page: https://ratatoskr.run/linux-arch/2021/07/13337161
- Thread: https://ratatoskr.run/linux-arch/2021/07/13337006/t/2.md

```text
On Tue, Jul 27, 2021 at 2:51 PM Ard Biesheuvel [ref] wrote:
> On Tue, 27 Jul 2021 at 14:41, Arnd Bergmann [ref] wrote:
> > On Tue, Jul 27, 2021 at 1:53 PM Huacai Chen [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
```
