1 /* SPDX-License-Identifier: GPL-2.0 */ 1 2 /* 3 * Copyright (C) 2019 Western Digital Corporat 4 */ 5 6 #ifndef _ASM_RISCV_FIXMAP_H 7 #define _ASM_RISCV_FIXMAP_H 8 9 #include <linux/kernel.h> 10 #include <linux/sizes.h> 11 #include <linux/pgtable.h> 12 #include <asm/page.h> 13 14 #ifdef CONFIG_MMU 15 /* 16 * Here we define all the compile-time 'specia 17 * The point is to have a constant address at 18 * set the physical address only in the boot p 19 * 20 * These 'compile-time allocated' memory buffe 21 * set_fixmap(idx,phys) to associate physical 22 */ 23 enum fixed_addresses { 24 FIX_HOLE, 25 /* 26 * The fdt fixmap mapping must be PMD 27 * using PMD entries in fixmap_pmd in 28 */ 29 FIX_FDT_END, 30 FIX_FDT = FIX_FDT_END + FIX_FDT_SIZE / 31 32 /* Below fixmaps will be mapped using 33 FIX_PTE, 34 FIX_PMD, 35 FIX_PUD, 36 FIX_P4D, 37 FIX_TEXT_POKE1, 38 FIX_TEXT_POKE0, 39 FIX_EARLYCON_MEM_BASE, 40 41 __end_of_permanent_fixed_addresses, 42 /* 43 * Temporary boot-time mappings, used 44 * before ioremap() is functional. 45 */ 46 #define NR_FIX_BTMAPS (SZ_256K / PAG 47 #define FIX_BTMAPS_SLOTS 7 48 #define TOTAL_FIX_BTMAPS (NR_FIX_BTMAPS 49 50 FIX_BTMAP_END = __end_of_permanent_fix 51 FIX_BTMAP_BEGIN = FIX_BTMAP_END + TOTA 52 53 __end_of_fixed_addresses 54 }; 55 56 #define __early_set_fixmap __set_fixmap 57 58 #define __late_set_fixmap __set_fixmap 59 #define __late_clear_fixmap(idx) __set_fixmap( 60 61 extern void __set_fixmap(enum fixed_addresses 62 phys_addr_t phys, pgp 63 64 #include <asm-generic/fixmap.h> 65 66 #endif /* CONFIG_MMU */ 67 #endif /* _ASM_RISCV_FIXMAP_H */ 68
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.