• Huacai Chen's avatar
    efi/loongarch: Add efistub booting support · ead384d9
    Huacai Chen authored
    This patch adds efistub booting support, which is the standard UEFI boot
    protocol for LoongArch to use.
    
    We use generic efistub, which means we can pass boot information (i.e.,
    system table, memory map, kernel command line, initrd) via a light FDT
    and drop a lot of non-standard code.
    
    We use a flat mapping to map the efi runtime in the kernel's address
    space. In efi, VA = PA; in kernel, VA = PA + PAGE_OFFSET. As a result,
    flat mapping is not identity mapping, SetVirtualAddressMap() is still
    needed for the efi runtime.
    Tested-by: default avatarXi Ruoyao <xry111@xry111.site>
    Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
    [ardb: change fpic to fpie as suggested by Xi Ruoyao]
    Signed-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
    ead384d9
efi.h 837 Bytes