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