blob: d95921a2ab99b81cc0c17cdab5cc433df6b9a9cc [file] [log] [blame]
Lennert Buytenhek23bdf862006-03-28 21:00:40 +01001/*
2 * linux/arch/arm/mm/proc-xsc3.S
3 *
4 * Original Author: Matthew Gilbert
Lennert Buytenhek57fee392006-12-19 21:48:15 +01005 * Current Maintainer: Lennert Buytenhek <buytenh@wantstofly.org>
Lennert Buytenhek23bdf862006-03-28 21:00:40 +01006 *
7 * Copyright 2004 (C) Intel Corp.
Lennert Buytenhek850b4292007-02-05 00:55:27 +01008 * Copyright 2005 (C) MontaVista Software, Inc.
Lennert Buytenhek23bdf862006-03-28 21:00:40 +01009 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13 *
Lennert Buytenhek850b4292007-02-05 00:55:27 +010014 * MMU functions for the Intel XScale3 Core (XSC3). The XSC3 core is
15 * an extension to Intel's original XScale core that adds the following
Lennert Buytenhek23bdf862006-03-28 21:00:40 +010016 * features:
17 *
18 * - ARMv6 Supersections
19 * - Low Locality Reference pages (replaces mini-cache)
20 * - 36-bit addressing
21 * - L2 cache
Lennert Buytenhek850b4292007-02-05 00:55:27 +010022 * - Cache coherency if chipset supports it
Lennert Buytenhek23bdf862006-03-28 21:00:40 +010023 *
Lennert Buytenhek850b4292007-02-05 00:55:27 +010024 * Based on original XScale code by Nicolas Pitre.
Lennert Buytenhek23bdf862006-03-28 21:00:40 +010025 */
26
27#include <linux/linkage.h>
28#include <linux/init.h>
29#include <asm/assembler.h>
Russell Kingee90dab2006-11-09 14:20:47 +000030#include <asm/elf.h>
Lennert Buytenhek23bdf862006-03-28 21:00:40 +010031#include <asm/hardware.h>
32#include <asm/pgtable.h>
Lennert Buytenhekb48340a2006-03-30 10:24:07 +010033#include <asm/pgtable-hwdef.h>
Lennert Buytenhek23bdf862006-03-28 21:00:40 +010034#include <asm/page.h>
35#include <asm/ptrace.h>
36#include "proc-macros.S"
37
38/*
39 * This is the maximum size of an area which will be flushed. If the
40 * area is larger than this, then we flush the whole cache.
41 */
42#define MAX_AREA_SIZE 32768
43
44/*
Lennert Buytenhek850b4292007-02-05 00:55:27 +010045 * The cache line size of the L1 I, L1 D and unified L2 cache.
Lennert Buytenhek23bdf862006-03-28 21:00:40 +010046 */
47#define CACHELINESIZE 32
48
49/*
Lennert Buytenhek850b4292007-02-05 00:55:27 +010050 * The size of the L1 D cache.
Lennert Buytenhek23bdf862006-03-28 21:00:40 +010051 */
52#define CACHESIZE 32768
53
54/*
55 * Run with L2 enabled.
56 */
57#define L2_CACHE_ENABLE 1
58
59/*
Lennert Buytenhek850b4292007-02-05 00:55:27 +010060 * This macro is used to wait for a CP15 write and is needed when we
61 * have to ensure that the last operation to the coprocessor was
62 * completed before continuing with operation.
Lennert Buytenhek23bdf862006-03-28 21:00:40 +010063 */
64 .macro cpwait_ret, lr, rd
65 mrc p15, 0, \rd, c2, c0, 0 @ arbitrary read of cp15
66 sub pc, \lr, \rd, LSR #32 @ wait for completion and
67 @ flush instruction pipeline
68 .endm
69
70/*
Lennert Buytenhek850b4292007-02-05 00:55:27 +010071 * This macro cleans and invalidates the entire L1 D cache.
Lennert Buytenhek23bdf862006-03-28 21:00:40 +010072 */
73
74 .macro clean_d_cache rd, rs
75 mov \rd, #0x1f00
76 orr \rd, \rd, #0x00e0
Lennert Buytenhek850b4292007-02-05 00:55:27 +0100771: mcr p15, 0, \rd, c7, c14, 2 @ clean/invalidate L1 D line
Lennert Buytenhek23bdf862006-03-28 21:00:40 +010078 adds \rd, \rd, #0x40000000
79 bcc 1b
80 subs \rd, \rd, #0x20
81 bpl 1b
82 .endm
83
84 .text
85
86/*
87 * cpu_xsc3_proc_init()
88 *
89 * Nothing too exciting at the moment
90 */
91ENTRY(cpu_xsc3_proc_init)
92 mov pc, lr
93
94/*
95 * cpu_xsc3_proc_fin()
96 */
97ENTRY(cpu_xsc3_proc_fin)
98 str lr, [sp, #-4]!
99 mov r0, #PSR_F_BIT|PSR_I_BIT|SVC_MODE
100 msr cpsr_c, r0
101 bl xsc3_flush_kern_cache_all @ clean caches
102 mrc p15, 0, r0, c1, c0, 0 @ ctrl register
103 bic r0, r0, #0x1800 @ ...IZ...........
104 bic r0, r0, #0x0006 @ .............CA.
105 mcr p15, 0, r0, c1, c0, 0 @ disable caches
106 ldr pc, [sp], #4
107
108/*
109 * cpu_xsc3_reset(loc)
110 *
111 * Perform a soft reset of the system. Put the CPU into the
112 * same state as it would be if it had been reset, and branch
113 * to what would be the reset vector.
114 *
115 * loc: location to jump to for soft reset
116 */
117 .align 5
118ENTRY(cpu_xsc3_reset)
119 mov r1, #PSR_F_BIT|PSR_I_BIT|SVC_MODE
120 msr cpsr_c, r1 @ reset CPSR
121 mrc p15, 0, r1, c1, c0, 0 @ ctrl register
Lennert Buytenhek23bdf862006-03-28 21:00:40 +0100122 bic r1, r1, #0x3900 @ ..VIZ..S........
Lennert Buytenhek850b4292007-02-05 00:55:27 +0100123 bic r1, r1, #0x0086 @ ........B....CA.
Lennert Buytenhek23bdf862006-03-28 21:00:40 +0100124 mcr p15, 0, r1, c1, c0, 0 @ ctrl register
Lennert Buytenhek850b4292007-02-05 00:55:27 +0100125 mcr p15, 0, ip, c7, c7, 0 @ invalidate L1 caches and BTB
Lennert Buytenhek23bdf862006-03-28 21:00:40 +0100126 bic r1, r1, #0x0001 @ ...............M
127 mcr p15, 0, r1, c1, c0, 0 @ ctrl register
128 @ CAUTION: MMU turned off from this point. We count on the pipeline
129 @ already containing those two last instructions to survive.
Lennert Buytenhek850b4292007-02-05 00:55:27 +0100130 mcr p15, 0, ip, c8, c7, 0 @ invalidate I and D TLBs
Lennert Buytenhek23bdf862006-03-28 21:00:40 +0100131 mov pc, r0
132
133/*
134 * cpu_xsc3_do_idle()
135 *
136 * Cause the processor to idle
137 *
138 * For now we do nothing but go to idle mode for every case
139 *
140 * XScale supports clock switching, but using idle mode support
141 * allows external hardware to react to system state changes.
Lennert Buytenhek23bdf862006-03-28 21:00:40 +0100142 */
143 .align 5
144
145ENTRY(cpu_xsc3_do_idle)
146 mov r0, #1
Lennert Buytenhek850b4292007-02-05 00:55:27 +0100147 mcr p14, 0, r0, c7, c0, 0 @ go to idle
Lennert Buytenhek23bdf862006-03-28 21:00:40 +0100148 mov pc, lr
149
150/* ================================= CACHE ================================ */
151
152/*
153 * flush_user_cache_all()
154 *
155 * Invalidate all cache entries in a particular address
156 * space.
157 */
158ENTRY(xsc3_flush_user_cache_all)
159 /* FALLTHROUGH */
160
161/*
162 * flush_kern_cache_all()
163 *
164 * Clean and invalidate the entire cache.
165 */
166ENTRY(xsc3_flush_kern_cache_all)
167 mov r2, #VM_EXEC
168 mov ip, #0
169__flush_whole_cache:
170 clean_d_cache r0, r1
171 tst r2, #VM_EXEC
Lennert Buytenhek850b4292007-02-05 00:55:27 +0100172 mcrne p15, 0, ip, c7, c5, 0 @ invalidate L1 I cache and BTB
173 mcrne p15, 0, ip, c7, c10, 4 @ data write barrier
174 mcrne p15, 0, ip, c7, c5, 4 @ prefetch flush
Lennert Buytenhek23bdf862006-03-28 21:00:40 +0100175 mov pc, lr
176
177/*
178 * flush_user_cache_range(start, end, vm_flags)
179 *
180 * Invalidate a range of cache entries in the specified
181 * address space.
182 *
183 * - start - start address (may not be aligned)
184 * - end - end address (exclusive, may not be aligned)
185 * - vma - vma_area_struct describing address space
186 */
187 .align 5
188ENTRY(xsc3_flush_user_cache_range)
189 mov ip, #0
190 sub r3, r1, r0 @ calculate total size
191 cmp r3, #MAX_AREA_SIZE
192 bhs __flush_whole_cache
193
1941: tst r2, #VM_EXEC
Lennert Buytenhek850b4292007-02-05 00:55:27 +0100195 mcrne p15, 0, r0, c7, c5, 1 @ invalidate L1 I line
196 mcr p15, 0, r0, c7, c14, 1 @ clean/invalidate L1 D line
Lennert Buytenhek23bdf862006-03-28 21:00:40 +0100197 add r0, r0, #CACHELINESIZE
198 cmp r0, r1
199 blo 1b
200 tst r2, #VM_EXEC
Lennert Buytenhek850b4292007-02-05 00:55:27 +0100201 mcrne p15, 0, ip, c7, c5, 6 @ invalidate BTB
202 mcrne p15, 0, ip, c7, c10, 4 @ data write barrier
203 mcrne p15, 0, ip, c7, c5, 4 @ prefetch flush
Lennert Buytenhek23bdf862006-03-28 21:00:40 +0100204 mov pc, lr
205
206/*
207 * coherent_kern_range(start, end)
208 *
Lennert Buytenhek850b4292007-02-05 00:55:27 +0100209 * Ensure coherency between the I cache and the D cache in the
Lennert Buytenhek23bdf862006-03-28 21:00:40 +0100210 * region described by start. If you have non-snooping
211 * Harvard caches, you need to implement this function.
212 *
213 * - start - virtual start address
214 * - end - virtual end address
215 *
216 * Note: single I-cache line invalidation isn't used here since
217 * it also trashes the mini I-cache used by JTAG debuggers.
218 */
219ENTRY(xsc3_coherent_kern_range)
220/* FALLTHROUGH */
221ENTRY(xsc3_coherent_user_range)
222 bic r0, r0, #CACHELINESIZE - 1
Lennert Buytenhek850b4292007-02-05 00:55:27 +01002231: mcr p15, 0, r0, c7, c10, 1 @ clean L1 D line
Lennert Buytenhek23bdf862006-03-28 21:00:40 +0100224 add r0, r0, #CACHELINESIZE
225 cmp r0, r1
226 blo 1b
227 mov r0, #0
Lennert Buytenhek850b4292007-02-05 00:55:27 +0100228 mcr p15, 0, r0, c7, c5, 0 @ invalidate L1 I cache and BTB
229 mcr p15, 0, r0, c7, c10, 4 @ data write barrier
230 mcr p15, 0, r0, c7, c5, 4 @ prefetch flush
Lennert Buytenhek23bdf862006-03-28 21:00:40 +0100231 mov pc, lr
232
233/*
234 * flush_kern_dcache_page(void *page)
235 *
236 * Ensure no D cache aliasing occurs, either with itself or
Lennert Buytenhek850b4292007-02-05 00:55:27 +0100237 * the I cache.
Lennert Buytenhek23bdf862006-03-28 21:00:40 +0100238 *
239 * - addr - page aligned address
240 */
241ENTRY(xsc3_flush_kern_dcache_page)
242 add r1, r0, #PAGE_SZ
Lennert Buytenhek850b4292007-02-05 00:55:27 +01002431: mcr p15, 0, r0, c7, c14, 1 @ clean/invalidate L1 D line
Lennert Buytenhek23bdf862006-03-28 21:00:40 +0100244 add r0, r0, #CACHELINESIZE
245 cmp r0, r1
246 blo 1b
247 mov r0, #0
Lennert Buytenhek850b4292007-02-05 00:55:27 +0100248 mcr p15, 0, r0, c7, c5, 0 @ invalidate L1 I cache and BTB
249 mcr p15, 0, r0, c7, c10, 4 @ data write barrier
250 mcr p15, 0, r0, c7, c5, 4 @ prefetch flush
Lennert Buytenhek23bdf862006-03-28 21:00:40 +0100251 mov pc, lr
252
253/*
254 * dma_inv_range(start, end)
255 *
256 * Invalidate (discard) the specified virtual address range.
257 * May not write back any entries. If 'start' or 'end'
258 * are not cache line aligned, those lines must be written
259 * back.
260 *
261 * - start - virtual start address
262 * - end - virtual end address
263 */
264ENTRY(xsc3_dma_inv_range)
265 tst r0, #CACHELINESIZE - 1
266 bic r0, r0, #CACHELINESIZE - 1
Lennert Buytenhek850b4292007-02-05 00:55:27 +0100267 mcrne p15, 0, r0, c7, c10, 1 @ clean L1 D line
268 mcrne p15, 1, r0, c7, c11, 1 @ clean L2 line
Lennert Buytenhek23bdf862006-03-28 21:00:40 +0100269 tst r1, #CACHELINESIZE - 1
Lennert Buytenhek850b4292007-02-05 00:55:27 +0100270 mcrne p15, 0, r1, c7, c10, 1 @ clean L1 D line
271 mcrne p15, 1, r1, c7, c11, 1 @ clean L2 line
2721: mcr p15, 0, r0, c7, c6, 1 @ invalidate L1 D line
273 mcr p15, 1, r0, c7, c7, 1 @ invalidate L2 line
Lennert Buytenhek23bdf862006-03-28 21:00:40 +0100274 add r0, r0, #CACHELINESIZE
275 cmp r0, r1
276 blo 1b
Lennert Buytenhek850b4292007-02-05 00:55:27 +0100277 mcr p15, 0, r0, c7, c10, 4 @ data write barrier
Lennert Buytenhek23bdf862006-03-28 21:00:40 +0100278 mov pc, lr
279
280/*
281 * dma_clean_range(start, end)
282 *
283 * Clean the specified virtual address range.
284 *
285 * - start - virtual start address
286 * - end - virtual end address
287 */
288ENTRY(xsc3_dma_clean_range)
289 bic r0, r0, #CACHELINESIZE - 1
Lennert Buytenhek850b4292007-02-05 00:55:27 +01002901: mcr p15, 0, r0, c7, c10, 1 @ clean L1 D line
291 mcr p15, 1, r0, c7, c11, 1 @ clean L2 line
Lennert Buytenhek23bdf862006-03-28 21:00:40 +0100292 add r0, r0, #CACHELINESIZE
293 cmp r0, r1
294 blo 1b
Lennert Buytenhek850b4292007-02-05 00:55:27 +0100295 mcr p15, 0, r0, c7, c10, 4 @ data write barrier
Lennert Buytenhek23bdf862006-03-28 21:00:40 +0100296 mov pc, lr
297
298/*
299 * dma_flush_range(start, end)
300 *
301 * Clean and invalidate the specified virtual address range.
302 *
303 * - start - virtual start address
304 * - end - virtual end address
305 */
306ENTRY(xsc3_dma_flush_range)
307 bic r0, r0, #CACHELINESIZE - 1
Lennert Buytenhek850b4292007-02-05 00:55:27 +01003081: mcr p15, 0, r0, c7, c14, 1 @ clean/invalidate L1 D line
309 mcr p15, 1, r0, c7, c11, 1 @ clean L2 line
310 mcr p15, 1, r0, c7, c7, 1 @ invalidate L2 line
Lennert Buytenhek23bdf862006-03-28 21:00:40 +0100311 add r0, r0, #CACHELINESIZE
312 cmp r0, r1
313 blo 1b
Lennert Buytenhek850b4292007-02-05 00:55:27 +0100314 mcr p15, 0, r0, c7, c10, 4 @ data write barrier
Lennert Buytenhek23bdf862006-03-28 21:00:40 +0100315 mov pc, lr
316
317ENTRY(xsc3_cache_fns)
318 .long xsc3_flush_kern_cache_all
319 .long xsc3_flush_user_cache_all
320 .long xsc3_flush_user_cache_range
321 .long xsc3_coherent_kern_range
322 .long xsc3_coherent_user_range
323 .long xsc3_flush_kern_dcache_page
324 .long xsc3_dma_inv_range
325 .long xsc3_dma_clean_range
326 .long xsc3_dma_flush_range
327
328ENTRY(cpu_xsc3_dcache_clean_area)
Lennert Buytenhek850b4292007-02-05 00:55:27 +01003291: mcr p15, 0, r0, c7, c10, 1 @ clean L1 D line
Lennert Buytenhek23bdf862006-03-28 21:00:40 +0100330 add r0, r0, #CACHELINESIZE
331 subs r1, r1, #CACHELINESIZE
332 bhi 1b
333 mov pc, lr
334
335/* =============================== PageTable ============================== */
336
337/*
338 * cpu_xsc3_switch_mm(pgd)
339 *
340 * Set the translation base pointer to be as described by pgd.
341 *
342 * pgd: new page tables
343 */
344 .align 5
345ENTRY(cpu_xsc3_switch_mm)
346 clean_d_cache r1, r2
Lennert Buytenhek850b4292007-02-05 00:55:27 +0100347 mcr p15, 0, ip, c7, c5, 0 @ invalidate L1 I cache and BTB
348 mcr p15, 0, ip, c7, c10, 4 @ data write barrier
349 mcr p15, 0, ip, c7, c5, 4 @ prefetch flush
Lennert Buytenhek23bdf862006-03-28 21:00:40 +0100350#ifdef L2_CACHE_ENABLE
351 orr r0, r0, #0x18 @ cache the page table in L2
352#endif
353 mcr p15, 0, r0, c2, c0, 0 @ load page table pointer
Lennert Buytenhek850b4292007-02-05 00:55:27 +0100354 mcr p15, 0, ip, c8, c7, 0 @ invalidate I and D TLBs
Lennert Buytenhek23bdf862006-03-28 21:00:40 +0100355 cpwait_ret lr, ip
356
357/*
Russell Kingad1ae2f2006-12-13 14:34:43 +0000358 * cpu_xsc3_set_pte_ext(ptep, pte, ext)
Lennert Buytenhek23bdf862006-03-28 21:00:40 +0100359 *
360 * Set a PTE and flush it out
361 *
362 */
363 .align 5
Russell Kingad1ae2f2006-12-13 14:34:43 +0000364ENTRY(cpu_xsc3_set_pte_ext)
Lennert Buytenhek23bdf862006-03-28 21:00:40 +0100365 str r1, [r0], #-2048 @ linux version
366
Lennert Buytenhek850b4292007-02-05 00:55:27 +0100367 bic r2, r1, #0xff0 @ keep C, B bits
Lennert Buytenhek23bdf862006-03-28 21:00:40 +0100368 orr r2, r2, #PTE_TYPE_EXT @ extended page
Lennert Buytenhek850b4292007-02-05 00:55:27 +0100369 tst r1, #L_PTE_SHARED @ shared?
Lennert Buytenhek0e5fdca2006-12-02 00:03:47 +0100370 orrne r2, r2, #0x200
Lennert Buytenhek23bdf862006-03-28 21:00:40 +0100371
372 eor r3, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
373
Lennert Buytenhek850b4292007-02-05 00:55:27 +0100374 tst r3, #L_PTE_USER @ user?
Lennert Buytenhek23bdf862006-03-28 21:00:40 +0100375 orrne r2, r2, #PTE_EXT_AP_URO_SRW @ yes -> user r/o, system r/w
376
Lennert Buytenhek850b4292007-02-05 00:55:27 +0100377 tst r3, #L_PTE_WRITE | L_PTE_DIRTY @ write and dirty?
Lennert Buytenhek23bdf862006-03-28 21:00:40 +0100378 orreq r2, r2, #PTE_EXT_AP_UNO_SRW @ yes -> user n/a, system r/w
379 @ combined with user -> user r/w
380
381#if L2_CACHE_ENABLE
Lennert Buytenhek850b4292007-02-05 00:55:27 +0100382 @ If it's cacheable, it needs to be in L2 also.
Lennert Buytenhek23bdf862006-03-28 21:00:40 +0100383 eor ip, r1, #L_PTE_CACHEABLE
384 tst ip, #L_PTE_CACHEABLE
385 orreq r2, r2, #PTE_EXT_TEX(0x5)
386#endif
387
Lennert Buytenhek850b4292007-02-05 00:55:27 +0100388 tst r3, #L_PTE_PRESENT | L_PTE_YOUNG @ present and young?
Lennert Buytenhek23bdf862006-03-28 21:00:40 +0100389 movne r2, #0 @ no -> fault
390
391 str r2, [r0] @ hardware version
392 mov ip, #0
Lennert Buytenhek850b4292007-02-05 00:55:27 +0100393 mcr p15, 0, r0, c7, c10, 1 @ clean L1 D line
394 mcr p15, 0, ip, c7, c10, 4 @ data write barrier
Lennert Buytenhek23bdf862006-03-28 21:00:40 +0100395 mov pc, lr
396
397 .ltorg
398
399 .align
400
401 __INIT
402
403 .type __xsc3_setup, #function
404__xsc3_setup:
405 mov r0, #PSR_F_BIT|PSR_I_BIT|SVC_MODE
406 msr cpsr_c, r0
Lennert Buytenhek850b4292007-02-05 00:55:27 +0100407 mcr p15, 0, ip, c7, c7, 0 @ invalidate L1 caches and BTB
408 mcr p15, 0, ip, c7, c10, 4 @ data write barrier
409 mcr p15, 0, ip, c7, c5, 4 @ prefetch flush
410 mcr p15, 0, ip, c8, c7, 0 @ invalidate I and D TLBs
Lennert Buytenhek23bdf862006-03-28 21:00:40 +0100411#if L2_CACHE_ENABLE
412 orr r4, r4, #0x18 @ cache the page table in L2
413#endif
414 mcr p15, 0, r4, c2, c0, 0 @ load page table pointer
Lennert Buytenhek850b4292007-02-05 00:55:27 +0100415
416 mov r0, #0 @ don't allow CP access
417 mcr p15, 0, r0, c15, c1, 0 @ write CP access register
418
Lennert Buytenhek23bdf862006-03-28 21:00:40 +0100419 mrc p15, 0, r0, c1, c0, 1 @ get auxiliary control reg
420 and r0, r0, #2 @ preserve bit P bit setting
421#if L2_CACHE_ENABLE
422 orr r0, r0, #(1 << 10) @ enable L2 for LLR cache
423#endif
424 mcr p15, 0, r0, c1, c0, 1 @ set auxiliary control reg
Russell King22b190862006-06-29 15:09:57 +0100425
426 adr r5, xsc3_crval
427 ldmia r5, {r5, r6}
Lennert Buytenhek23bdf862006-03-28 21:00:40 +0100428 mrc p15, 0, r0, c1, c0, 0 @ get control register
Lennert Buytenhek850b4292007-02-05 00:55:27 +0100429 bic r0, r0, r5 @ ..V. ..R. .... ..A.
430 orr r0, r0, r6 @ ..VI Z..S .... .C.M (mmu)
431 @ ...I Z..S .... .... (uc)
Lennert Buytenhek23bdf862006-03-28 21:00:40 +0100432#if L2_CACHE_ENABLE
Russell King22b190862006-06-29 15:09:57 +0100433 orr r0, r0, #0x04000000 @ L2 enable
Lennert Buytenhek23bdf862006-03-28 21:00:40 +0100434#endif
435 mov pc, lr
436
437 .size __xsc3_setup, . - __xsc3_setup
438
Russell King22b190862006-06-29 15:09:57 +0100439 .type xsc3_crval, #object
440xsc3_crval:
Lennert Buytenhek850b4292007-02-05 00:55:27 +0100441 crval clear=0x04002202, mmuset=0x00003905, ucset=0x00001900
Russell King22b190862006-06-29 15:09:57 +0100442
Lennert Buytenhek23bdf862006-03-28 21:00:40 +0100443 __INITDATA
444
445/*
446 * Purpose : Function pointers used to access above functions - all calls
447 * come through these
448 */
449
450 .type xsc3_processor_functions, #object
451ENTRY(xsc3_processor_functions)
452 .word v5t_early_abort
453 .word cpu_xsc3_proc_init
454 .word cpu_xsc3_proc_fin
455 .word cpu_xsc3_reset
456 .word cpu_xsc3_do_idle
457 .word cpu_xsc3_dcache_clean_area
458 .word cpu_xsc3_switch_mm
Russell Kingad1ae2f2006-12-13 14:34:43 +0000459 .word cpu_xsc3_set_pte_ext
Lennert Buytenhek23bdf862006-03-28 21:00:40 +0100460 .size xsc3_processor_functions, . - xsc3_processor_functions
461
462 .section ".rodata"
463
464 .type cpu_arch_name, #object
465cpu_arch_name:
466 .asciz "armv5te"
467 .size cpu_arch_name, . - cpu_arch_name
468
469 .type cpu_elf_name, #object
470cpu_elf_name:
471 .asciz "v5"
472 .size cpu_elf_name, . - cpu_elf_name
473
474 .type cpu_xsc3_name, #object
475cpu_xsc3_name:
Lennert Buytenhek850b4292007-02-05 00:55:27 +0100476 .asciz "XScale-V3 based processor"
Lennert Buytenhek23bdf862006-03-28 21:00:40 +0100477 .size cpu_xsc3_name, . - cpu_xsc3_name
478
479 .align
480
481 .section ".proc.info.init", #alloc, #execinstr
482
483 .type __xsc3_proc_info,#object
484__xsc3_proc_info:
485 .long 0x69056000
486 .long 0xffffe000
Russell King8799ee92006-06-29 18:24:21 +0100487 .long PMD_TYPE_SECT | \
488 PMD_SECT_BUFFERABLE | \
489 PMD_SECT_CACHEABLE | \
490 PMD_SECT_AP_WRITE | \
491 PMD_SECT_AP_READ
Lennert Buytenhek850b4292007-02-05 00:55:27 +0100492 .long PMD_TYPE_SECT | \
Russell King8799ee92006-06-29 18:24:21 +0100493 PMD_SECT_AP_WRITE | \
494 PMD_SECT_AP_READ
Lennert Buytenhek23bdf862006-03-28 21:00:40 +0100495 b __xsc3_setup
496 .long cpu_arch_name
497 .long cpu_elf_name
498 .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP
499 .long cpu_xsc3_name
500 .long xsc3_processor_functions
501 .long v4wbi_tlb_fns
502 .long xsc3_mc_user_fns
503 .long xsc3_cache_fns
504 .size __xsc3_proc_info, . - __xsc3_proc_info