hc
2024-01-05 071106ecf68c401173c58808b1cf5f68cc50d390
kernel/arch/parisc/include/asm/fixmap.h
....@@ -15,17 +15,35 @@
1515 * from areas congruently mapped with user space. It is 8MB large
1616 * and must be 16MB aligned */
1717 #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)
1821 /* This is the kernel area for all maps (vmalloc, dma etc.) most
1922 * usually, it extends up to TMPALIAS_MAP_START. Virtual addresses
2023 * 0..GATEWAY_PAGE_SIZE are reserved for the gateway page */
2124 #define KERNEL_MAP_START (GATEWAY_PAGE_SIZE)
22
-#define KERNEL_MAP_END (TMPALIAS_MAP_START)
25
+#define KERNEL_MAP_END (FIXMAP_START)
2326
2427 #ifndef __ASSEMBLY__
28
+
29
+
30
+enum 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
+
2537 extern void *parisc_vmalloc_start;
2638 #define PCXL_DMA_MAP_SIZE (8*1024*1024)
2739 #define VMALLOC_START ((unsigned long)parisc_vmalloc_start)
2840 #define VMALLOC_END (KERNEL_MAP_END)
41
+
42
+#define __fix_to_virt(_x) (FIXMAP_START + ((_x) << PAGE_SHIFT))
43
+
44
+void set_fixmap(enum fixed_addresses idx, phys_addr_t phys);
45
+void clear_fixmap(enum fixed_addresses idx);
46
+
2947 #endif /*__ASSEMBLY__*/
3048
3149 #endif /*_ASM_FIXMAP_H*/