linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: WANG Xuerui <kernel@xen0n.name>
To: Ard Biesheuvel <ardb@kernel.org>, Huacai Chen <chenhuacai@loongson.cn>
Cc: linux-arch@vger.kernel.org, linux-doc@vger.kernel.org,
	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>,
	Xuerui Wang <kernel@xen0n.name>,
	Jiaxun Yang <jiaxun.yang@flygoat.com>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	linux-efi@vger.kernel.org, WANG Xuerui <git@xen0n.name>,
	Yun Liu <liuyun@loongson.cn>, Jonathan Corbet <corbet@lwn.net>,
	Arnd Bergmann <arnd@arndb.de>, 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>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Steps forward for the LoongArch UEFI bringup patch? (was: Re: [PATCH V14 11/24] LoongArch: Add boot and setup routines)
Date: Thu, 2 Jun 2022 22:09:32 +0800	[thread overview]
Message-ID: <d88ede74-b7a5-e568-1863-107c6c7f5fe0@xen0n.name> (raw)
In-Reply-To: <20220602115141.3962749-12-chenhuacai@loongson.cn>

Hi Ard,

Sorry for sounding particularly rushed and I really don't like rushing 
things either, but as explained in the previous reply [1], what we want 
to do is mainly to get the arch/loongarch into mainline first, 
stabilizing an ABI surface already under heavy testing for many months; 
plus Huacai has removed the questioned kernel version string, and the 
Loongson-specific "boardinfo" sysfs file that doesn't really belong to 
/sys/firmware/efi.

So, would you please clarify and explain how Huacai and I could best 
proceed to hopefully get the *rest* of the port readied for a (late) 
merge window PR? Otherwise much of userspace development would have to 
shift target once more, and many Linux distros would have to carry and 
rebase this big patchset for another 2 months which is real churn.

If some more background is necessary, let me explain a bit more about 
the LoongArch boot protocol peculiarities...

For one thing, the standard EFI stub boot flow is a recent development, 
and has not shipped yet; all currently existing LoongArch systems 
actually implement the previous Loongson-specific boot protocol based on 
"struct bootparamsinterface", or BPI for short, that was carried over 
from the MIPS era. Systems with BPI firmware provide full EFI services 
too, but all pointers in BPI structs are virtual addresses, and the 
memory maps are not provided in the same way as their new firmware. In 
addition to that, all BPI systems launch Linux via a special GRUB2 that 
can only boot ELF files (so cannot chainload an EFI stub), and it's 
unclear whether directly booting an EFI stub would work, so the EFI stub 
logic is not invoked at all but SVAM still have to be executed somehow 
to ensure sanity. All of this means the SVAM oddity will eventually get 
in, regardless of whether we take it out now or not, if the BPI support 
is to be mainlined in the future.

For another thing, it seems Loongson really wanted to support the "PMON" 
use case that wouldn't provide full EFI services but sharing some logic 
with UEFI boot. PMON is one of the MIPS firmware varieties that Loongson 
has supported back in the days, and they seem to have ported it to 
LoongArch as well.

For this, I don't know if Huacai should really just leave those 
modification in the downstream fork to keep the upstream Linux clean of 
such hacks, because to some degree dealing with such notoriety is life, 
it seems to me. I think at this point Huacai would cooperate and tweak 
the patch to get rid of the SVAM and other nonstandard bits as much as 
possible, and I'll help him where necessary too.


[1]: 
https://lore.kernel.org/all/47b559c0-b1e8-e800-0491-2431e2083dad@xen0n.name/


  reply	other threads:[~2022-06-02 14:09 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-02 11:51 [PATCH V14 00/24] arch: Add basic LoongArch support Huacai Chen
2022-06-02 11:51 ` [PATCH V14 01/24] irqchip: Adjust Kconfig for Loongson Huacai Chen
2022-06-02 13:25   ` Marc Zyngier
2022-06-02 16:34   ` Randy Dunlap
2022-06-03  5:04     ` Huacai Chen
2022-06-02 11:51 ` [PATCH V14 02/24] irqchip/loongson-liointc: Fix build error for LoongArch Huacai Chen
2022-06-02 13:24   ` Marc Zyngier
2022-06-02 11:51 ` [PATCH V14 03/24] Documentation: LoongArch: Add basic documentations Huacai Chen
2022-06-03  1:45   ` Bagas Sanjaya
2022-06-03  5:27     ` Huacai Chen
2022-06-03  7:35       ` Bagas Sanjaya
2022-06-03 13:01         ` Huacai Chen
2022-06-02 11:51 ` [PATCH V14 04/24] Documentation/zh_CN: Add basic LoongArch documentations Huacai Chen
2022-06-02 11:51 ` [PATCH V14 05/24] LoongArch: Add ELF-related definitions Huacai Chen
2022-06-02 11:51 ` [PATCH V14 06/24] LoongArch: Add writecombine support for drm Huacai Chen
2022-06-02 11:51 ` [PATCH V14 07/24] LoongArch: Add build infrastructure Huacai Chen
2022-06-02 11:51 ` [PATCH V14 08/24] LoongArch: Add CPU definition headers Huacai Chen
2022-06-02 11:51 ` [PATCH V14 09/24] LoongArch: Add atomic/locking headers Huacai Chen
2022-06-02 11:51 ` [PATCH V14 10/24] LoongArch: Add other common headers Huacai Chen
2022-06-02 11:51 ` [PATCH V14 11/24] LoongArch: Add boot and setup routines Huacai Chen
2022-06-02 14:09   ` WANG Xuerui [this message]
2022-06-02 16:14     ` Steps forward for the LoongArch UEFI bringup patch? (was: Re: [PATCH V14 11/24] LoongArch: Add boot and setup routines) Ard Biesheuvel
2022-06-02 16:29       ` Arnd Bergmann
2022-06-03  5:13         ` Huacai Chen
2022-06-03  9:32     ` Xi Ruoyao
2022-06-03  9:48       ` WANG Xuerui
2022-06-03 10:08         ` Arnd Bergmann
2022-06-02 11:51 ` [PATCH V14 12/24] LoongArch: Add exception/interrupt handling Huacai Chen
2022-06-02 11:51 ` [PATCH V14 13/24] LoongArch: Add process management Huacai Chen
2022-06-02 11:51 ` [PATCH V14 14/24] LoongArch: Add memory management Huacai Chen
2022-06-02 11:51 ` [PATCH V14 15/24] LoongArch: Add system call support Huacai Chen
2022-06-02 11:51 ` [PATCH V14 16/24] LoongArch: Add signal handling support Huacai Chen
2022-06-02 11:51 ` [PATCH V14 17/24] LoongArch: Add ELF and module support Huacai Chen
2022-06-02 11:51 ` [PATCH V14 18/24] LoongArch: Add misc common routines Huacai Chen
2022-06-02 11:51 ` [PATCH V14 19/24] LoongArch: Add some library functions Huacai Chen
2022-06-02 11:51 ` [PATCH V14 20/24] LoongArch: Add VDSO and VSYSCALL support Huacai Chen
2022-06-02 11:51 ` [PATCH V14 21/24] LoongArch: Add multi-processor (SMP) support Huacai Chen
2022-06-02 11:51 ` [PATCH V14 22/24] LoongArch: Add Non-Uniform Memory Access (NUMA) support Huacai Chen
2022-06-02 11:51 ` [PATCH V14 23/24] LoongArch: Add Loongson-3 default config file Huacai Chen
2022-06-02 11:51 ` [PATCH V14 24/24] MAINTAINERS: Add maintainer information for LoongArch 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=d88ede74-b7a5-e568-1863-107c6c7f5fe0@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).