83
83
#define IOREMAP_MAX_ORDER 24
84
84
#endif
85
85
86
+ #define VECTORS_BASE UL(0xffff0000)
87
+
86
88
#else /* CONFIG_MMU */
87
89
90
+ #ifndef __ASSEMBLY__
91
+ extern unsigned long vectors_base ;
92
+ #define VECTORS_BASE vectors_base
93
+ #endif
94
+
88
95
/*
89
96
* The limitation of user task size can grow up to the end of free ram region.
90
97
* It is difficult to define and perhaps will never meet the original meaning
111
118
112
119
#endif /* !CONFIG_MMU */
113
120
121
+ #ifdef CONFIG_XIP_KERNEL
122
+ #define KERNEL_START _sdata
123
+ #else
124
+ #define KERNEL_START _stext
125
+ #endif
126
+ #define KERNEL_END _end
127
+
114
128
/*
115
129
* We fix the TCM memories max 32 KiB ITCM resp DTCM at these
116
130
* locations
@@ -206,7 +220,7 @@ extern const void *__pv_table_begin, *__pv_table_end;
206
220
: "r" (x), "I" (__PV_BITS_31_24) \
207
221
: "cc")
208
222
209
- static inline phys_addr_t __virt_to_phys (unsigned long x )
223
+ static inline phys_addr_t __virt_to_phys_nodebug (unsigned long x )
210
224
{
211
225
phys_addr_t t ;
212
226
@@ -238,7 +252,7 @@ static inline unsigned long __phys_to_virt(phys_addr_t x)
238
252
#define PHYS_OFFSET PLAT_PHYS_OFFSET
239
253
#define PHYS_PFN_OFFSET ((unsigned long)(PHYS_OFFSET >> PAGE_SHIFT))
240
254
241
- static inline phys_addr_t __virt_to_phys (unsigned long x )
255
+ static inline phys_addr_t __virt_to_phys_nodebug (unsigned long x )
242
256
{
243
257
return (phys_addr_t )x - PAGE_OFFSET + PHYS_OFFSET ;
244
258
}
@@ -254,6 +268,16 @@ static inline unsigned long __phys_to_virt(phys_addr_t x)
254
268
((((unsigned long)(kaddr) - PAGE_OFFSET) >> PAGE_SHIFT) + \
255
269
PHYS_PFN_OFFSET)
256
270
271
+ #define __pa_symbol_nodebug (x ) __virt_to_phys_nodebug((x))
272
+
273
+ #ifdef CONFIG_DEBUG_VIRTUAL
274
+ extern phys_addr_t __virt_to_phys (unsigned long x );
275
+ extern phys_addr_t __phys_addr_symbol (unsigned long x );
276
+ #else
277
+ #define __virt_to_phys (x ) __virt_to_phys_nodebug(x)
278
+ #define __phys_addr_symbol (x ) __pa_symbol_nodebug(x)
279
+ #endif
280
+
257
281
/*
258
282
* These are *only* valid on the kernel direct mapped RAM memory.
259
283
* Note: Drivers should NOT use these. They are the wrong
@@ -276,6 +300,7 @@ static inline void *phys_to_virt(phys_addr_t x)
276
300
* Drivers should NOT use these either.
277
301
*/
278
302
#define __pa (x ) __virt_to_phys((unsigned long)(x))
303
+ #define __pa_symbol (x ) __phys_addr_symbol(RELOC_HIDE((unsigned long)(x), 0))
279
304
#define __va (x ) ((void *)__phys_to_virt((phys_addr_t)(x)))
280
305
#define pfn_to_kaddr (pfn ) __va((phys_addr_t)(pfn) << PAGE_SHIFT)
281
306
0 commit comments