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