proc-xscale.S 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973
  1. /*
  2. * linux/arch/arm/mm/proc-xscale.S
  3. *
  4. * Author: Nicolas Pitre
  5. * Created: November 2000
  6. * Copyright: (C) 2000, 2001 MontaVista Software Inc.
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. *
  12. * MMU functions for the Intel XScale CPUs
  13. *
  14. * 2001 Aug 21:
  15. * some contributions by Brett Gaines <brett.w.gaines@intel.com>
  16. * Copyright 2001 by Intel Corp.
  17. *
  18. * 2001 Sep 08:
  19. * Completely revisited, many important fixes
  20. * Nicolas Pitre <nico@fluxnic.net>
  21. */
  22. #include <linux/linkage.h>
  23. #include <linux/init.h>
  24. #include <asm/assembler.h>
  25. #include <asm/hwcap.h>
  26. #include <asm/pgtable.h>
  27. #include <asm/pgtable-hwdef.h>
  28. #include <asm/page.h>
  29. #include <asm/ptrace.h>
  30. #include "proc-macros.S"
  31. /*
  32. * This is the maximum size of an area which will be flushed. If the area
  33. * is larger than this, then we flush the whole cache
  34. */
  35. #define MAX_AREA_SIZE 32768
  36. /*
  37. * the cache line size of the I and D cache
  38. */
  39. #define CACHELINESIZE 32
  40. /*
  41. * the size of the data cache
  42. */
  43. #define CACHESIZE 32768
  44. /*
  45. * Virtual address used to allocate the cache when flushed
  46. *
  47. * This must be an address range which is _never_ used. It should
  48. * apparently have a mapping in the corresponding page table for
  49. * compatibility with future CPUs that _could_ require it. For instance we
  50. * don't care.
  51. *
  52. * This must be aligned on a 2*CACHESIZE boundary. The code selects one of
  53. * the 2 areas in alternance each time the clean_d_cache macro is used.
  54. * Without this the XScale core exhibits cache eviction problems and no one
  55. * knows why.
  56. *
  57. * Reminder: the vector table is located at 0xffff0000-0xffff0fff.
  58. */
  59. #define CLEAN_ADDR 0xfffe0000
  60. /*
  61. * This macro is used to wait for a CP15 write and is needed
  62. * when we have to ensure that the last operation to the co-pro
  63. * was completed before continuing with operation.
  64. */
  65. .macro cpwait, rd
  66. mrc p15, 0, \rd, c2, c0, 0 @ arbitrary read of cp15
  67. mov \rd, \rd @ wait for completion
  68. sub pc, pc, #4 @ flush instruction pipeline
  69. .endm
  70. .macro cpwait_ret, lr, rd
  71. mrc p15, 0, \rd, c2, c0, 0 @ arbitrary read of cp15
  72. sub pc, \lr, \rd, LSR #32 @ wait for completion and
  73. @ flush instruction pipeline
  74. .endm
  75. /*
  76. * This macro cleans the entire dcache using line allocate.
  77. * The main loop has been unrolled to reduce loop overhead.
  78. * rd and rs are two scratch registers.
  79. */
  80. .macro clean_d_cache, rd, rs
  81. ldr \rs, =clean_addr
  82. ldr \rd, [\rs]
  83. eor \rd, \rd, #CACHESIZE
  84. str \rd, [\rs]
  85. add \rs, \rd, #CACHESIZE
  86. 1: mcr p15, 0, \rd, c7, c2, 5 @ allocate D cache line
  87. add \rd, \rd, #CACHELINESIZE
  88. mcr p15, 0, \rd, c7, c2, 5 @ allocate D cache line
  89. add \rd, \rd, #CACHELINESIZE
  90. mcr p15, 0, \rd, c7, c2, 5 @ allocate D cache line
  91. add \rd, \rd, #CACHELINESIZE
  92. mcr p15, 0, \rd, c7, c2, 5 @ allocate D cache line
  93. add \rd, \rd, #CACHELINESIZE
  94. teq \rd, \rs
  95. bne 1b
  96. .endm
  97. .data
  98. clean_addr: .word CLEAN_ADDR
  99. .text
  100. /*
  101. * cpu_xscale_proc_init()
  102. *
  103. * Nothing too exciting at the moment
  104. */
  105. ENTRY(cpu_xscale_proc_init)
  106. @ enable write buffer coalescing. Some bootloader disable it
  107. mrc p15, 0, r1, c1, c0, 1
  108. bic r1, r1, #1
  109. mcr p15, 0, r1, c1, c0, 1
  110. mov pc, lr
  111. /*
  112. * cpu_xscale_proc_fin()
  113. */
  114. ENTRY(cpu_xscale_proc_fin)
  115. str lr, [sp, #-4]!
  116. mov r0, #PSR_F_BIT|PSR_I_BIT|SVC_MODE
  117. msr cpsr_c, r0
  118. bl xscale_flush_kern_cache_all @ clean caches
  119. mrc p15, 0, r0, c1, c0, 0 @ ctrl register
  120. bic r0, r0, #0x1800 @ ...IZ...........
  121. bic r0, r0, #0x0006 @ .............CA.
  122. mcr p15, 0, r0, c1, c0, 0 @ disable caches
  123. ldr pc, [sp], #4
  124. /*
  125. * cpu_xscale_reset(loc)
  126. *
  127. * Perform a soft reset of the system. Put the CPU into the
  128. * same state as it would be if it had been reset, and branch
  129. * to what would be the reset vector.
  130. *
  131. * loc: location to jump to for soft reset
  132. *
  133. * Beware PXA270 erratum E7.
  134. */
  135. .align 5
  136. ENTRY(cpu_xscale_reset)
  137. mov r1, #PSR_F_BIT|PSR_I_BIT|SVC_MODE
  138. msr cpsr_c, r1 @ reset CPSR
  139. mcr p15, 0, r1, c10, c4, 1 @ unlock I-TLB
  140. mcr p15, 0, r1, c8, c5, 0 @ invalidate I-TLB
  141. mrc p15, 0, r1, c1, c0, 0 @ ctrl register
  142. bic r1, r1, #0x0086 @ ........B....CA.
  143. bic r1, r1, #0x3900 @ ..VIZ..S........
  144. sub pc, pc, #4 @ flush pipeline
  145. @ *** cache line aligned ***
  146. mcr p15, 0, r1, c1, c0, 0 @ ctrl register
  147. bic r1, r1, #0x0001 @ ...............M
  148. mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches & BTB
  149. mcr p15, 0, r1, c1, c0, 0 @ ctrl register
  150. @ CAUTION: MMU turned off from this point. We count on the pipeline
  151. @ already containing those two last instructions to survive.
  152. mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs
  153. mov pc, r0
  154. /*
  155. * cpu_xscale_do_idle()
  156. *
  157. * Cause the processor to idle
  158. *
  159. * For now we do nothing but go to idle mode for every case
  160. *
  161. * XScale supports clock switching, but using idle mode support
  162. * allows external hardware to react to system state changes.
  163. */
  164. .align 5
  165. ENTRY(cpu_xscale_do_idle)
  166. mov r0, #1
  167. mcr p14, 0, r0, c7, c0, 0 @ Go to IDLE
  168. mov pc, lr
  169. /* ================================= CACHE ================================ */
  170. /*
  171. * flush_user_cache_all()
  172. *
  173. * Invalidate all cache entries in a particular address
  174. * space.
  175. */
  176. ENTRY(xscale_flush_user_cache_all)
  177. /* FALLTHROUGH */
  178. /*
  179. * flush_kern_cache_all()
  180. *
  181. * Clean and invalidate the entire cache.
  182. */
  183. ENTRY(xscale_flush_kern_cache_all)
  184. mov r2, #VM_EXEC
  185. mov ip, #0
  186. __flush_whole_cache:
  187. clean_d_cache r0, r1
  188. tst r2, #VM_EXEC
  189. mcrne p15, 0, ip, c7, c5, 0 @ Invalidate I cache & BTB
  190. mcrne p15, 0, ip, c7, c10, 4 @ Drain Write (& Fill) Buffer
  191. mov pc, lr
  192. /*
  193. * flush_user_cache_range(start, end, vm_flags)
  194. *
  195. * Invalidate a range of cache entries in the specified
  196. * address space.
  197. *
  198. * - start - start address (may not be aligned)
  199. * - end - end address (exclusive, may not be aligned)
  200. * - vma - vma_area_struct describing address space
  201. */
  202. .align 5
  203. ENTRY(xscale_flush_user_cache_range)
  204. mov ip, #0
  205. sub r3, r1, r0 @ calculate total size
  206. cmp r3, #MAX_AREA_SIZE
  207. bhs __flush_whole_cache
  208. 1: tst r2, #VM_EXEC
  209. mcrne p15, 0, r0, c7, c5, 1 @ Invalidate I cache line
  210. mcr p15, 0, r0, c7, c10, 1 @ Clean D cache line
  211. mcr p15, 0, r0, c7, c6, 1 @ Invalidate D cache line
  212. add r0, r0, #CACHELINESIZE
  213. cmp r0, r1
  214. blo 1b
  215. tst r2, #VM_EXEC
  216. mcrne p15, 0, ip, c7, c5, 6 @ Invalidate BTB
  217. mcrne p15, 0, ip, c7, c10, 4 @ Drain Write (& Fill) Buffer
  218. mov pc, lr
  219. /*
  220. * coherent_kern_range(start, end)
  221. *
  222. * Ensure coherency between the Icache and the Dcache in the
  223. * region described by start. If you have non-snooping
  224. * Harvard caches, you need to implement this function.
  225. *
  226. * - start - virtual start address
  227. * - end - virtual end address
  228. *
  229. * Note: single I-cache line invalidation isn't used here since
  230. * it also trashes the mini I-cache used by JTAG debuggers.
  231. */
  232. ENTRY(xscale_coherent_kern_range)
  233. bic r0, r0, #CACHELINESIZE - 1
  234. 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry
  235. add r0, r0, #CACHELINESIZE
  236. cmp r0, r1
  237. blo 1b
  238. mov r0, #0
  239. mcr p15, 0, r0, c7, c5, 0 @ Invalidate I cache & BTB
  240. mcr p15, 0, r0, c7, c10, 4 @ Drain Write (& Fill) Buffer
  241. mov pc, lr
  242. /*
  243. * coherent_user_range(start, end)
  244. *
  245. * Ensure coherency between the Icache and the Dcache in the
  246. * region described by start. If you have non-snooping
  247. * Harvard caches, you need to implement this function.
  248. *
  249. * - start - virtual start address
  250. * - end - virtual end address
  251. */
  252. ENTRY(xscale_coherent_user_range)
  253. bic r0, r0, #CACHELINESIZE - 1
  254. 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry
  255. mcr p15, 0, r0, c7, c5, 1 @ Invalidate I cache entry
  256. add r0, r0, #CACHELINESIZE
  257. cmp r0, r1
  258. blo 1b
  259. mov r0, #0
  260. mcr p15, 0, r0, c7, c5, 6 @ Invalidate BTB
  261. mcr p15, 0, r0, c7, c10, 4 @ Drain Write (& Fill) Buffer
  262. mov pc, lr
  263. /*
  264. * flush_kern_dcache_area(void *addr, size_t size)
  265. *
  266. * Ensure no D cache aliasing occurs, either with itself or
  267. * the I cache
  268. *
  269. * - addr - kernel address
  270. * - size - region size
  271. */
  272. ENTRY(xscale_flush_kern_dcache_area)
  273. add r1, r0, r1
  274. 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry
  275. mcr p15, 0, r0, c7, c6, 1 @ invalidate D entry
  276. add r0, r0, #CACHELINESIZE
  277. cmp r0, r1
  278. blo 1b
  279. mov r0, #0
  280. mcr p15, 0, r0, c7, c5, 0 @ Invalidate I cache & BTB
  281. mcr p15, 0, r0, c7, c10, 4 @ Drain Write (& Fill) Buffer
  282. mov pc, lr
  283. /*
  284. * dma_inv_range(start, end)
  285. *
  286. * Invalidate (discard) the specified virtual address range.
  287. * May not write back any entries. If 'start' or 'end'
  288. * are not cache line aligned, those lines must be written
  289. * back.
  290. *
  291. * - start - virtual start address
  292. * - end - virtual end address
  293. */
  294. ENTRY(xscale_dma_inv_range)
  295. tst r0, #CACHELINESIZE - 1
  296. bic r0, r0, #CACHELINESIZE - 1
  297. mcrne p15, 0, r0, c7, c10, 1 @ clean D entry
  298. tst r1, #CACHELINESIZE - 1
  299. mcrne p15, 0, r1, c7, c10, 1 @ clean D entry
  300. 1: mcr p15, 0, r0, c7, c6, 1 @ invalidate D entry
  301. add r0, r0, #CACHELINESIZE
  302. cmp r0, r1
  303. blo 1b
  304. mcr p15, 0, r0, c7, c10, 4 @ Drain Write (& Fill) Buffer
  305. mov pc, lr
  306. /*
  307. * dma_clean_range(start, end)
  308. *
  309. * Clean the specified virtual address range.
  310. *
  311. * - start - virtual start address
  312. * - end - virtual end address
  313. */
  314. ENTRY(xscale_dma_clean_range)
  315. bic r0, r0, #CACHELINESIZE - 1
  316. 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry
  317. add r0, r0, #CACHELINESIZE
  318. cmp r0, r1
  319. blo 1b
  320. mcr p15, 0, r0, c7, c10, 4 @ Drain Write (& Fill) Buffer
  321. mov pc, lr
  322. /*
  323. * dma_flush_range(start, end)
  324. *
  325. * Clean and invalidate the specified virtual address range.
  326. *
  327. * - start - virtual start address
  328. * - end - virtual end address
  329. */
  330. ENTRY(xscale_dma_flush_range)
  331. bic r0, r0, #CACHELINESIZE - 1
  332. 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry
  333. mcr p15, 0, r0, c7, c6, 1 @ invalidate D entry
  334. add r0, r0, #CACHELINESIZE
  335. cmp r0, r1
  336. blo 1b
  337. mcr p15, 0, r0, c7, c10, 4 @ Drain Write (& Fill) Buffer
  338. mov pc, lr
  339. /*
  340. * dma_map_area(start, size, dir)
  341. * - start - kernel virtual start address
  342. * - size - size of region
  343. * - dir - DMA direction
  344. */
  345. ENTRY(xscale_dma_map_area)
  346. add r1, r1, r0
  347. cmp r2, #DMA_TO_DEVICE
  348. beq xscale_dma_clean_range
  349. bcs xscale_dma_inv_range
  350. b xscale_dma_flush_range
  351. ENDPROC(xscale_dma_map_area)
  352. /*
  353. * dma_map_area(start, size, dir)
  354. * - start - kernel virtual start address
  355. * - size - size of region
  356. * - dir - DMA direction
  357. */
  358. ENTRY(xscale_dma_a0_map_area)
  359. add r1, r1, r0
  360. teq r2, #DMA_TO_DEVICE
  361. beq xscale_dma_clean_range
  362. b xscale_dma_flush_range
  363. ENDPROC(xscsale_dma_a0_map_area)
  364. /*
  365. * dma_unmap_area(start, size, dir)
  366. * - start - kernel virtual start address
  367. * - size - size of region
  368. * - dir - DMA direction
  369. */
  370. ENTRY(xscale_dma_unmap_area)
  371. mov pc, lr
  372. ENDPROC(xscale_dma_unmap_area)
  373. ENTRY(xscale_cache_fns)
  374. .long xscale_flush_kern_cache_all
  375. .long xscale_flush_user_cache_all
  376. .long xscale_flush_user_cache_range
  377. .long xscale_coherent_kern_range
  378. .long xscale_coherent_user_range
  379. .long xscale_flush_kern_dcache_area
  380. .long xscale_dma_map_area
  381. .long xscale_dma_unmap_area
  382. .long xscale_dma_inv_range
  383. .long xscale_dma_clean_range
  384. .long xscale_dma_flush_range
  385. /*
  386. * On stepping A0/A1 of the 80200, invalidating D-cache by line doesn't
  387. * clear the dirty bits, which means that if we invalidate a dirty line,
  388. * the dirty data can still be written back to external memory later on.
  389. *
  390. * The recommended workaround is to always do a clean D-cache line before
  391. * doing an invalidate D-cache line, so on the affected processors,
  392. * dma_inv_range() is implemented as dma_flush_range().
  393. *
  394. * See erratum #25 of "Intel 80200 Processor Specification Update",
  395. * revision January 22, 2003, available at:
  396. * http://www.intel.com/design/iio/specupdt/273415.htm
  397. */
  398. ENTRY(xscale_80200_A0_A1_cache_fns)
  399. .long xscale_flush_kern_cache_all
  400. .long xscale_flush_user_cache_all
  401. .long xscale_flush_user_cache_range
  402. .long xscale_coherent_kern_range
  403. .long xscale_coherent_user_range
  404. .long xscale_flush_kern_dcache_area
  405. .long xscale_dma_a0_map_area
  406. .long xscale_dma_unmap_area
  407. .long xscale_dma_flush_range
  408. .long xscale_dma_clean_range
  409. .long xscale_dma_flush_range
  410. ENTRY(cpu_xscale_dcache_clean_area)
  411. 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry
  412. add r0, r0, #CACHELINESIZE
  413. subs r1, r1, #CACHELINESIZE
  414. bhi 1b
  415. mov pc, lr
  416. /* =============================== PageTable ============================== */
  417. /*
  418. * cpu_xscale_switch_mm(pgd)
  419. *
  420. * Set the translation base pointer to be as described by pgd.
  421. *
  422. * pgd: new page tables
  423. */
  424. .align 5
  425. ENTRY(cpu_xscale_switch_mm)
  426. clean_d_cache r1, r2
  427. mcr p15, 0, ip, c7, c5, 0 @ Invalidate I cache & BTB
  428. mcr p15, 0, ip, c7, c10, 4 @ Drain Write (& Fill) Buffer
  429. mcr p15, 0, r0, c2, c0, 0 @ load page table pointer
  430. mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs
  431. cpwait_ret lr, ip
  432. /*
  433. * cpu_xscale_set_pte_ext(ptep, pte, ext)
  434. *
  435. * Set a PTE and flush it out
  436. *
  437. * Errata 40: must set memory to write-through for user read-only pages.
  438. */
  439. cpu_xscale_mt_table:
  440. .long 0x00 @ L_PTE_MT_UNCACHED
  441. .long PTE_BUFFERABLE @ L_PTE_MT_BUFFERABLE
  442. .long PTE_CACHEABLE @ L_PTE_MT_WRITETHROUGH
  443. .long PTE_CACHEABLE | PTE_BUFFERABLE @ L_PTE_MT_WRITEBACK
  444. .long PTE_EXT_TEX(1) | PTE_BUFFERABLE @ L_PTE_MT_DEV_SHARED
  445. .long 0x00 @ unused
  446. .long PTE_EXT_TEX(1) | PTE_CACHEABLE @ L_PTE_MT_MINICACHE
  447. .long PTE_EXT_TEX(1) | PTE_CACHEABLE | PTE_BUFFERABLE @ L_PTE_MT_WRITEALLOC
  448. .long 0x00 @ unused
  449. .long PTE_BUFFERABLE @ L_PTE_MT_DEV_WC
  450. .long 0x00 @ unused
  451. .long PTE_CACHEABLE | PTE_BUFFERABLE @ L_PTE_MT_DEV_CACHED
  452. .long 0x00 @ L_PTE_MT_DEV_NONSHARED
  453. .long 0x00 @ unused
  454. .long 0x00 @ unused
  455. .long 0x00 @ unused
  456. .align 5
  457. ENTRY(cpu_xscale_set_pte_ext)
  458. xscale_set_pte_ext_prologue
  459. @
  460. @ Erratum 40: must set memory to write-through for user read-only pages
  461. @
  462. and ip, r1, #(L_PTE_MT_MASK | L_PTE_USER | L_PTE_WRITE) & ~(4 << 2)
  463. teq ip, #L_PTE_MT_WRITEBACK | L_PTE_USER
  464. moveq r1, #L_PTE_MT_WRITETHROUGH
  465. and r1, r1, #L_PTE_MT_MASK
  466. adr ip, cpu_xscale_mt_table
  467. ldr ip, [ip, r1]
  468. bic r2, r2, #0x0c
  469. orr r2, r2, ip
  470. xscale_set_pte_ext_epilogue
  471. mov pc, lr
  472. .ltorg
  473. .align
  474. __INIT
  475. .type __xscale_setup, #function
  476. __xscale_setup:
  477. mcr p15, 0, ip, c7, c7, 0 @ invalidate I, D caches & BTB
  478. mcr p15, 0, ip, c7, c10, 4 @ Drain Write (& Fill) Buffer
  479. mcr p15, 0, ip, c8, c7, 0 @ invalidate I, D TLBs
  480. mov r0, #1 << 6 @ cp6 for IOP3xx and Bulverde
  481. orr r0, r0, #1 << 13 @ Its undefined whether this
  482. mcr p15, 0, r0, c15, c1, 0 @ affects USR or SVC modes
  483. adr r5, xscale_crval
  484. ldmia r5, {r5, r6}
  485. mrc p15, 0, r0, c1, c0, 0 @ get control register
  486. bic r0, r0, r5
  487. orr r0, r0, r6
  488. mov pc, lr
  489. .size __xscale_setup, . - __xscale_setup
  490. /*
  491. * R
  492. * .RVI ZFRS BLDP WCAM
  493. * ..11 1.01 .... .101
  494. *
  495. */
  496. .type xscale_crval, #object
  497. xscale_crval:
  498. crval clear=0x00003b07, mmuset=0x00003905, ucset=0x00001900
  499. __INITDATA
  500. /*
  501. * Purpose : Function pointers used to access above functions - all calls
  502. * come through these
  503. */
  504. .type xscale_processor_functions, #object
  505. ENTRY(xscale_processor_functions)
  506. .word v5t_early_abort
  507. .word legacy_pabort
  508. .word cpu_xscale_proc_init
  509. .word cpu_xscale_proc_fin
  510. .word cpu_xscale_reset
  511. .word cpu_xscale_do_idle
  512. .word cpu_xscale_dcache_clean_area
  513. .word cpu_xscale_switch_mm
  514. .word cpu_xscale_set_pte_ext
  515. .size xscale_processor_functions, . - xscale_processor_functions
  516. .section ".rodata"
  517. .type cpu_arch_name, #object
  518. cpu_arch_name:
  519. .asciz "armv5te"
  520. .size cpu_arch_name, . - cpu_arch_name
  521. .type cpu_elf_name, #object
  522. cpu_elf_name:
  523. .asciz "v5"
  524. .size cpu_elf_name, . - cpu_elf_name
  525. .type cpu_80200_A0_A1_name, #object
  526. cpu_80200_A0_A1_name:
  527. .asciz "XScale-80200 A0/A1"
  528. .size cpu_80200_A0_A1_name, . - cpu_80200_A0_A1_name
  529. .type cpu_80200_name, #object
  530. cpu_80200_name:
  531. .asciz "XScale-80200"
  532. .size cpu_80200_name, . - cpu_80200_name
  533. .type cpu_80219_name, #object
  534. cpu_80219_name:
  535. .asciz "XScale-80219"
  536. .size cpu_80219_name, . - cpu_80219_name
  537. .type cpu_8032x_name, #object
  538. cpu_8032x_name:
  539. .asciz "XScale-IOP8032x Family"
  540. .size cpu_8032x_name, . - cpu_8032x_name
  541. .type cpu_8033x_name, #object
  542. cpu_8033x_name:
  543. .asciz "XScale-IOP8033x Family"
  544. .size cpu_8033x_name, . - cpu_8033x_name
  545. .type cpu_pxa250_name, #object
  546. cpu_pxa250_name:
  547. .asciz "XScale-PXA250"
  548. .size cpu_pxa250_name, . - cpu_pxa250_name
  549. .type cpu_pxa210_name, #object
  550. cpu_pxa210_name:
  551. .asciz "XScale-PXA210"
  552. .size cpu_pxa210_name, . - cpu_pxa210_name
  553. .type cpu_ixp42x_name, #object
  554. cpu_ixp42x_name:
  555. .asciz "XScale-IXP42x Family"
  556. .size cpu_ixp42x_name, . - cpu_ixp42x_name
  557. .type cpu_ixp43x_name, #object
  558. cpu_ixp43x_name:
  559. .asciz "XScale-IXP43x Family"
  560. .size cpu_ixp43x_name, . - cpu_ixp43x_name
  561. .type cpu_ixp46x_name, #object
  562. cpu_ixp46x_name:
  563. .asciz "XScale-IXP46x Family"
  564. .size cpu_ixp46x_name, . - cpu_ixp46x_name
  565. .type cpu_ixp2400_name, #object
  566. cpu_ixp2400_name:
  567. .asciz "XScale-IXP2400"
  568. .size cpu_ixp2400_name, . - cpu_ixp2400_name
  569. .type cpu_ixp2800_name, #object
  570. cpu_ixp2800_name:
  571. .asciz "XScale-IXP2800"
  572. .size cpu_ixp2800_name, . - cpu_ixp2800_name
  573. .type cpu_pxa255_name, #object
  574. cpu_pxa255_name:
  575. .asciz "XScale-PXA255"
  576. .size cpu_pxa255_name, . - cpu_pxa255_name
  577. .type cpu_pxa270_name, #object
  578. cpu_pxa270_name:
  579. .asciz "XScale-PXA270"
  580. .size cpu_pxa270_name, . - cpu_pxa270_name
  581. .align
  582. .section ".proc.info.init", #alloc, #execinstr
  583. .type __80200_A0_A1_proc_info,#object
  584. __80200_A0_A1_proc_info:
  585. .long 0x69052000
  586. .long 0xfffffffe
  587. .long PMD_TYPE_SECT | \
  588. PMD_SECT_BUFFERABLE | \
  589. PMD_SECT_CACHEABLE | \
  590. PMD_SECT_AP_WRITE | \
  591. PMD_SECT_AP_READ
  592. .long PMD_TYPE_SECT | \
  593. PMD_SECT_AP_WRITE | \
  594. PMD_SECT_AP_READ
  595. b __xscale_setup
  596. .long cpu_arch_name
  597. .long cpu_elf_name
  598. .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP
  599. .long cpu_80200_name
  600. .long xscale_processor_functions
  601. .long v4wbi_tlb_fns
  602. .long xscale_mc_user_fns
  603. .long xscale_80200_A0_A1_cache_fns
  604. .size __80200_A0_A1_proc_info, . - __80200_A0_A1_proc_info
  605. .type __80200_proc_info,#object
  606. __80200_proc_info:
  607. .long 0x69052000
  608. .long 0xfffffff0
  609. .long PMD_TYPE_SECT | \
  610. PMD_SECT_BUFFERABLE | \
  611. PMD_SECT_CACHEABLE | \
  612. PMD_SECT_AP_WRITE | \
  613. PMD_SECT_AP_READ
  614. .long PMD_TYPE_SECT | \
  615. PMD_SECT_AP_WRITE | \
  616. PMD_SECT_AP_READ
  617. b __xscale_setup
  618. .long cpu_arch_name
  619. .long cpu_elf_name
  620. .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP
  621. .long cpu_80200_name
  622. .long xscale_processor_functions
  623. .long v4wbi_tlb_fns
  624. .long xscale_mc_user_fns
  625. .long xscale_cache_fns
  626. .size __80200_proc_info, . - __80200_proc_info
  627. .type __80219_proc_info,#object
  628. __80219_proc_info:
  629. .long 0x69052e20
  630. .long 0xffffffe0
  631. .long PMD_TYPE_SECT | \
  632. PMD_SECT_BUFFERABLE | \
  633. PMD_SECT_CACHEABLE | \
  634. PMD_SECT_AP_WRITE | \
  635. PMD_SECT_AP_READ
  636. .long PMD_TYPE_SECT | \
  637. PMD_SECT_AP_WRITE | \
  638. PMD_SECT_AP_READ
  639. b __xscale_setup
  640. .long cpu_arch_name
  641. .long cpu_elf_name
  642. .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP
  643. .long cpu_80219_name
  644. .long xscale_processor_functions
  645. .long v4wbi_tlb_fns
  646. .long xscale_mc_user_fns
  647. .long xscale_cache_fns
  648. .size __80219_proc_info, . - __80219_proc_info
  649. .type __8032x_proc_info,#object
  650. __8032x_proc_info:
  651. .long 0x69052420
  652. .long 0xfffff7e0
  653. .long PMD_TYPE_SECT | \
  654. PMD_SECT_BUFFERABLE | \
  655. PMD_SECT_CACHEABLE | \
  656. PMD_SECT_AP_WRITE | \
  657. PMD_SECT_AP_READ
  658. .long PMD_TYPE_SECT | \
  659. PMD_SECT_AP_WRITE | \
  660. PMD_SECT_AP_READ
  661. b __xscale_setup
  662. .long cpu_arch_name
  663. .long cpu_elf_name
  664. .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP
  665. .long cpu_8032x_name
  666. .long xscale_processor_functions
  667. .long v4wbi_tlb_fns
  668. .long xscale_mc_user_fns
  669. .long xscale_cache_fns
  670. .size __8032x_proc_info, . - __8032x_proc_info
  671. .type __8033x_proc_info,#object
  672. __8033x_proc_info:
  673. .long 0x69054010
  674. .long 0xfffffd30
  675. .long PMD_TYPE_SECT | \
  676. PMD_SECT_BUFFERABLE | \
  677. PMD_SECT_CACHEABLE | \
  678. PMD_SECT_AP_WRITE | \
  679. PMD_SECT_AP_READ
  680. .long PMD_TYPE_SECT | \
  681. PMD_SECT_AP_WRITE | \
  682. PMD_SECT_AP_READ
  683. b __xscale_setup
  684. .long cpu_arch_name
  685. .long cpu_elf_name
  686. .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP
  687. .long cpu_8033x_name
  688. .long xscale_processor_functions
  689. .long v4wbi_tlb_fns
  690. .long xscale_mc_user_fns
  691. .long xscale_cache_fns
  692. .size __8033x_proc_info, . - __8033x_proc_info
  693. .type __pxa250_proc_info,#object
  694. __pxa250_proc_info:
  695. .long 0x69052100
  696. .long 0xfffff7f0
  697. .long PMD_TYPE_SECT | \
  698. PMD_SECT_BUFFERABLE | \
  699. PMD_SECT_CACHEABLE | \
  700. PMD_SECT_AP_WRITE | \
  701. PMD_SECT_AP_READ
  702. .long PMD_TYPE_SECT | \
  703. PMD_SECT_AP_WRITE | \
  704. PMD_SECT_AP_READ
  705. b __xscale_setup
  706. .long cpu_arch_name
  707. .long cpu_elf_name
  708. .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP
  709. .long cpu_pxa250_name
  710. .long xscale_processor_functions
  711. .long v4wbi_tlb_fns
  712. .long xscale_mc_user_fns
  713. .long xscale_cache_fns
  714. .size __pxa250_proc_info, . - __pxa250_proc_info
  715. .type __pxa210_proc_info,#object
  716. __pxa210_proc_info:
  717. .long 0x69052120
  718. .long 0xfffff3f0
  719. .long PMD_TYPE_SECT | \
  720. PMD_SECT_BUFFERABLE | \
  721. PMD_SECT_CACHEABLE | \
  722. PMD_SECT_AP_WRITE | \
  723. PMD_SECT_AP_READ
  724. .long PMD_TYPE_SECT | \
  725. PMD_SECT_AP_WRITE | \
  726. PMD_SECT_AP_READ
  727. b __xscale_setup
  728. .long cpu_arch_name
  729. .long cpu_elf_name
  730. .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP
  731. .long cpu_pxa210_name
  732. .long xscale_processor_functions
  733. .long v4wbi_tlb_fns
  734. .long xscale_mc_user_fns
  735. .long xscale_cache_fns
  736. .size __pxa210_proc_info, . - __pxa210_proc_info
  737. .type __ixp2400_proc_info, #object
  738. __ixp2400_proc_info:
  739. .long 0x69054190
  740. .long 0xfffffff0
  741. .long PMD_TYPE_SECT | \
  742. PMD_SECT_BUFFERABLE | \
  743. PMD_SECT_CACHEABLE | \
  744. PMD_SECT_AP_WRITE | \
  745. PMD_SECT_AP_READ
  746. .long PMD_TYPE_SECT | \
  747. PMD_SECT_AP_WRITE | \
  748. PMD_SECT_AP_READ
  749. b __xscale_setup
  750. .long cpu_arch_name
  751. .long cpu_elf_name
  752. .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP
  753. .long cpu_ixp2400_name
  754. .long xscale_processor_functions
  755. .long v4wbi_tlb_fns
  756. .long xscale_mc_user_fns
  757. .long xscale_cache_fns
  758. .size __ixp2400_proc_info, . - __ixp2400_proc_info
  759. .type __ixp2800_proc_info, #object
  760. __ixp2800_proc_info:
  761. .long 0x690541a0
  762. .long 0xfffffff0
  763. .long PMD_TYPE_SECT | \
  764. PMD_SECT_BUFFERABLE | \
  765. PMD_SECT_CACHEABLE | \
  766. PMD_SECT_AP_WRITE | \
  767. PMD_SECT_AP_READ
  768. .long PMD_TYPE_SECT | \
  769. PMD_SECT_AP_WRITE | \
  770. PMD_SECT_AP_READ
  771. b __xscale_setup
  772. .long cpu_arch_name
  773. .long cpu_elf_name
  774. .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP
  775. .long cpu_ixp2800_name
  776. .long xscale_processor_functions
  777. .long v4wbi_tlb_fns
  778. .long xscale_mc_user_fns
  779. .long xscale_cache_fns
  780. .size __ixp2800_proc_info, . - __ixp2800_proc_info
  781. .type __ixp42x_proc_info, #object
  782. __ixp42x_proc_info:
  783. .long 0x690541c0
  784. .long 0xffffffc0
  785. .long PMD_TYPE_SECT | \
  786. PMD_SECT_BUFFERABLE | \
  787. PMD_SECT_CACHEABLE | \
  788. PMD_SECT_AP_WRITE | \
  789. PMD_SECT_AP_READ
  790. .long PMD_TYPE_SECT | \
  791. PMD_SECT_AP_WRITE | \
  792. PMD_SECT_AP_READ
  793. b __xscale_setup
  794. .long cpu_arch_name
  795. .long cpu_elf_name
  796. .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP
  797. .long cpu_ixp42x_name
  798. .long xscale_processor_functions
  799. .long v4wbi_tlb_fns
  800. .long xscale_mc_user_fns
  801. .long xscale_cache_fns
  802. .size __ixp42x_proc_info, . - __ixp42x_proc_info
  803. .type __ixp43x_proc_info, #object
  804. __ixp43x_proc_info:
  805. .long 0x69054040
  806. .long 0xfffffff0
  807. .long PMD_TYPE_SECT | \
  808. PMD_SECT_BUFFERABLE | \
  809. PMD_SECT_CACHEABLE | \
  810. PMD_SECT_AP_WRITE | \
  811. PMD_SECT_AP_READ
  812. .long PMD_TYPE_SECT | \
  813. PMD_SECT_AP_WRITE | \
  814. PMD_SECT_AP_READ
  815. b __xscale_setup
  816. .long cpu_arch_name
  817. .long cpu_elf_name
  818. .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP
  819. .long cpu_ixp43x_name
  820. .long xscale_processor_functions
  821. .long v4wbi_tlb_fns
  822. .long xscale_mc_user_fns
  823. .long xscale_cache_fns
  824. .size __ixp43x_proc_info, . - __ixp43x_proc_info
  825. .type __ixp46x_proc_info, #object
  826. __ixp46x_proc_info:
  827. .long 0x69054200
  828. .long 0xffffff00
  829. .long PMD_TYPE_SECT | \
  830. PMD_SECT_BUFFERABLE | \
  831. PMD_SECT_CACHEABLE | \
  832. PMD_SECT_AP_WRITE | \
  833. PMD_SECT_AP_READ
  834. .long PMD_TYPE_SECT | \
  835. PMD_SECT_AP_WRITE | \
  836. PMD_SECT_AP_READ
  837. b __xscale_setup
  838. .long cpu_arch_name
  839. .long cpu_elf_name
  840. .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP
  841. .long cpu_ixp46x_name
  842. .long xscale_processor_functions
  843. .long v4wbi_tlb_fns
  844. .long xscale_mc_user_fns
  845. .long xscale_cache_fns
  846. .size __ixp46x_proc_info, . - __ixp46x_proc_info
  847. .type __pxa255_proc_info,#object
  848. __pxa255_proc_info:
  849. .long 0x69052d00
  850. .long 0xfffffff0
  851. .long PMD_TYPE_SECT | \
  852. PMD_SECT_BUFFERABLE | \
  853. PMD_SECT_CACHEABLE | \
  854. PMD_SECT_AP_WRITE | \
  855. PMD_SECT_AP_READ
  856. .long PMD_TYPE_SECT | \
  857. PMD_SECT_AP_WRITE | \
  858. PMD_SECT_AP_READ
  859. b __xscale_setup
  860. .long cpu_arch_name
  861. .long cpu_elf_name
  862. .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP
  863. .long cpu_pxa255_name
  864. .long xscale_processor_functions
  865. .long v4wbi_tlb_fns
  866. .long xscale_mc_user_fns
  867. .long xscale_cache_fns
  868. .size __pxa255_proc_info, . - __pxa255_proc_info
  869. .type __pxa270_proc_info,#object
  870. __pxa270_proc_info:
  871. .long 0x69054110
  872. .long 0xfffffff0
  873. .long PMD_TYPE_SECT | \
  874. PMD_SECT_BUFFERABLE | \
  875. PMD_SECT_CACHEABLE | \
  876. PMD_SECT_AP_WRITE | \
  877. PMD_SECT_AP_READ
  878. .long PMD_TYPE_SECT | \
  879. PMD_SECT_AP_WRITE | \
  880. PMD_SECT_AP_READ
  881. b __xscale_setup
  882. .long cpu_arch_name
  883. .long cpu_elf_name
  884. .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP
  885. .long cpu_pxa270_name
  886. .long xscale_processor_functions
  887. .long v4wbi_tlb_fns
  888. .long xscale_mc_user_fns
  889. .long xscale_cache_fns
  890. .size __pxa270_proc_info, . - __pxa270_proc_info