1
2
3
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
17
18
19
20
21
22
23enum fixed_addresses {
24 FIX_HOLE,
25#define FIX_FDT_SIZE SZ_1M
26 FIX_FDT_END,
27 FIX_FDT = FIX_FDT_END + FIX_FDT_SIZE / PAGE_SIZE - 1,
28 FIX_PTE,
29 FIX_PMD,
30 FIX_TEXT_POKE1,
31 FIX_TEXT_POKE0,
32 FIX_EARLYCON_MEM_BASE,
33 __end_of_fixed_addresses
34};
35
36#define FIXMAP_PAGE_IO PAGE_KERNEL
37
38#define __early_set_fixmap __set_fixmap
39
40#define __late_set_fixmap __set_fixmap
41#define __late_clear_fixmap(idx) __set_fixmap((idx), 0, FIXMAP_PAGE_CLEAR)
42
43extern void __set_fixmap(enum fixed_addresses idx,
44 phys_addr_t phys, pgprot_t prot);
45
46#include <asm-generic/fixmap.h>
47
48#endif
49#endif
50