From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: Huacai Chen <chenhuacai@loongson.cn>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Len Brown <lenb@kernel.org>, 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>, Jonathan Corbet <corbet@lwn.net>,
Linus Torvalds <torvalds@linux-foundation.org>,
linux-arch <linux-arch@vger.kernel.org>,
Linux Doc Mailing List <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>,
Jiaxun Yang <jiaxun.yang@flygoat.com>,
linux-efi <linux-efi@vger.kernel.org>
Subject: Re: [PATCH V6 09/22] LoongArch: Add boot and setup routines
Date: Sun, 27 Feb 2022 17:40:09 +0100 [thread overview]
Message-ID: <YhupaVZvbipgke2Z@kroah.com> (raw)
In-Reply-To: <CAMj1kXHWRZcjF9H2jZ+p-HNuXyPs-=9B8WiYLsrDJGpipgKo_w@mail.gmail.com>
On Sun, Feb 27, 2022 at 03:14:30PM +0100, Ard Biesheuvel wrote:
> (add Greg and ACPI maintainers)
>
> On Sat, 26 Feb 2022 at 12:11, Huacai Chen <chenhuacai@loongson.cn> wrote:
> >
> > This patch adds basic boot, setup and reset routines for LoongArch.
> > LoongArch uses UEFI-based firmware. The firmware uses ACPI and DMI/
> > SMBIOS to pass configuration information to the Linux kernel (in elf
> > format).
> >
> > Now the boot information passed to kernel is like this:
> > 1, kernel get 3 register values (a0, a1 and a2) from bootloader.
> > 2, a0 is "argc", a1 is "argv", so "kernel cmdline" comes from a0/a1.
> > 3, a2 is "environ", which is a pointer to "struct bootparamsinterface".
> > 4, "struct bootparamsinterface" include a "systemtable" pointer, whose
> > type is "efi_system_table_t". Most configuration information, include
> > ACPI tables and SMBIOS tables, come from here.
> >
> > Cc: Ard Biesheuvel <ardb@kernel.org>
> > Cc: linux-efi@vger.kernel.org
> > Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
> > ---
> > arch/loongarch/include/asm/acenv.h | 17 +
> > arch/loongarch/include/asm/acpi.h | 38 ++
> > arch/loongarch/include/asm/boot_param.h | 97 +++++
> > arch/loongarch/include/asm/bootinfo.h | 33 ++
> > arch/loongarch/include/asm/dmi.h | 24 ++
> > arch/loongarch/include/asm/efi.h | 33 ++
> > arch/loongarch/include/asm/fw.h | 18 +
> > arch/loongarch/include/asm/reboot.h | 10 +
> > arch/loongarch/include/asm/setup.h | 21 +
> > arch/loongarch/kernel/acpi.c | 338 ++++++++++++++++
> > arch/loongarch/kernel/cacheinfo.c | 122 ++++++
> > arch/loongarch/kernel/cmdline.c | 31 ++
> > arch/loongarch/kernel/cpu-probe.c | 305 +++++++++++++++
> > arch/loongarch/kernel/efi.c | 208 ++++++++++
> > arch/loongarch/kernel/env.c | 176 +++++++++
> > arch/loongarch/kernel/head.S | 72 ++++
> > arch/loongarch/kernel/mem.c | 89 +++++
> > arch/loongarch/kernel/reset.c | 90 +++++
> > arch/loongarch/kernel/setup.c | 495 ++++++++++++++++++++++++
> > arch/loongarch/kernel/time.c | 220 +++++++++++
> > arch/loongarch/kernel/topology.c | 13 +
> > 21 files changed, 2450 insertions(+)
>
> As I pointed out in response to an earlier revision of this code, I
> don't think we should merge this until we decide on some ground rules
> regarding the support level of this architecture in the UEFI and ACPI
> subsystems.
>
> The problem is that loongarch does not exist in the ACPI or UEFI
> specifications at all, and as I understand it, the firmware
> implementations themselves do not implement UEFI or ACPI entirely,
> they simply present data structures in memory that look similar enough
> for the Linux UEFI and ACPI code to boot the OS.
Why isn't this in the ACPI/UEFI specs? Is it a lack of access to the
spec groups by the comapny making these devices, or something else?
> As the UEFI subsystem maintainer, I am concerned that future changes
> to the UEFI subsystem that are rooted in the the UEFI specification as
> it evolves may trigger unanticipated results on this architecture, and
> I imagine the ACPI maintainers may have similar concerns.
I agree, I would be concerned about that as well.
> So what can we do about this? Do we merge this code, but as a second
> class citizen in terms of UEFI/ACPI subsystem support, i.e., you are
> welcome to use it, but if something breaks, the UEFI/ACPI maintainers
> are not on the hook to see to it that it gets fixed? I don't think
> this is a great solution, but I'm not sure if there are alternatives
> that are any better.
That's not going to work, it's the kernel's job to fix up hardware
problems. But as this is all firmware, why can't the firmware be
changed to properly follow the public specifications? What's wrong with
requiring that at this point in time (i.e. _BEFORE_ the code is merged)?
thanks,
greg k-h
next prev parent reply other threads:[~2022-02-27 16:40 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-26 11:03 [PATCH V6 00/22] arch: Add basic LoongArch support Huacai Chen
2022-02-26 11:03 ` [PATCH V6 01/22] Documentation: LoongArch: Add basic documentations Huacai Chen
2022-02-26 11:03 ` [PATCH V6 02/22] Documentation/zh_CN: Add basic LoongArch documentations Huacai Chen
2022-02-26 11:03 ` [PATCH V6 03/22] LoongArch: Add elf-related definitions Huacai Chen
2022-02-26 11:03 ` [PATCH V6 04/22] LoongArch: Add writecombine support for drm Huacai Chen
2022-02-26 11:03 ` [PATCH V6 05/22] LoongArch: Add build infrastructure Huacai Chen
2022-02-26 11:03 ` [PATCH V6 06/22] LoongArch: Add CPU definition headers Huacai Chen
2022-02-26 11:03 ` [PATCH V6 07/22] LoongArch: Add atomic/locking headers Huacai Chen
2022-02-26 11:03 ` [PATCH V6 08/22] LoongArch: Add other common headers Huacai Chen
2022-02-26 11:03 ` [PATCH V6 09/22] LoongArch: Add boot and setup routines Huacai Chen
2022-02-27 14:14 ` Ard Biesheuvel
2022-02-27 16:40 ` Greg Kroah-Hartman [this message]
2022-02-28 6:34 ` Huacai Chen
2022-02-28 8:09 ` Ard Biesheuvel
2022-02-28 8:38 ` Huacai Chen
2022-02-28 8:51 ` Ard Biesheuvel
2022-02-28 10:42 ` Huacai Chen
2022-02-28 11:24 ` Arnd Bergmann
2022-02-28 11:35 ` Ard Biesheuvel
2022-03-01 4:17 ` Huacai Chen
2022-03-01 10:18 ` Arnd Bergmann
2022-03-02 8:56 ` Huacai Chen
2022-03-02 8:58 ` Ard Biesheuvel
2022-03-02 9:20 ` Huacai Chen
2022-03-03 7:26 ` Huacai Chen
2022-03-03 9:54 ` Ard Biesheuvel
2022-03-04 10:23 ` Huacai Chen
2022-03-03 11:41 ` Mike Rapoport
2022-03-03 14:47 ` Huacai Chen
2022-03-04 10:49 ` Mike Rapoport
2022-03-04 12:43 ` Huacai Chen
2022-03-07 17:37 ` Mike Rapoport
2022-03-08 5:01 ` Huacai Chen
2022-02-26 11:03 ` [PATCH V6 10/22] LoongArch: Add exception/interrupt handling Huacai Chen
2022-02-26 11:03 ` [PATCH V6 11/22] LoongArch: Add process management Huacai Chen
2022-02-26 11:03 ` [PATCH V6 12/22] LoongArch: Add memory management Huacai Chen
2022-03-03 16:16 ` Mike Rapoport
2022-03-04 10:12 ` Huacai Chen
2022-02-26 11:03 ` [PATCH V6 13/22] LoongArch: Add system call support Huacai Chen
2022-02-26 11:03 ` [PATCH V6 14/22] LoongArch: Add signal handling support Huacai Chen
2022-02-26 11:03 ` [PATCH V6 15/22] LoongArch: Add elf and module support Huacai Chen
2022-02-26 11:03 ` [PATCH V6 16/22] LoongArch: Add misc common routines Huacai Chen
2022-02-26 11:03 ` [PATCH V6 17/22] LoongArch: Add some library functions Huacai Chen
2022-02-26 11:03 ` [PATCH V6 18/22] LoongArch: Add PCI controller support Huacai Chen
2022-02-26 11:03 ` [PATCH V6 19/22] LoongArch: Add VDSO and VSYSCALL support Huacai Chen
2022-02-26 11:03 ` [PATCH V6 20/22] LoongArch: Add multi-processor (SMP) support Huacai Chen
2022-02-26 11:03 ` [PATCH V6 21/22] LoongArch: Add Non-Uniform Memory Access (NUMA) support Huacai Chen
2022-02-26 11:03 ` [PATCH V6 22/22] LoongArch: Add Loongson-3 default config file 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=YhupaVZvbipgke2Z@kroah.com \
--to=gregkh@linuxfoundation.org \
--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=jiaxun.yang@flygoat.com \
--cc=lenb@kernel.org \
--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=lixuefeng@loongson.cn \
--cc=luto@kernel.org \
--cc=peterz@infradead.org \
--cc=rafael@kernel.org \
--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).