Loading...
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _ASM_FIXMAP_H
3#define _ASM_FIXMAP_H
4
5/*
6 * This file defines the locations of the fixed mappings on parisc.
7 *
8 * All of the values in this file are machine virtual addresses.
9 *
10 * All of the values in this file must be <4GB (because of assembly
11 * loading restrictions). If you place this region anywhere above
12 * __PAGE_OFFSET, you must adjust the memory map accordingly */
13
14/* The alias region is used in kernel space to do copy/clear to or
15 * from areas congruently mapped with user space. It is 8MB large
16 * and must be 16MB aligned */
17#define TMPALIAS_MAP_START ((__PAGE_OFFSET) - 16*1024*1024)
18
19#define FIXMAP_SIZE (FIX_BITMAP_COUNT << PAGE_SHIFT)
20#define FIXMAP_START (TMPALIAS_MAP_START - FIXMAP_SIZE)
21/* This is the kernel area for all maps (vmalloc, dma etc.) most
22 * usually, it extends up to TMPALIAS_MAP_START. Virtual addresses
23 * 0..GATEWAY_PAGE_SIZE are reserved for the gateway page */
24#define KERNEL_MAP_START (GATEWAY_PAGE_SIZE)
25#define KERNEL_MAP_END (FIXMAP_START)
26
27#ifndef __ASSEMBLY__
28
29
30enum fixed_addresses {
31 /* Support writing RO kernel text via kprobes, jump labels, etc. */
32 FIX_TEXT_POKE0,
33 FIX_TEXT_KEXEC,
34 FIX_BITMAP_COUNT
35};
36
37extern void *parisc_vmalloc_start;
38#define PCXL_DMA_MAP_SIZE (8*1024*1024)
39#define VMALLOC_START ((unsigned long)parisc_vmalloc_start)
40#define VMALLOC_END (KERNEL_MAP_END)
41
42#define __fix_to_virt(_x) (FIXMAP_START + ((_x) << PAGE_SHIFT))
43
44void set_fixmap(enum fixed_addresses idx, phys_addr_t phys);
45void clear_fixmap(enum fixed_addresses idx);
46
47#endif /*__ASSEMBLY__*/
48
49#endif /*_ASM_FIXMAP_H*/
1#ifndef _ASM_FIXMAP_H
2#define _ASM_FIXMAP_H
3
4/*
5 * This file defines the locations of the fixed mappings on parisc.
6 *
7 * All of the values in this file are machine virtual addresses.
8 *
9 * All of the values in this file must be <4GB (because of assembly
10 * loading restrictions). If you place this region anywhere above
11 * __PAGE_OFFSET, you must adjust the memory map accordingly */
12
13/* The alias region is used in kernel space to do copy/clear to or
14 * from areas congruently mapped with user space. It is 8MB large
15 * and must be 16MB aligned */
16#define TMPALIAS_MAP_START ((__PAGE_OFFSET) - 16*1024*1024)
17/* This is the kernel area for all maps (vmalloc, dma etc.) most
18 * usually, it extends up to TMPALIAS_MAP_START. Virtual addresses
19 * 0..GATEWAY_PAGE_SIZE are reserved for the gateway page */
20#define KERNEL_MAP_START (GATEWAY_PAGE_SIZE)
21#define KERNEL_MAP_END (TMPALIAS_MAP_START)
22
23#ifndef __ASSEMBLY__
24extern void *parisc_vmalloc_start;
25#define PCXL_DMA_MAP_SIZE (8*1024*1024)
26#define VMALLOC_START ((unsigned long)parisc_vmalloc_start)
27#define VMALLOC_END (KERNEL_MAP_END)
28#endif /*__ASSEMBLY__*/
29
30#endif /*_ASM_FIXMAP_H*/