1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 3 * Copyright (C) 2020 Loongson Technology Co., Ltd. 4 */ 5 #ifndef _ASM_LOONGARCH_EFI_H 6 #define _ASM_LOONGARCH_EFI_H 7 8 #include <linux/efi.h> 9 10 void __init efi_init(void); 11 void __init efi_runtime_init(void); 12 13 #define ARCH_EFI_IRQ_FLAGS_MASK 0x00000004 /* Bit 2: CSR.CRMD.IE */ 14 efifb_setup_from_dmi(struct screen_info *si, const char *opt)15static inline void efifb_setup_from_dmi(struct screen_info *si, const char *opt) 16 { 17 } 18 19 #define arch_efi_call_virt_setup() \ 20 ({ \ 21 }) 22 23 #define arch_efi_call_virt(p, f, args...) \ 24 ({ \ 25 efi_##f##_t * __f; \ 26 __f = p->f; \ 27 __f(args); \ 28 }) 29 30 #define arch_efi_call_virt_teardown() \ 31 ({ \ 32 }) 33 34 #define EFI_ALLOC_ALIGN SZ_64K 35 #define EFI_RT_VIRTUAL_OFFSET CSR_DMW0_BASE 36 37 struct screen_info *alloc_screen_info(void); 38 void free_screen_info(struct screen_info *si); 39 efi_get_max_fdt_addr(unsigned long image_addr)40static inline unsigned long efi_get_max_fdt_addr(unsigned long image_addr) 41 { 42 return ULONG_MAX; 43 } 44 efi_get_max_initrd_addr(unsigned long image_addr)45static inline unsigned long efi_get_max_initrd_addr(unsigned long image_addr) 46 { 47 return ULONG_MAX; 48 } 49 50 #endif /* _ASM_LOONGARCH_EFI_H */ 51