1628c3bb4SHuacai Chen /* SPDX-License-Identifier: GPL-2.0 */ 2628c3bb4SHuacai Chen /* 3628c3bb4SHuacai Chen * Copyright (C) 2020-2022 Loongson Technology Corporation Limited 4628c3bb4SHuacai Chen */ 5628c3bb4SHuacai Chen #ifndef _ASM_LOONGARCH_EFI_H 6628c3bb4SHuacai Chen #define _ASM_LOONGARCH_EFI_H 7628c3bb4SHuacai Chen 8628c3bb4SHuacai Chen #include <linux/efi.h> 9628c3bb4SHuacai Chen 10628c3bb4SHuacai Chen void __init efi_init(void); 11628c3bb4SHuacai Chen void __init efi_runtime_init(void); 12*88d4d957SBinbin Zhou void __init *efi_fdt_pointer(void); 13628c3bb4SHuacai Chen void efifb_setup_from_dmi(struct screen_info *si, const char *opt); 14628c3bb4SHuacai Chen 15628c3bb4SHuacai Chen #define ARCH_EFI_IRQ_FLAGS_MASK 0x00000004 /* Bit 2: CSR.CRMD.IE */ 16628c3bb4SHuacai Chen 178add9a3aSSudeep Holla #define arch_efi_call_virt_setup() 188add9a3aSSudeep Holla #define arch_efi_call_virt_teardown() 19628c3bb4SHuacai Chen 20628c3bb4SHuacai Chen #define EFI_ALLOC_ALIGN SZ_64K 21ead384d9SHuacai Chen #define EFI_RT_VIRTUAL_OFFSET CSR_DMW0_BASE 22628c3bb4SHuacai Chen efi_get_max_initrd_addr(unsigned long image_addr)23628c3bb4SHuacai Chenstatic inline unsigned long efi_get_max_initrd_addr(unsigned long image_addr) 24628c3bb4SHuacai Chen { 25628c3bb4SHuacai Chen return ULONG_MAX; 26628c3bb4SHuacai Chen } 27628c3bb4SHuacai Chen efi_get_kimg_min_align(void)28895bc3a1SArd Biesheuvelstatic inline unsigned long efi_get_kimg_min_align(void) 29895bc3a1SArd Biesheuvel { 30895bc3a1SArd Biesheuvel return SZ_2M; 31895bc3a1SArd Biesheuvel } 32895bc3a1SArd Biesheuvel 33895bc3a1SArd Biesheuvel #define EFI_KIMG_PREFERRED_ADDRESS PHYSADDR(VMLINUX_LOAD_ADDRESS) 34895bc3a1SArd Biesheuvel 35628c3bb4SHuacai Chen #endif /* _ASM_LOONGARCH_EFI_H */ 36