~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/arm/include/asm/efi.h

Version: ~ [ linux-5.2-rc1 ] ~ [ linux-5.1.2 ] ~ [ linux-5.0.16 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.43 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.119 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.176 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.179 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.139 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.67 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.39.4 ] ~ [ linux-2.6.38.8 ] ~ [ linux-2.6.37.6 ] ~ [ linux-2.6.36.4 ] ~ [ linux-2.6.35.14 ] ~ [ linux-2.6.34.15 ] ~ [ linux-2.6.33.20 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * Copyright (C) 2015 Linaro Ltd <ard.biesheuvel@linaro.org>
  3  *
  4  * This program is free software; you can redistribute it and/or modify
  5  * it under the terms of the GNU General Public License version 2 as
  6  * published by the Free Software Foundation.
  7  */
  8 
  9 #ifndef __ASM_ARM_EFI_H
 10 #define __ASM_ARM_EFI_H
 11 
 12 #include <asm/cacheflush.h>
 13 #include <asm/cachetype.h>
 14 #include <asm/early_ioremap.h>
 15 #include <asm/fixmap.h>
 16 #include <asm/highmem.h>
 17 #include <asm/mach/map.h>
 18 #include <asm/mmu_context.h>
 19 #include <asm/pgtable.h>
 20 #include <asm/ptrace.h>
 21 
 22 #ifdef CONFIG_EFI
 23 void efi_init(void);
 24 
 25 int efi_create_mapping(struct mm_struct *mm, efi_memory_desc_t *md);
 26 int efi_set_mapping_permissions(struct mm_struct *mm, efi_memory_desc_t *md);
 27 
 28 #define arch_efi_call_virt_setup()      efi_virtmap_load()
 29 #define arch_efi_call_virt_teardown()   efi_virtmap_unload()
 30 
 31 #define arch_efi_call_virt(p, f, args...)                               \
 32 ({                                                                      \
 33         efi_##f##_t *__f;                                               \
 34         __f = p->f;                                                     \
 35         __f(args);                                                      \
 36 })
 37 
 38 #define ARCH_EFI_IRQ_FLAGS_MASK \
 39         (PSR_J_BIT | PSR_E_BIT | PSR_A_BIT | PSR_I_BIT | PSR_F_BIT | \
 40          PSR_T_BIT | MODE_MASK)
 41 
 42 static inline void efi_set_pgd(struct mm_struct *mm)
 43 {
 44         check_and_switch_context(mm, NULL);
 45 }
 46 
 47 void efi_virtmap_load(void);
 48 void efi_virtmap_unload(void);
 49 
 50 #else
 51 #define efi_init()
 52 #endif /* CONFIG_EFI */
 53 
 54 /* arch specific definitions used by the stub code */
 55 
 56 #define efi_call_early(f, ...)          sys_table_arg->boottime->f(__VA_ARGS__)
 57 #define __efi_call_early(f, ...)        f(__VA_ARGS__)
 58 #define efi_call_runtime(f, ...)        sys_table_arg->runtime->f(__VA_ARGS__)
 59 #define efi_is_64bit()                  (false)
 60 
 61 #define efi_table_attr(table, attr, instance)                           \
 62         ((table##_t *)instance)->attr
 63 
 64 #define efi_call_proto(protocol, f, instance, ...)                      \
 65         ((protocol##_t *)instance)->f(instance, ##__VA_ARGS__)
 66 
 67 struct screen_info *alloc_screen_info(efi_system_table_t *sys_table_arg);
 68 void free_screen_info(efi_system_table_t *sys_table, struct screen_info *si);
 69 
 70 static inline void efifb_setup_from_dmi(struct screen_info *si, const char *opt)
 71 {
 72 }
 73 
 74 /*
 75  * A reasonable upper bound for the uncompressed kernel size is 32 MBytes,
 76  * so we will reserve that amount of memory. We have no easy way to tell what
 77  * the actuall size of code + data the uncompressed kernel will use.
 78  * If this is insufficient, the decompressor will relocate itself out of the
 79  * way before performing the decompression.
 80  */
 81 #define MAX_UNCOMP_KERNEL_SIZE  SZ_32M
 82 
 83 /*
 84  * The kernel zImage should preferably be located between 32 MB and 128 MB
 85  * from the base of DRAM. The min address leaves space for a maximal size
 86  * uncompressed image, and the max address is due to how the zImage decompressor
 87  * picks a destination address.
 88  */
 89 #define ZIMAGE_OFFSET_LIMIT     SZ_128M
 90 #define MIN_ZIMAGE_OFFSET       MAX_UNCOMP_KERNEL_SIZE
 91 
 92 /* on ARM, the FDT should be located in the first 128 MB of RAM */
 93 static inline unsigned long efi_get_max_fdt_addr(unsigned long dram_base)
 94 {
 95         return dram_base + ZIMAGE_OFFSET_LIMIT;
 96 }
 97 
 98 /* on ARM, the initrd should be loaded in a lowmem region */
 99 static inline unsigned long efi_get_max_initrd_addr(unsigned long dram_base,
100                                                     unsigned long image_addr)
101 {
102         return dram_base + SZ_512M;
103 }
104 
105 #endif /* _ASM_ARM_EFI_H */
106 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp