Re: [PATCH V6 09/22] LoongArch: Add boot and setup routines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



(add Greg and ACPI maintainers)

On Sat, 26 Feb 2022 at 12:11, Huacai Chen <chenhuacai@xxxxxxxxxxx> 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@xxxxxxxxxx>
> Cc: linux-efi@xxxxxxxxxxxxxxx
> Signed-off-by: Huacai Chen <chenhuacai@xxxxxxxxxxx>
> ---
>  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.

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.

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.

Thoughts, please?

-- 
Ard.



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux