From: WANG Xuerui <kernel@xen0n.name>
To: Arnd Bergmann <arnd@arndb.de>, WANG Xuerui <kernel@xen0n.name>
Cc: Ard Biesheuvel <ardb@kernel.org>,
Huacai Chen <chenhuacai@loongson.cn>,
Andy Lutomirski <luto@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>,
Andrew Morton <akpm@linux-foundation.org>,
David Airlie <airlied@linux.ie>, Jonathan Corbet <corbet@lwn.net>,
Linus Torvalds <torvalds@linux-foundation.org>,
linux-arch <linux-arch@vger.kernel.org>,
"open list:DOCUMENTATION" <linux-doc@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Xuefeng Li <lixuefeng@loongson.cn>,
Yanteng Si <siyanteng@loongson.cn>,
Huacai Chen <chenhuacai@gmail.com>, Guo Ren <guoren@kernel.org>,
Jiaxun Yang <jiaxun.yang@flygoat.com>,
Stephen Rothwell <sfr@canb.auug.org.au>,
linux-efi <linux-efi@vger.kernel.org>,
WANG Xuerui <git@xen0n.name>, Yun Liu <liuyun@loongson.cn>
Subject: Re: [PATCH V15 11/24] LoongArch: Add boot and setup routines
Date: Fri, 3 Jun 2022 18:37:07 +0800 [thread overview]
Message-ID: <fcdbe7bd-bb4a-fc50-a96d-c2dd1456bc9b@xen0n.name> (raw)
In-Reply-To: <CAK8P3a2mW7KmgxqWsaf76Q4V++B+0e6bH=tb4w4cA0XkZYuSLA@mail.gmail.com>
On 6/3/22 18:02, Arnd Bergmann wrote:
> On Fri, Jun 3, 2022 at 11:27 AM WANG Xuerui <kernel@xen0n.name> wrote:
>> On 6/3/22 15:20, Huacai Chen wrote:
>>> Add basic boot, setup and reset routines for LoongArch. Now, LoongArch
>>> machines use UEFI-based firmware. The firmware passes configuration
>>> information to the kernel via ACPI and DMI/SMBIOS.
>>>
>>> Currently an existing interface between the kernel and the bootloader
>>> is implemented. Kernel gets 2 values from the bootloader, passed in
>>> registers a0 and a1; a0 is an "EFI boot flag" distinguishing UEFI and
>>> non-UEFI firmware, while a1 is a pointer to an FDT with systable,
>>> memmap, cmdline and initrd information.
>>>
>>> The standard UEFI boot protocol (EFISTUB) will be added later.
>>>
>>> Cc: linux-efi@vger.kernel.org
>>> Cc: Ard Biesheuvel <ardb@kernel.org>
>>> Reviewed-by: WANG Xuerui <git@xen0n.name>
>>> Reviewed-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
>>> Co-developed-by: Yun Liu <liuyun@loongson.cn>
>>> Signed-off-by: Yun Liu <liuyun@loongson.cn>
>>> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
>> Would you please look at this patch, which has all the arch-independent
>> changes backed out, and Ack if it is fit for mainlining?
>>
>> I communicated a little with Huacai about the approach for supporting
>> alternative boot protocols down the road, and we agreed to carry the
>> respective changes downstream. And if needs truly arise for modifying
>> common EFI logic, we can do so in a non-rushed manner later.
>>
>> For the current status of the code, apparently it just accepts the
>> standard efistub-shape FDT pointer from (whatever booting the image),
>> and everything onwards are fully using the common code without
>> modification as you can see from the diffstat. I rebased my BPI support
>> patch on top of this (basically translating Loongson BPI data structures
>> into the expected FDT form), and can confirm the boot can progress to
>> the same point as before -- indeed the SVAM changes etc. are not
>> necessary for a working system, and the code remains working.
> I'm a bit lost here: Does this mean the v15 version is back to the old
> pre-efistub interface and allows booting with existing firmware, or
> is it now left out completely? I still see a kernel_entry() function
> in head.S, and I see references to loongson_sysconf, but I don't
> see if that is what gets passed in from the bootloader.
It's not the same interface as in some of the very early revisions; the
earlier versions relied on "struct bootparamsinterface" or BPI, while
it's the same FDT-based interface to initialize EFI from, as in
arch/arm64 and arch/riscv I believe. No Loongson-specific things remain now.
>
> I really want to make sure that without the EFI stub, there is no
> other way to boot the kernel that would have to get maintained
> in the long run.
Yeah this is the case right now. No LoongArch bootloader that I know of
can prepare the EFI stub-shaped FDT that the current code expects, and I
don't know of any future Loongson plan to do that either (Loongson's
previous in-house efforts all looked something different). So it's
pretty safe to say the current code wouldn't get frozen once mainlined.
>
> Arnd
next prev parent reply other threads:[~2022-06-03 10:37 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-03 7:20 [PATCH V15 00/24] arch: Add basic LoongArch support Huacai Chen
2022-06-03 7:20 ` [PATCH V15 01/24] irqchip: Adjust Kconfig for Loongson Huacai Chen
2022-06-03 7:20 ` [PATCH V15 02/24] irqchip/loongson-liointc: Fix build error for LoongArch Huacai Chen
2022-06-03 7:20 ` [PATCH V15 03/24] Documentation: LoongArch: Add basic documentations Huacai Chen
2022-06-03 7:20 ` [PATCH V15 04/24] Documentation/zh_CN: Add basic LoongArch documentations Huacai Chen
2022-06-03 7:20 ` [PATCH V15 05/24] LoongArch: Add ELF-related definitions Huacai Chen
2022-06-03 7:20 ` [PATCH V15 06/24] LoongArch: Add writecombine support for drm Huacai Chen
2022-06-03 7:20 ` [PATCH V15 07/24] LoongArch: Add build infrastructure Huacai Chen
2022-06-03 7:20 ` [PATCH V15 08/24] LoongArch: Add CPU definition headers Huacai Chen
2022-06-03 7:20 ` [PATCH V15 09/24] LoongArch: Add atomic/locking headers Huacai Chen
2022-06-03 7:20 ` [PATCH V15 10/24] LoongArch: Add other common headers Huacai Chen
2022-06-03 13:40 ` Jason A. Donenfeld
2022-06-03 13:55 ` Arnd Bergmann
2022-06-03 14:01 ` Jason A. Donenfeld
2022-06-03 14:14 ` WANG Xuerui
2022-06-03 14:35 ` Huacai Chen
2022-06-04 6:38 ` Jason A. Donenfeld
2022-06-03 7:20 ` [PATCH V15 11/24] LoongArch: Add boot and setup routines Huacai Chen
2022-06-03 9:27 ` WANG Xuerui
2022-06-03 10:02 ` Arnd Bergmann
2022-06-03 10:37 ` WANG Xuerui [this message]
2022-06-03 11:48 ` Ard Biesheuvel
2022-06-03 7:20 ` [PATCH V15 12/24] LoongArch: Add exception/interrupt handling Huacai Chen
2022-06-03 7:20 ` [PATCH V15 13/24] LoongArch: Add process management Huacai Chen
2022-06-03 7:20 ` [PATCH V15 14/24] LoongArch: Add memory management Huacai Chen
2022-06-03 7:20 ` [PATCH V15 15/24] LoongArch: Add system call support Huacai Chen
2022-06-03 7:20 ` [PATCH V15 16/24] LoongArch: Add signal handling support Huacai Chen
2022-06-03 7:20 ` [PATCH V15 17/24] LoongArch: Add ELF and module support Huacai Chen
2022-06-03 7:20 ` [PATCH V15 18/24] LoongArch: Add misc common routines Huacai Chen
2022-06-03 7:20 ` [PATCH V15 19/24] LoongArch: Add some library functions Huacai Chen
2022-06-03 7:20 ` [PATCH V15 20/24] LoongArch: Add VDSO and VSYSCALL support Huacai Chen
2022-06-03 7:20 ` [PATCH V15 21/24] LoongArch: Add multi-processor (SMP) support Huacai Chen
2022-06-03 7:20 ` [PATCH V15 22/24] LoongArch: Add Non-Uniform Memory Access (NUMA) support Huacai Chen
2022-06-03 7:20 ` [PATCH V15 23/24] LoongArch: Add Loongson-3 default config file Huacai Chen
2022-06-03 7:20 ` [PATCH V15 24/24] MAINTAINERS: Add maintainer information for LoongArch Huacai Chen
2022-06-03 9:14 ` [PATCH V15 00/24] arch: Add basic LoongArch support WANG Xuerui
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=fcdbe7bd-bb4a-fc50-a96d-c2dd1456bc9b@xen0n.name \
--to=kernel@xen0n.name \
--cc=airlied@linux.ie \
--cc=akpm@linux-foundation.org \
--cc=ardb@kernel.org \
--cc=arnd@arndb.de \
--cc=chenhuacai@gmail.com \
--cc=chenhuacai@loongson.cn \
--cc=corbet@lwn.net \
--cc=git@xen0n.name \
--cc=guoren@kernel.org \
--cc=jiaxun.yang@flygoat.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liuyun@loongson.cn \
--cc=lixuefeng@loongson.cn \
--cc=luto@kernel.org \
--cc=peterz@infradead.org \
--cc=sfr@canb.auug.org.au \
--cc=siyanteng@loongson.cn \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).