linux/arch/loongarch/kernel
Ard Biesheuvel 40cd01a9c3 efi/loongarch: libstub: remove dependency on flattened DT
LoongArch does not use FDT or DT natively [yet], and the only reason it
currently uses it is so that it can reuse the existing EFI stub code.

Overloading the DT with data passed between the EFI stub and the core
kernel has been a source of problems: there is the overlap between
information provided by EFI which DT can also provide (initrd base/size,
command line, memory descriptions), requiring us to reason about which
is which and what to prioritize. It has also resulted in ABI leaks,
i.e., internal ABI being promoted to external ABI inadvertently because
the bootloader can set the EFI stub's DT properties as well (e.g.,
"kaslr-seed"). This has become especially problematic with boot
environments that want to pretend that EFI boot is being done (to access
ACPI and SMBIOS tables, for instance) but have no ability to execute the
EFI stub, and so the environment that the EFI stub creates is emulated
[poorly, in some cases].

Another downside of treating DT like this is that the DT binary that the
kernel receives is different from the one created by the firmware, which
is undesirable in the context of secure and measured boot.

Given that LoongArch support in Linux is brand new, we can avoid these
pitfalls, and treat the DT strictly as a hardware description, and use a
separate handover method between the EFI stub and the kernel. Now that
initrd loading and passing the EFI memory map have been refactored into
pure EFI routines that use EFI configuration tables, the only thing we
need to pass directly is the kernel command line (even if we could pass
this via a config table as well, it is used extremely early, so passing
it directly is preferred in this case.)

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Huacai Chen <chenhuacai@loongson.cn>
2022-09-27 13:22:49 +02:00
..
.gitignore
access-helper.h LoongArch: Add exception/interrupt handling 2022-06-03 20:09:28 +08:00
acpi.c LoongArch: Parse MADT to get multi-processor information 2022-08-12 13:10:11 +08:00
asm-offsets.c LoongArch changes for v5.20 2022-08-12 09:44:23 -07:00
cacheinfo.c LoongArch: Fix shared cache size calculation 2022-07-29 18:22:33 +08:00
cpu-probe.c LoongArch: Fix wrong fpu version 2022-06-25 18:05:59 +08:00
dma.c LoongArch: Add Non-Uniform Memory Access (NUMA) support 2022-06-03 20:09:29 +08:00
efi-header.S efi/loongarch: Add efistub booting support 2022-09-06 11:19:34 +02:00
efi.c efi/loongarch: libstub: remove dependency on flattened DT 2022-09-27 13:22:49 +02:00
elf.c LoongArch: Add ELF and module support 2022-06-03 20:09:28 +08:00
entry.S LoongArch: Re-tab the assembly files 2022-07-29 18:22:32 +08:00
env.c efi/loongarch: libstub: remove dependency on flattened DT 2022-09-27 13:22:49 +02:00
fpu.S LoongArch: Re-tab the assembly files 2022-07-29 18:22:32 +08:00
genex.S LoongArch: Re-tab the assembly files 2022-07-29 18:22:32 +08:00
head.S efi/loongarch: libstub: remove dependency on flattened DT 2022-09-27 13:22:49 +02:00
idle.c LoongArch: Add process management 2022-06-03 20:09:28 +08:00
image-vars.h efi/loongarch: Add efistub booting support 2022-09-06 11:19:34 +02:00
inst.c LoongArch: Add ELF and module support 2022-06-03 20:09:28 +08:00
io.c LoongArch: Add misc common routines 2022-06-03 20:09:28 +08:00
irq.c irqchip: Add LoongArch CPU interrupt controller support 2022-07-20 12:09:21 +01:00
Makefile LoongArch: Add STACKTRACE support 2022-08-12 13:10:11 +08:00
mem.c LoongArch: Add boot and setup routines 2022-06-03 20:09:28 +08:00
module-sections.c LoongArch: Add ELF and module support 2022-06-03 20:09:28 +08:00
module.c LoongArch: Add Non-Uniform Memory Access (NUMA) support 2022-06-03 20:09:29 +08:00
numa.c LoongArch: Fix section mismatch warning 2022-07-07 17:41:01 +08:00
proc.c LoongArch: cpuinfo: Fix a warning for CONFIG_CPUMASK_OFFSTACK 2022-08-12 13:10:10 +08:00
process.c LoongArch: Add STACKTRACE support 2022-08-12 13:10:11 +08:00
ptrace.c LoongArch: Fix missing fcsr in ptrace's fpr_set 2022-07-29 18:22:33 +08:00
reset.c LoongArch: Remove useless header compiler.h 2022-07-29 18:22:32 +08:00
setup.c efi/loongarch: libstub: remove dependency on flattened DT 2022-09-27 13:22:49 +02:00
signal.c LoongArch: Add signal handling support 2022-06-03 20:09:28 +08:00
smp.c LoongArch: Parse MADT to get multi-processor information 2022-08-12 13:10:11 +08:00
stacktrace.c LoongArch: Add USER_STACKTRACE support 2022-08-12 13:10:11 +08:00
switch.S LoongArch: Add STACKTRACE support 2022-08-12 13:10:11 +08:00
syscall.c LoongArch: Add system call support 2022-06-03 20:09:28 +08:00
time.c LoongArch: Fix unsigned comparison with less than zero 2022-08-12 13:10:10 +08:00
topology.c LoongArch: Add multi-processor (SMP) support 2022-06-03 20:09:29 +08:00
traps.c LoongArch: Add prologue unwinder support 2022-08-12 13:10:11 +08:00
unwind_guess.c LoongArch: Add guess unwinder support 2022-08-12 13:10:11 +08:00
unwind_prologue.c LoongArch: Add prologue unwinder support 2022-08-12 13:10:11 +08:00
vdso.c LoongArch: Add vDSO syscall __vdso_getcpu() 2022-08-12 13:10:11 +08:00
vmlinux.lds.S efi/loongarch: Add efistub booting support 2022-09-06 11:19:34 +02:00