0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #ifndef _ASM_ARM64_FIXMAP_H
0016 #define _ASM_ARM64_FIXMAP_H
0017
0018 #ifndef __ASSEMBLY__
0019 #include <linux/kernel.h>
0020 #include <linux/sizes.h>
0021 #include <asm/boot.h>
0022 #include <asm/page.h>
0023 #include <asm/pgtable-prot.h>
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035 enum fixed_addresses {
0036 FIX_HOLE,
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047 #define FIX_FDT_SIZE (MAX_FDT_SIZE + SZ_2M)
0048 FIX_FDT_END,
0049 FIX_FDT = FIX_FDT_END + FIX_FDT_SIZE / PAGE_SIZE - 1,
0050
0051 FIX_EARLYCON_MEM_BASE,
0052 FIX_TEXT_POKE0,
0053
0054 #ifdef CONFIG_ACPI_APEI_GHES
0055
0056 FIX_APEI_GHES_IRQ,
0057 FIX_APEI_GHES_SEA,
0058 #ifdef CONFIG_ARM_SDE_INTERFACE
0059 FIX_APEI_GHES_SDEI_NORMAL,
0060 FIX_APEI_GHES_SDEI_CRITICAL,
0061 #endif
0062 #endif
0063
0064 #ifdef CONFIG_UNMAP_KERNEL_AT_EL0
0065 #ifdef CONFIG_RELOCATABLE
0066 FIX_ENTRY_TRAMP_TEXT4,
0067 #endif
0068 FIX_ENTRY_TRAMP_TEXT3,
0069 FIX_ENTRY_TRAMP_TEXT2,
0070 FIX_ENTRY_TRAMP_TEXT1,
0071 #define TRAMP_VALIAS (__fix_to_virt(FIX_ENTRY_TRAMP_TEXT1))
0072 #endif
0073 __end_of_permanent_fixed_addresses,
0074
0075
0076
0077
0078
0079 #define NR_FIX_BTMAPS (SZ_256K / PAGE_SIZE)
0080 #define FIX_BTMAPS_SLOTS 7
0081 #define TOTAL_FIX_BTMAPS (NR_FIX_BTMAPS * FIX_BTMAPS_SLOTS)
0082
0083 FIX_BTMAP_END = __end_of_permanent_fixed_addresses,
0084 FIX_BTMAP_BEGIN = FIX_BTMAP_END + TOTAL_FIX_BTMAPS - 1,
0085
0086
0087
0088
0089
0090 FIX_PTE,
0091 FIX_PMD,
0092 FIX_PUD,
0093 FIX_PGD,
0094
0095 __end_of_fixed_addresses
0096 };
0097
0098 #define FIXADDR_SIZE (__end_of_permanent_fixed_addresses << PAGE_SHIFT)
0099 #define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE)
0100
0101 #define FIXMAP_PAGE_IO __pgprot(PROT_DEVICE_nGnRE)
0102
0103 void __init early_fixmap_init(void);
0104
0105 #define __early_set_fixmap __set_fixmap
0106
0107 #define __late_set_fixmap __set_fixmap
0108 #define __late_clear_fixmap(idx) __set_fixmap((idx), 0, FIXMAP_PAGE_CLEAR)
0109
0110 extern void __set_fixmap(enum fixed_addresses idx, phys_addr_t phys, pgprot_t prot);
0111
0112 #include <asm-generic/fixmap.h>
0113
0114 #endif
0115 #endif