LoongArch: Add boot and setup routines
authorHuacai Chen <chenhuacai@loongson.cn>
Tue, 31 May 2022 10:04:11 +0000 (18:04 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Fri, 3 Jun 2022 12:09:28 +0000 (20:09 +0800)
commit628c3bb40e9a8cefc0a6fde28b7b66bfe46d1dc2
tree37f8cf6768e1bab484836d7c2e456475efc7262a
parentb738c106f7355e318ca47a3b981688efe1bc12fb
LoongArch: Add boot and setup routines

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>
18 files changed:
arch/loongarch/include/asm/acenv.h [new file with mode: 0644]
arch/loongarch/include/asm/acpi.h [new file with mode: 0644]
arch/loongarch/include/asm/bootinfo.h [new file with mode: 0644]
arch/loongarch/include/asm/dmi.h [new file with mode: 0644]
arch/loongarch/include/asm/efi.h [new file with mode: 0644]
arch/loongarch/include/asm/reboot.h [new file with mode: 0644]
arch/loongarch/include/asm/setup.h [new file with mode: 0644]
arch/loongarch/kernel/acpi.c [new file with mode: 0644]
arch/loongarch/kernel/cacheinfo.c [new file with mode: 0644]
arch/loongarch/kernel/cpu-probe.c [new file with mode: 0644]
arch/loongarch/kernel/efi.c [new file with mode: 0644]
arch/loongarch/kernel/env.c [new file with mode: 0644]
arch/loongarch/kernel/head.S [new file with mode: 0644]
arch/loongarch/kernel/mem.c [new file with mode: 0644]
arch/loongarch/kernel/reset.c [new file with mode: 0644]
arch/loongarch/kernel/setup.c [new file with mode: 0644]
arch/loongarch/kernel/time.c [new file with mode: 0644]
arch/loongarch/kernel/topology.c [new file with mode: 0644]