0001
0002
0003
0004
0005
0006 #ifndef __ASM_ARM_EFI_H
0007 #define __ASM_ARM_EFI_H
0008
0009 #include <asm/cacheflush.h>
0010 #include <asm/cachetype.h>
0011 #include <asm/early_ioremap.h>
0012 #include <asm/fixmap.h>
0013 #include <asm/highmem.h>
0014 #include <asm/mach/map.h>
0015 #include <asm/mmu_context.h>
0016 #include <asm/ptrace.h>
0017
0018 #ifdef CONFIG_EFI
0019 void efi_init(void);
0020
0021 int efi_create_mapping(struct mm_struct *mm, efi_memory_desc_t *md);
0022 int efi_set_mapping_permissions(struct mm_struct *mm, efi_memory_desc_t *md);
0023
0024 #define arch_efi_call_virt_setup() efi_virtmap_load()
0025 #define arch_efi_call_virt_teardown() efi_virtmap_unload()
0026
0027 #define ARCH_EFI_IRQ_FLAGS_MASK \
0028 (PSR_J_BIT | PSR_E_BIT | PSR_A_BIT | PSR_I_BIT | PSR_F_BIT | \
0029 PSR_T_BIT | MODE_MASK)
0030
0031 static inline void efi_set_pgd(struct mm_struct *mm)
0032 {
0033 check_and_switch_context(mm, NULL);
0034 }
0035
0036 void efi_virtmap_load(void);
0037 void efi_virtmap_unload(void);
0038
0039 #else
0040 #define efi_init()
0041 #endif
0042
0043
0044
0045 struct screen_info *alloc_screen_info(void);
0046 void free_screen_info(struct screen_info *si);
0047
0048
0049
0050
0051
0052
0053
0054
0055 #define MAX_UNCOMP_KERNEL_SIZE SZ_32M
0056
0057
0058
0059
0060
0061
0062
0063 #define EFI_PHYS_ALIGN max(UL(SZ_2M), roundup_pow_of_two(TEXT_OFFSET))
0064
0065
0066 static inline unsigned long efi_get_max_initrd_addr(unsigned long image_addr)
0067 {
0068 return round_down(image_addr, SZ_4M) + SZ_512M;
0069 }
0070
0071 struct efi_arm_entry_state {
0072 u32 cpsr_before_ebs;
0073 u32 sctlr_before_ebs;
0074 u32 cpsr_after_ebs;
0075 u32 sctlr_after_ebs;
0076 };
0077
0078 static inline void efi_capsule_flush_cache_range(void *addr, int size)
0079 {
0080 __cpuc_flush_dcache_area(addr, size);
0081 }
0082
0083 #endif