628c3bb40e
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>
25 lines
523 B
C
25 lines
523 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Copyright (C) 2020-2022 Loongson Technology Corporation Limited
|
|
*/
|
|
#ifndef _ASM_DMI_H
|
|
#define _ASM_DMI_H
|
|
|
|
#include <linux/io.h>
|
|
#include <linux/memblock.h>
|
|
|
|
#define dmi_early_remap(x, l) dmi_remap(x, l)
|
|
#define dmi_early_unmap(x, l) dmi_unmap(x)
|
|
#define dmi_alloc(l) memblock_alloc(l, PAGE_SIZE)
|
|
|
|
static inline void *dmi_remap(u64 phys_addr, unsigned long size)
|
|
{
|
|
return ((void *)TO_CACHE(phys_addr));
|
|
}
|
|
|
|
static inline void dmi_unmap(void *addr)
|
|
{
|
|
}
|
|
|
|
#endif /* _ASM_DMI_H */
|