1
2
3
4
5
6
7
8 #ifndef _ASM_HEXAGON_MEM_LAYOUT_H
9 #define _ASM_HEXAGON_MEM_LAYOUT_H
10
11 #include <linux/const.h>
12
13
14
15
16
17
18
19 #define PAGE_OFFSET _AC(0xc0000000, UL)
20
21
22
23
24
25
26
27 #ifdef CONFIG_HEXAGON_PHYS_OFFSET
28 #ifndef __ASSEMBLY__
29 extern unsigned long __phys_offset;
30 #endif
31 #define PHYS_OFFSET __phys_offset
32 #endif
33
34 #ifndef PHYS_OFFSET
35 #define PHYS_OFFSET 0
36 #endif
37
38 #define PHYS_PFN_OFFSET (PHYS_OFFSET >> PAGE_SHIFT)
39 #define ARCH_PFN_OFFSET PHYS_PFN_OFFSET
40
41 #define TASK_SIZE (PAGE_OFFSET)
42
43
44 #define STACK_TOP TASK_SIZE
45 #define STACK_TOP_MAX TASK_SIZE
46
47 #ifndef __ASSEMBLY__
48 enum fixed_addresses {
49 FIX_KMAP_BEGIN,
50 FIX_KMAP_END,
51 __end_of_fixed_addresses
52 };
53
54 #define MIN_KERNEL_SEG (PAGE_OFFSET >> PGDIR_SHIFT)
55 extern int max_kernel_seg;
56
57
58
59
60
61
62 #define VMALLOC_START ((unsigned long) __va(high_memory + VMALLOC_OFFSET))
63
64
65 #define VMALLOC_OFFSET PAGE_SIZE
66
67
68
69
70
71
72
73
74
75 #define FIXADDR_TOP 0xfe000000
76 #define FIXADDR_SIZE (__end_of_fixed_addresses << PAGE_SHIFT)
77 #define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE)
78
79
80
81
82
83
84 #define LAST_PKMAP PTRS_PER_PTE
85 #define LAST_PKMAP_MASK (LAST_PKMAP - 1)
86 #define PKMAP_NR(virt) ((virt - PKMAP_BASE) >> PAGE_SHIFT)
87 #define PKMAP_ADDR(nr) (PKMAP_BASE + ((nr) << PAGE_SHIFT))
88
89
90
91
92
93
94
95
96
97 #define PKMAP_BASE (FIXADDR_START-PAGE_SIZE*LAST_PKMAP)
98
99
100
101
102
103 #define VMALLOC_END (PKMAP_BASE-PAGE_SIZE*2)
104 #endif
105
106
107 #endif