entry.S 29 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213
  1. /*
  2. * File: arch/blackfin/mach-common/entry.S
  3. * Based on:
  4. * Author: Linus Torvalds
  5. *
  6. * Created: ?
  7. * Description: contains the system-call and fault low-level handling routines.
  8. * This also contains the timer-interrupt handler, as well as all
  9. * interrupts and faults that can result in a task-switch.
  10. *
  11. * Modified:
  12. * Copyright 2004-2006 Analog Devices Inc.
  13. *
  14. * Bugs: Enter bugs at http://blackfin.uclinux.org/
  15. *
  16. * This program is free software; you can redistribute it and/or modify
  17. * it under the terms of the GNU General Public License as published by
  18. * the Free Software Foundation; either version 2 of the License, or
  19. * (at your option) any later version.
  20. *
  21. * This program is distributed in the hope that it will be useful,
  22. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  23. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  24. * GNU General Public License for more details.
  25. *
  26. * You should have received a copy of the GNU General Public License
  27. * along with this program; if not, see the file COPYING, or write
  28. * to the Free Software Foundation, Inc.,
  29. * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  30. */
  31. /*
  32. * 25-Dec-2004 - LG Soft India
  33. * 1. Fix in return_from_int, to make sure any pending
  34. * system call in ILAT for this process to get
  35. * executed, otherwise in case context switch happens,
  36. * system call of first process (i.e in ILAT) will be
  37. * carried forward to the switched process.
  38. * 2. Removed Constant references for the following
  39. * a. IPEND
  40. * b. EXCAUSE mask
  41. * c. PAGE Mask
  42. */
  43. /*
  44. * NOTE: This code handles signal-recognition, which happens every time
  45. * after a timer-interrupt and after each system call.
  46. */
  47. #include <linux/linkage.h>
  48. #include <asm/blackfin.h>
  49. #include <asm/unistd.h>
  50. #include <asm/errno.h>
  51. #include <asm/thread_info.h> /* TIF_NEED_RESCHED */
  52. #include <asm/asm-offsets.h>
  53. #include <asm/mach-common/context.S>
  54. #ifdef CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE
  55. /*
  56. * TODO: this should be proper save/restore, but for now
  57. * we'll just cheat and use 0x1/0x13
  58. */
  59. # define DEBUG_START_HWTRACE \
  60. P5.l = LO(TBUFCTL); \
  61. P5.h = HI(TBUFCTL); \
  62. R7 = 0x13; \
  63. [P5] = R7;
  64. # define DEBUG_STOP_HWTRACE \
  65. P5.l = LO(TBUFCTL); \
  66. P5.h = HI(TBUFCTL); \
  67. R7 = 0x01; \
  68. [P5] = R7;
  69. #else
  70. # define DEBUG_START_HWTRACE
  71. # define DEBUG_STOP_HWTRACE
  72. #endif
  73. #ifdef CONFIG_EXCPT_IRQ_SYSC_L1
  74. .section .l1.text
  75. #else
  76. .text
  77. #endif
  78. /* Slightly simplified and streamlined entry point for CPLB misses.
  79. * This one does not lower the level to IRQ5, and thus can be used to
  80. * patch up CPLB misses on the kernel stack.
  81. */
  82. ENTRY(_ex_dcplb)
  83. #if defined(ANOMALY_05000261)
  84. /*
  85. * Work around an anomaly: if we see a new DCPLB fault, return
  86. * without doing anything. Then, if we get the same fault again,
  87. * handle it.
  88. */
  89. p5.l = _last_cplb_fault_retx;
  90. p5.h = _last_cplb_fault_retx;
  91. r7 = [p5];
  92. r6 = retx;
  93. [p5] = r6;
  94. cc = r6 == r7;
  95. if !cc jump _return_from_exception;
  96. /* fall through */
  97. #endif
  98. ENTRY(_ex_icplb)
  99. (R7:6,P5:4) = [sp++];
  100. ASTAT = [sp++];
  101. SAVE_ALL_SYS
  102. call __cplb_hdr;
  103. DEBUG_START_HWTRACE
  104. RESTORE_ALL_SYS
  105. SP = RETN;
  106. rtx;
  107. ENTRY(_ex_spinlock)
  108. /* Transform this into a syscall - twiddle the syscall vector. */
  109. p5.l = lo(EVT15);
  110. p5.h = hi(EVT15);
  111. r7.l = _spinlock_bh;
  112. r7.h = _spinlock_bh;
  113. [p5] = r7;
  114. csync;
  115. /* Fall through. */
  116. ENTRY(_ex_syscall)
  117. DEBUG_START_HWTRACE
  118. (R7:6,P5:4) = [sp++];
  119. ASTAT = [sp++];
  120. raise 15; /* invoked by TRAP #0, for sys call */
  121. sp = retn;
  122. rtx
  123. ENTRY(_spinlock_bh)
  124. SAVE_ALL_SYS
  125. /* To end up here, vector 15 was changed - so we have to change it
  126. * back.
  127. */
  128. p0.l = lo(EVT15);
  129. p0.h = hi(EVT15);
  130. p1.l = _evt_system_call;
  131. p1.h = _evt_system_call;
  132. [p0] = p1;
  133. csync;
  134. r0 = [sp + PT_R0];
  135. sp += -12;
  136. call _sys_bfin_spinlock;
  137. sp += 12;
  138. [SP + PT_R0] = R0;
  139. RESTORE_ALL_SYS
  140. rti;
  141. ENTRY(_ex_soft_bp)
  142. r7 = retx;
  143. r7 += -2;
  144. retx = r7;
  145. jump.s _ex_trap_c;
  146. ENTRY(_ex_single_step)
  147. r7 = retx;
  148. r6 = reti;
  149. cc = r7 == r6;
  150. if cc jump _return_from_exception
  151. r7 = syscfg;
  152. bitclr (r7, 0);
  153. syscfg = R7;
  154. p5.l = lo(IPEND);
  155. p5.h = hi(IPEND);
  156. r6 = [p5];
  157. cc = bittst(r6, 5);
  158. if !cc jump _ex_trap_c;
  159. p4.l = lo(EVT5);
  160. p4.h = hi(EVT5);
  161. r6.h = _exception_to_level5;
  162. r6.l = _exception_to_level5;
  163. r7 = [p4];
  164. cc = r6 == r7;
  165. if !cc jump _ex_trap_c;
  166. _return_from_exception:
  167. DEBUG_START_HWTRACE
  168. #ifdef ANOMALY_05000257
  169. R7=LC0;
  170. LC0=R7;
  171. R7=LC1;
  172. LC1=R7;
  173. #endif
  174. (R7:6,P5:4) = [sp++];
  175. ASTAT = [sp++];
  176. sp = retn;
  177. rtx;
  178. ENTRY(_handle_bad_cplb)
  179. /* To get here, we just tried and failed to change a CPLB
  180. * so, handle things in trap_c (C code), by lowering to
  181. * IRQ5, just like we normally do. Since this is not a
  182. * "normal" return path, we have a do alot of stuff to
  183. * the stack to get ready so, we can fall through - we
  184. * need to make a CPLB exception look like a normal exception
  185. */
  186. DEBUG_START_HWTRACE
  187. RESTORE_ALL_SYS
  188. [--sp] = ASTAT;
  189. [--sp] = (R7:6, P5:4);
  190. ENTRY(_ex_trap_c)
  191. /* Call C code (trap_c) to handle the exception, which most
  192. * likely involves sending a signal to the current process.
  193. * To avoid double faults, lower our priority to IRQ5 first.
  194. */
  195. P5.h = _exception_to_level5;
  196. P5.l = _exception_to_level5;
  197. p4.l = lo(EVT5);
  198. p4.h = hi(EVT5);
  199. [p4] = p5;
  200. csync;
  201. /* Disable all interrupts, but make sure level 5 is enabled so
  202. * we can switch to that level. Save the old mask. */
  203. cli r6;
  204. p4.l = _excpt_saved_imask;
  205. p4.h = _excpt_saved_imask;
  206. [p4] = r6;
  207. r6 = 0x3f;
  208. sti r6;
  209. /* Save the excause into a circular buffer, in case the instruction
  210. * which caused this excecptions causes others.
  211. */
  212. P5.l = _in_ptr_excause;
  213. P5.h = _in_ptr_excause;
  214. R7 = [P5];
  215. R7 += 4;
  216. R6 = 0xF;
  217. R7 = R7 & R6;
  218. [P5] = R7;
  219. R6.l = _excause_circ_buf;
  220. R6.h = _excause_circ_buf;
  221. R7 = R7 + R6;
  222. p5 = R7;
  223. R6 = SEQSTAT;
  224. [P5] = R6;
  225. DEBUG_START_HWTRACE
  226. (R7:6,P5:4) = [sp++];
  227. ASTAT = [sp++];
  228. SP = RETN;
  229. raise 5;
  230. rtx;
  231. ENTRY(_exception_to_level5)
  232. SAVE_ALL_SYS
  233. /* Restore interrupt mask. We haven't pushed RETI, so this
  234. * doesn't enable interrupts until we return from this handler. */
  235. p4.l = _excpt_saved_imask;
  236. p4.h = _excpt_saved_imask;
  237. r6 = [p4];
  238. sti r6;
  239. /* Restore the hardware error vector. */
  240. P5.h = _evt_ivhw;
  241. P5.l = _evt_ivhw;
  242. p4.l = lo(EVT5);
  243. p4.h = hi(EVT5);
  244. [p4] = p5;
  245. csync;
  246. p2.l = lo(IPEND);
  247. p2.h = hi(IPEND);
  248. csync;
  249. r0 = [p2]; /* Read current IPEND */
  250. [sp + PT_IPEND] = r0; /* Store IPEND */
  251. /* Pop the excause from the circular buffer and push it on the stack
  252. * (in the right place - if you change the location of SEQSTAT, you
  253. * must change this offset.
  254. */
  255. .L_excep_to_5_again:
  256. P5.l = _out_ptr_excause;
  257. P5.h = _out_ptr_excause;
  258. R7 = [P5];
  259. R7 += 4;
  260. R6 = 0xF;
  261. R7 = R7 & R6;
  262. [P5] = R7;
  263. R6.l = _excause_circ_buf;
  264. R6.h = _excause_circ_buf;
  265. R7 = R7 + R6;
  266. P5 = R7;
  267. R1 = [P5];
  268. [SP + 8] = r1;
  269. r0 = sp; /* stack frame pt_regs pointer argument ==> r0 */
  270. SP += -12;
  271. call _trap_c;
  272. SP += 12;
  273. /* See if anything else is in the exception buffer
  274. * if there is, process it
  275. */
  276. P5.l = _out_ptr_excause;
  277. P5.h = _out_ptr_excause;
  278. P4.l = _in_ptr_excause;
  279. P4.h = _in_ptr_excause;
  280. R6 = [P5];
  281. R7 = [P4];
  282. CC = R6 == R7;
  283. if ! CC JUMP .L_excep_to_5_again
  284. call _ret_from_exception;
  285. RESTORE_ALL_SYS
  286. rti;
  287. ENTRY(_trap) /* Exception: 4th entry into system event table(supervisor mode)*/
  288. /* Since the kernel stack can be anywhere, it's not guaranteed to be
  289. * covered by a CPLB. Switch to an exception stack; use RETN as a
  290. * scratch register (for want of a better option).
  291. */
  292. retn = sp;
  293. sp.l = _exception_stack_top;
  294. sp.h = _exception_stack_top;
  295. /* Try to deal with syscalls quickly. */
  296. [--sp] = ASTAT;
  297. [--sp] = (R7:6, P5:4);
  298. DEBUG_STOP_HWTRACE
  299. r7 = SEQSTAT; /* reason code is in bit 5:0 */
  300. r6.l = lo(SEQSTAT_EXCAUSE);
  301. r6.h = hi(SEQSTAT_EXCAUSE);
  302. r7 = r7 & r6;
  303. p5.h = _extable;
  304. p5.l = _extable;
  305. p4 = r7;
  306. p5 = p5 + (p4 << 2);
  307. p4 = [p5];
  308. jump (p4);
  309. .Lbadsys:
  310. r7 = -ENOSYS; /* signextending enough */
  311. [sp + PT_R0] = r7; /* return value from system call */
  312. jump .Lsyscall_really_exit;
  313. ENTRY(_kernel_execve)
  314. link SIZEOF_PTREGS;
  315. p0 = sp;
  316. r3 = SIZEOF_PTREGS / 4;
  317. r4 = 0(x);
  318. 0:
  319. [p0++] = r4;
  320. r3 += -1;
  321. cc = r3 == 0;
  322. if !cc jump 0b (bp);
  323. p0 = sp;
  324. sp += -16;
  325. [sp + 12] = p0;
  326. call _do_execve;
  327. SP += 16;
  328. cc = r0 == 0;
  329. if ! cc jump 1f;
  330. /* Success. Copy our temporary pt_regs to the top of the kernel
  331. * stack and do a normal exception return.
  332. */
  333. r1 = sp;
  334. r0 = (-KERNEL_STACK_SIZE) (x);
  335. r1 = r1 & r0;
  336. p2 = r1;
  337. p3 = [p2];
  338. r0 = KERNEL_STACK_SIZE - 4 (z);
  339. p1 = r0;
  340. p1 = p1 + p2;
  341. p0 = fp;
  342. r4 = [p0--];
  343. r3 = SIZEOF_PTREGS / 4;
  344. 0:
  345. r4 = [p0--];
  346. [p1--] = r4;
  347. r3 += -1;
  348. cc = r3 == 0;
  349. if ! cc jump 0b (bp);
  350. r0 = (KERNEL_STACK_SIZE - SIZEOF_PTREGS) (z);
  351. p1 = r0;
  352. p1 = p1 + p2;
  353. sp = p1;
  354. r0 = syscfg;
  355. [SP + PT_SYSCFG] = r0;
  356. [p3 + (TASK_THREAD + THREAD_KSP)] = sp;
  357. RESTORE_CONTEXT;
  358. rti;
  359. 1:
  360. unlink;
  361. rts;
  362. ENTRY(_system_call)
  363. /* Store IPEND */
  364. p2.l = lo(IPEND);
  365. p2.h = hi(IPEND);
  366. csync;
  367. r0 = [p2];
  368. [sp + PT_IPEND] = r0;
  369. /* Store RETS for now */
  370. r0 = rets;
  371. [sp + PT_RESERVED] = r0;
  372. /* Set the stack for the current process */
  373. r7 = sp;
  374. r6.l = lo(ALIGN_PAGE_MASK);
  375. r6.h = hi(ALIGN_PAGE_MASK);
  376. r7 = r7 & r6; /* thread_info */
  377. p2 = r7;
  378. p2 = [p2];
  379. [p2+(TASK_THREAD+THREAD_KSP)] = sp;
  380. /* Check the System Call */
  381. r7 = __NR_syscall;
  382. /* System call number is passed in P0 */
  383. r6 = p0;
  384. cc = r6 < r7;
  385. if ! cc jump .Lbadsys;
  386. /* are we tracing syscalls?*/
  387. r7 = sp;
  388. r6.l = lo(ALIGN_PAGE_MASK);
  389. r6.h = hi(ALIGN_PAGE_MASK);
  390. r7 = r7 & r6;
  391. p2 = r7;
  392. r7 = [p2+TI_FLAGS];
  393. CC = BITTST(r7,TIF_SYSCALL_TRACE);
  394. if CC JUMP _sys_trace;
  395. /* Execute the appropriate system call */
  396. p4 = p0;
  397. p5.l = _sys_call_table;
  398. p5.h = _sys_call_table;
  399. p5 = p5 + (p4 << 2);
  400. r0 = [sp + PT_R0];
  401. r1 = [sp + PT_R1];
  402. r2 = [sp + PT_R2];
  403. p5 = [p5];
  404. [--sp] = r5;
  405. [--sp] = r4;
  406. [--sp] = r3;
  407. SP += -12;
  408. call (p5);
  409. SP += 24;
  410. [sp + PT_R0] = r0;
  411. .Lresume_userspace:
  412. r7 = sp;
  413. r4.l = lo(ALIGN_PAGE_MASK);
  414. r4.h = hi(ALIGN_PAGE_MASK);
  415. r7 = r7 & r4; /* thread_info->flags */
  416. p5 = r7;
  417. .Lresume_userspace_1:
  418. /* Disable interrupts. */
  419. [--sp] = reti;
  420. reti = [sp++];
  421. r7 = [p5 + TI_FLAGS];
  422. r4.l = lo(_TIF_WORK_MASK);
  423. r4.h = hi(_TIF_WORK_MASK);
  424. r7 = r7 & r4;
  425. .Lsyscall_resched:
  426. cc = BITTST(r7, TIF_NEED_RESCHED);
  427. if !cc jump .Lsyscall_sigpending;
  428. /* Reenable interrupts. */
  429. [--sp] = reti;
  430. r0 = [sp++];
  431. SP += -12;
  432. call _schedule;
  433. SP += 12;
  434. jump .Lresume_userspace_1;
  435. .Lsyscall_sigpending:
  436. cc = BITTST(r7, TIF_RESTORE_SIGMASK);
  437. if cc jump .Lsyscall_do_signals;
  438. cc = BITTST(r7, TIF_SIGPENDING);
  439. if !cc jump .Lsyscall_really_exit;
  440. .Lsyscall_do_signals:
  441. /* Reenable interrupts. */
  442. [--sp] = reti;
  443. r0 = [sp++];
  444. r0 = sp;
  445. SP += -12;
  446. call _do_signal;
  447. SP += 12;
  448. .Lsyscall_really_exit:
  449. r5 = [sp + PT_RESERVED];
  450. rets = r5;
  451. rts;
  452. _sys_trace:
  453. call _syscall_trace;
  454. /* Execute the appropriate system call */
  455. p4 = [SP + PT_P0];
  456. p5.l = _sys_call_table;
  457. p5.h = _sys_call_table;
  458. p5 = p5 + (p4 << 2);
  459. r0 = [sp + PT_R0];
  460. r1 = [sp + PT_R1];
  461. r2 = [sp + PT_R2];
  462. r3 = [sp + PT_R3];
  463. r4 = [sp + PT_R4];
  464. r5 = [sp + PT_R5];
  465. p5 = [p5];
  466. [--sp] = r5;
  467. [--sp] = r4;
  468. [--sp] = r3;
  469. SP += -12;
  470. call (p5);
  471. SP += 24;
  472. [sp + PT_R0] = r0;
  473. call _syscall_trace;
  474. jump .Lresume_userspace;
  475. ENTRY(_resume)
  476. /*
  477. * Beware - when entering resume, prev (the current task) is
  478. * in r0, next (the new task) is in r1.
  479. */
  480. p0 = r0;
  481. p1 = r1;
  482. [--sp] = rets;
  483. [--sp] = fp;
  484. [--sp] = (r7:4, p5:3);
  485. /* save usp */
  486. p2 = usp;
  487. [p0+(TASK_THREAD+THREAD_USP)] = p2;
  488. /* save current kernel stack pointer */
  489. [p0+(TASK_THREAD+THREAD_KSP)] = sp;
  490. /* save program counter */
  491. r1.l = _new_old_task;
  492. r1.h = _new_old_task;
  493. [p0+(TASK_THREAD+THREAD_PC)] = r1;
  494. /* restore the kernel stack pointer */
  495. sp = [p1+(TASK_THREAD+THREAD_KSP)];
  496. /* restore user stack pointer */
  497. p0 = [p1+(TASK_THREAD+THREAD_USP)];
  498. usp = p0;
  499. /* restore pc */
  500. p0 = [p1+(TASK_THREAD+THREAD_PC)];
  501. jump (p0);
  502. /*
  503. * Following code actually lands up in a new (old) task.
  504. */
  505. _new_old_task:
  506. (r7:4, p5:3) = [sp++];
  507. fp = [sp++];
  508. rets = [sp++];
  509. /*
  510. * When we come out of resume, r0 carries "old" task, becuase we are
  511. * in "new" task.
  512. */
  513. rts;
  514. ENTRY(_ret_from_exception)
  515. p2.l = lo(IPEND);
  516. p2.h = hi(IPEND);
  517. csync;
  518. r0 = [p2];
  519. [sp + PT_IPEND] = r0;
  520. 1:
  521. r1 = 0x37(Z);
  522. r2 = ~r1;
  523. r2.h = 0;
  524. r0 = r2 & r0;
  525. cc = r0 == 0;
  526. if !cc jump 4f; /* if not return to user mode, get out */
  527. /* Make sure any pending system call or deferred exception
  528. * return in ILAT for this process to get executed, otherwise
  529. * in case context switch happens, system call of
  530. * first process (i.e in ILAT) will be carried
  531. * forward to the switched process
  532. */
  533. p2.l = lo(ILAT);
  534. p2.h = hi(ILAT);
  535. r0 = [p2];
  536. r1 = (EVT_IVG14 | EVT_IVG15) (z);
  537. r0 = r0 & r1;
  538. cc = r0 == 0;
  539. if !cc jump 5f;
  540. /* Set the stack for the current process */
  541. r7 = sp;
  542. r4.l = lo(ALIGN_PAGE_MASK);
  543. r4.h = hi(ALIGN_PAGE_MASK);
  544. r7 = r7 & r4; /* thread_info->flags */
  545. p5 = r7;
  546. r7 = [p5 + TI_FLAGS];
  547. r4.l = lo(_TIF_WORK_MASK);
  548. r4.h = hi(_TIF_WORK_MASK);
  549. r7 = r7 & r4;
  550. cc = r7 == 0;
  551. if cc jump 4f;
  552. p0.l = lo(EVT15);
  553. p0.h = hi(EVT15);
  554. p1.l = _schedule_and_signal;
  555. p1.h = _schedule_and_signal;
  556. [p0] = p1;
  557. csync;
  558. raise 15; /* raise evt14 to do signal or reschedule */
  559. 4:
  560. r0 = syscfg;
  561. bitclr(r0, 0);
  562. syscfg = r0;
  563. 5:
  564. rts;
  565. ENTRY(_return_from_int)
  566. /* If someone else already raised IRQ 15, do nothing. */
  567. csync;
  568. p2.l = lo(ILAT);
  569. p2.h = hi(ILAT);
  570. r0 = [p2];
  571. cc = bittst (r0, EVT_IVG15_P);
  572. if cc jump 2f;
  573. /* if not return to user mode, get out */
  574. p2.l = lo(IPEND);
  575. p2.h = hi(IPEND);
  576. r0 = [p2];
  577. r1 = 0x17(Z);
  578. r2 = ~r1;
  579. r2.h = 0;
  580. r0 = r2 & r0;
  581. r1 = 1;
  582. r1 = r0 - r1;
  583. r2 = r0 & r1;
  584. cc = r2 == 0;
  585. if !cc jump 2f;
  586. /* Lower the interrupt level to 15. */
  587. p0.l = lo(EVT15);
  588. p0.h = hi(EVT15);
  589. p1.l = _schedule_and_signal_from_int;
  590. p1.h = _schedule_and_signal_from_int;
  591. [p0] = p1;
  592. csync;
  593. #if defined(ANOMALY_05000281)
  594. r0.l = lo(CONFIG_BOOT_LOAD);
  595. r0.h = hi(CONFIG_BOOT_LOAD);
  596. reti = r0;
  597. #endif
  598. r0 = 0x801f (z);
  599. STI r0;
  600. raise 15; /* raise evt15 to do signal or reschedule */
  601. rti;
  602. 2:
  603. rts;
  604. ENTRY(_lower_to_irq14)
  605. #if defined(ANOMALY_05000281)
  606. r0.l = lo(CONFIG_BOOT_LOAD);
  607. r0.h = hi(CONFIG_BOOT_LOAD);
  608. reti = r0;
  609. #endif
  610. r0 = 0x401f;
  611. sti r0;
  612. raise 14;
  613. rti;
  614. ENTRY(_evt14_softirq)
  615. #ifdef CONFIG_DEBUG_HWERR
  616. r0 = 0x3f;
  617. sti r0;
  618. #else
  619. cli r0;
  620. #endif
  621. [--sp] = RETI;
  622. SP += 4;
  623. rts;
  624. _schedule_and_signal_from_int:
  625. /* To end up here, vector 15 was changed - so we have to change it
  626. * back.
  627. */
  628. p0.l = lo(EVT15);
  629. p0.h = hi(EVT15);
  630. p1.l = _evt_system_call;
  631. p1.h = _evt_system_call;
  632. [p0] = p1;
  633. csync;
  634. p1 = rets;
  635. [sp + PT_RESERVED] = p1;
  636. p0.l = _irq_flags;
  637. p0.h = _irq_flags;
  638. r0 = [p0];
  639. sti r0;
  640. jump.s .Lresume_userspace;
  641. _schedule_and_signal:
  642. SAVE_CONTEXT_SYSCALL
  643. /* To end up here, vector 15 was changed - so we have to change it
  644. * back.
  645. */
  646. p0.l = lo(EVT15);
  647. p0.h = hi(EVT15);
  648. p1.l = _evt_system_call;
  649. p1.h = _evt_system_call;
  650. [p0] = p1;
  651. csync;
  652. p0.l = 1f;
  653. p0.h = 1f;
  654. [sp + PT_RESERVED] = P0;
  655. call .Lresume_userspace;
  656. 1:
  657. RESTORE_CONTEXT
  658. rti;
  659. /* Make sure when we start, that the circular buffer is initialized properly
  660. * R0 and P0 are call clobbered, so we can use them here.
  661. */
  662. ENTRY(_init_exception_buff)
  663. r0 = 0;
  664. p0.h = _in_ptr_excause;
  665. p0.l = _in_ptr_excause;
  666. [p0] = r0;
  667. p0.h = _out_ptr_excause;
  668. p0.l = _out_ptr_excause;
  669. [p0] = r0;
  670. rts;
  671. /*
  672. * Put these in the kernel data section - that should always be covered by
  673. * a CPLB. This is needed to ensure we don't get double fault conditions
  674. */
  675. #ifdef CONFIG_SYSCALL_TAB_L1
  676. .section .l1.data
  677. #else
  678. .data
  679. #endif
  680. ALIGN
  681. _extable:
  682. /* entry for each EXCAUSE[5:0]
  683. * This table bmust be in sync with the table in ./kernel/traps.c
  684. * EXCPT instruction can provide 4 bits of EXCAUSE, allowing 16 to be user defined
  685. */
  686. .long _ex_syscall; /* 0x00 - User Defined - Linux Syscall */
  687. .long _ex_soft_bp /* 0x01 - User Defined - Software breakpoint */
  688. .long _ex_trap_c /* 0x02 - User Defined */
  689. .long _ex_trap_c /* 0x03 - User Defined - Atomic test and set service */
  690. .long _ex_spinlock /* 0x04 - User Defined */
  691. .long _ex_trap_c /* 0x05 - User Defined */
  692. .long _ex_trap_c /* 0x06 - User Defined */
  693. .long _ex_trap_c /* 0x07 - User Defined */
  694. .long _ex_trap_c /* 0x08 - User Defined */
  695. .long _ex_trap_c /* 0x09 - User Defined */
  696. .long _ex_trap_c /* 0x0A - User Defined */
  697. .long _ex_trap_c /* 0x0B - User Defined */
  698. .long _ex_trap_c /* 0x0C - User Defined */
  699. .long _ex_trap_c /* 0x0D - User Defined */
  700. .long _ex_trap_c /* 0x0E - User Defined */
  701. .long _ex_trap_c /* 0x0F - User Defined */
  702. .long _ex_single_step /* 0x10 - HW Single step */
  703. .long _ex_trap_c /* 0x11 - Trace Buffer Full */
  704. .long _ex_trap_c /* 0x12 - Reserved */
  705. .long _ex_trap_c /* 0x13 - Reserved */
  706. .long _ex_trap_c /* 0x14 - Reserved */
  707. .long _ex_trap_c /* 0x15 - Reserved */
  708. .long _ex_trap_c /* 0x16 - Reserved */
  709. .long _ex_trap_c /* 0x17 - Reserved */
  710. .long _ex_trap_c /* 0x18 - Reserved */
  711. .long _ex_trap_c /* 0x19 - Reserved */
  712. .long _ex_trap_c /* 0x1A - Reserved */
  713. .long _ex_trap_c /* 0x1B - Reserved */
  714. .long _ex_trap_c /* 0x1C - Reserved */
  715. .long _ex_trap_c /* 0x1D - Reserved */
  716. .long _ex_trap_c /* 0x1E - Reserved */
  717. .long _ex_trap_c /* 0x1F - Reserved */
  718. .long _ex_trap_c /* 0x20 - Reserved */
  719. .long _ex_trap_c /* 0x21 - Undefined Instruction */
  720. .long _ex_trap_c /* 0x22 - Illegal Instruction Combination */
  721. .long _ex_dcplb /* 0x23 - Data CPLB Protection Violation */
  722. .long _ex_trap_c /* 0x24 - Data access misaligned */
  723. .long _ex_trap_c /* 0x25 - Unrecoverable Event */
  724. .long _ex_dcplb /* 0x26 - Data CPLB Miss */
  725. .long _ex_trap_c /* 0x27 - Data CPLB Multiple Hits - Linux Trap Zero */
  726. .long _ex_trap_c /* 0x28 - Emulation Watchpoint */
  727. .long _ex_trap_c /* 0x29 - Instruction fetch access error (535 only) */
  728. .long _ex_trap_c /* 0x2A - Instruction fetch misaligned */
  729. .long _ex_icplb /* 0x2B - Instruction CPLB protection Violation */
  730. .long _ex_icplb /* 0x2C - Instruction CPLB miss */
  731. .long _ex_trap_c /* 0x2D - Instruction CPLB Multiple Hits */
  732. .long _ex_trap_c /* 0x2E - Illegal use of Supervisor Resource */
  733. .long _ex_trap_c /* 0x2E - Illegal use of Supervisor Resource */
  734. .long _ex_trap_c /* 0x2F - Reserved */
  735. .long _ex_trap_c /* 0x30 - Reserved */
  736. .long _ex_trap_c /* 0x31 - Reserved */
  737. .long _ex_trap_c /* 0x32 - Reserved */
  738. .long _ex_trap_c /* 0x33 - Reserved */
  739. .long _ex_trap_c /* 0x34 - Reserved */
  740. .long _ex_trap_c /* 0x35 - Reserved */
  741. .long _ex_trap_c /* 0x36 - Reserved */
  742. .long _ex_trap_c /* 0x37 - Reserved */
  743. .long _ex_trap_c /* 0x38 - Reserved */
  744. .long _ex_trap_c /* 0x39 - Reserved */
  745. .long _ex_trap_c /* 0x3A - Reserved */
  746. .long _ex_trap_c /* 0x3B - Reserved */
  747. .long _ex_trap_c /* 0x3C - Reserved */
  748. .long _ex_trap_c /* 0x3D - Reserved */
  749. .long _ex_trap_c /* 0x3E - Reserved */
  750. .long _ex_trap_c /* 0x3F - Reserved */
  751. ALIGN
  752. ENTRY(_sys_call_table)
  753. .long _sys_ni_syscall /* 0 - old "setup()" system call*/
  754. .long _sys_exit
  755. .long _sys_fork
  756. .long _sys_read
  757. .long _sys_write
  758. .long _sys_open /* 5 */
  759. .long _sys_close
  760. .long _sys_ni_syscall /* old waitpid */
  761. .long _sys_creat
  762. .long _sys_link
  763. .long _sys_unlink /* 10 */
  764. .long _sys_execve
  765. .long _sys_chdir
  766. .long _sys_time
  767. .long _sys_mknod
  768. .long _sys_chmod /* 15 */
  769. .long _sys_chown /* chown16 */
  770. .long _sys_ni_syscall /* old break syscall holder */
  771. .long _sys_ni_syscall /* old stat */
  772. .long _sys_lseek
  773. .long _sys_getpid /* 20 */
  774. .long _sys_mount
  775. .long _sys_ni_syscall /* old umount */
  776. .long _sys_setuid
  777. .long _sys_getuid
  778. .long _sys_stime /* 25 */
  779. .long _sys_ptrace
  780. .long _sys_alarm
  781. .long _sys_ni_syscall /* old fstat */
  782. .long _sys_pause
  783. .long _sys_ni_syscall /* old utime */ /* 30 */
  784. .long _sys_ni_syscall /* old stty syscall holder */
  785. .long _sys_ni_syscall /* old gtty syscall holder */
  786. .long _sys_access
  787. .long _sys_nice
  788. .long _sys_ni_syscall /* 35 */ /* old ftime syscall holder */
  789. .long _sys_sync
  790. .long _sys_kill
  791. .long _sys_rename
  792. .long _sys_mkdir
  793. .long _sys_rmdir /* 40 */
  794. .long _sys_dup
  795. .long _sys_pipe
  796. .long _sys_times
  797. .long _sys_ni_syscall /* old prof syscall holder */
  798. .long _sys_brk /* 45 */
  799. .long _sys_setgid
  800. .long _sys_getgid
  801. .long _sys_ni_syscall /* old sys_signal */
  802. .long _sys_geteuid /* geteuid16 */
  803. .long _sys_getegid /* getegid16 */ /* 50 */
  804. .long _sys_acct
  805. .long _sys_umount /* recycled never used phys() */
  806. .long _sys_ni_syscall /* old lock syscall holder */
  807. .long _sys_ioctl
  808. .long _sys_fcntl /* 55 */
  809. .long _sys_ni_syscall /* old mpx syscall holder */
  810. .long _sys_setpgid
  811. .long _sys_ni_syscall /* old ulimit syscall holder */
  812. .long _sys_ni_syscall /* old old uname */
  813. .long _sys_umask /* 60 */
  814. .long _sys_chroot
  815. .long _sys_ustat
  816. .long _sys_dup2
  817. .long _sys_getppid
  818. .long _sys_getpgrp /* 65 */
  819. .long _sys_setsid
  820. .long _sys_ni_syscall /* old sys_sigaction */
  821. .long _sys_sgetmask
  822. .long _sys_ssetmask
  823. .long _sys_setreuid /* setreuid16 */ /* 70 */
  824. .long _sys_setregid /* setregid16 */
  825. .long _sys_ni_syscall /* old sys_sigsuspend */
  826. .long _sys_ni_syscall /* old sys_sigpending */
  827. .long _sys_sethostname
  828. .long _sys_setrlimit /* 75 */
  829. .long _sys_ni_syscall /* old getrlimit */
  830. .long _sys_getrusage
  831. .long _sys_gettimeofday
  832. .long _sys_settimeofday
  833. .long _sys_getgroups /* getgroups16 */ /* 80 */
  834. .long _sys_setgroups /* setgroups16 */
  835. .long _sys_ni_syscall /* old_select */
  836. .long _sys_symlink
  837. .long _sys_ni_syscall /* old lstat */
  838. .long _sys_readlink /* 85 */
  839. .long _sys_uselib
  840. .long _sys_ni_syscall /* sys_swapon */
  841. .long _sys_reboot
  842. .long _sys_ni_syscall /* old_readdir */
  843. .long _sys_ni_syscall /* sys_mmap */ /* 90 */
  844. .long _sys_munmap
  845. .long _sys_truncate
  846. .long _sys_ftruncate
  847. .long _sys_fchmod
  848. .long _sys_fchown /* fchown16 */ /* 95 */
  849. .long _sys_getpriority
  850. .long _sys_setpriority
  851. .long _sys_ni_syscall /* old profil syscall holder */
  852. .long _sys_statfs
  853. .long _sys_fstatfs /* 100 */
  854. .long _sys_ni_syscall
  855. .long _sys_ni_syscall /* old sys_socketcall */
  856. .long _sys_syslog
  857. .long _sys_setitimer
  858. .long _sys_getitimer /* 105 */
  859. .long _sys_newstat
  860. .long _sys_newlstat
  861. .long _sys_newfstat
  862. .long _sys_ni_syscall /* old uname */
  863. .long _sys_ni_syscall /* iopl for i386 */ /* 110 */
  864. .long _sys_vhangup
  865. .long _sys_ni_syscall /* obsolete idle() syscall */
  866. .long _sys_ni_syscall /* vm86old for i386 */
  867. .long _sys_wait4
  868. .long _sys_ni_syscall /* 115 */ /* sys_swapoff */
  869. .long _sys_sysinfo
  870. .long _sys_ni_syscall /* old sys_ipc */
  871. .long _sys_fsync
  872. .long _sys_ni_syscall /* old sys_sigreturn */
  873. .long _sys_clone /* 120 */
  874. .long _sys_setdomainname
  875. .long _sys_newuname
  876. .long _sys_ni_syscall /* old sys_modify_ldt */
  877. .long _sys_adjtimex
  878. .long _sys_ni_syscall /* 125 */ /* sys_mprotect */
  879. .long _sys_ni_syscall /* old sys_sigprocmask */
  880. .long _sys_ni_syscall /* old "creat_module" */
  881. .long _sys_init_module
  882. .long _sys_delete_module
  883. .long _sys_ni_syscall /* 130: old "get_kernel_syms" */
  884. .long _sys_quotactl
  885. .long _sys_getpgid
  886. .long _sys_fchdir
  887. .long _sys_bdflush
  888. .long _sys_ni_syscall /* 135 */ /* sys_sysfs */
  889. .long _sys_personality
  890. .long _sys_ni_syscall /* for afs_syscall */
  891. .long _sys_setfsuid /* setfsuid16 */
  892. .long _sys_setfsgid /* setfsgid16 */
  893. .long _sys_llseek /* 140 */
  894. .long _sys_getdents
  895. .long _sys_ni_syscall /* sys_select */
  896. .long _sys_flock
  897. .long _sys_ni_syscall /* sys_msync */
  898. .long _sys_readv /* 145 */
  899. .long _sys_writev
  900. .long _sys_getsid
  901. .long _sys_fdatasync
  902. .long _sys_sysctl
  903. .long _sys_ni_syscall /* 150 */ /* sys_mlock */
  904. .long _sys_ni_syscall /* sys_munlock */
  905. .long _sys_ni_syscall /* sys_mlockall */
  906. .long _sys_ni_syscall /* sys_munlockall */
  907. .long _sys_sched_setparam
  908. .long _sys_sched_getparam /* 155 */
  909. .long _sys_sched_setscheduler
  910. .long _sys_sched_getscheduler
  911. .long _sys_sched_yield
  912. .long _sys_sched_get_priority_max
  913. .long _sys_sched_get_priority_min /* 160 */
  914. .long _sys_sched_rr_get_interval
  915. .long _sys_nanosleep
  916. .long _sys_ni_syscall /* sys_mremap */
  917. .long _sys_setresuid /* setresuid16 */
  918. .long _sys_getresuid /* getresuid16 */ /* 165 */
  919. .long _sys_ni_syscall /* for vm86 */
  920. .long _sys_ni_syscall /* old "query_module" */
  921. .long _sys_ni_syscall /* sys_poll */
  922. .long _sys_ni_syscall /* sys_nfsservctl */
  923. .long _sys_setresgid /* setresgid16 */ /* 170 */
  924. .long _sys_getresgid /* getresgid16 */
  925. .long _sys_prctl
  926. .long _sys_rt_sigreturn
  927. .long _sys_rt_sigaction
  928. .long _sys_rt_sigprocmask /* 175 */
  929. .long _sys_rt_sigpending
  930. .long _sys_rt_sigtimedwait
  931. .long _sys_rt_sigqueueinfo
  932. .long _sys_rt_sigsuspend
  933. .long _sys_pread64 /* 180 */
  934. .long _sys_pwrite64
  935. .long _sys_lchown /* lchown16 */
  936. .long _sys_getcwd
  937. .long _sys_capget
  938. .long _sys_capset /* 185 */
  939. .long _sys_sigaltstack
  940. .long _sys_sendfile
  941. .long _sys_ni_syscall /* streams1 */
  942. .long _sys_ni_syscall /* streams2 */
  943. .long _sys_vfork /* 190 */
  944. .long _sys_getrlimit
  945. .long _sys_mmap2
  946. .long _sys_truncate64
  947. .long _sys_ftruncate64
  948. .long _sys_stat64 /* 195 */
  949. .long _sys_lstat64
  950. .long _sys_fstat64
  951. .long _sys_chown
  952. .long _sys_getuid
  953. .long _sys_getgid /* 200 */
  954. .long _sys_geteuid
  955. .long _sys_getegid
  956. .long _sys_setreuid
  957. .long _sys_setregid
  958. .long _sys_getgroups /* 205 */
  959. .long _sys_setgroups
  960. .long _sys_fchown
  961. .long _sys_setresuid
  962. .long _sys_getresuid
  963. .long _sys_setresgid /* 210 */
  964. .long _sys_getresgid
  965. .long _sys_lchown
  966. .long _sys_setuid
  967. .long _sys_setgid
  968. .long _sys_setfsuid /* 215 */
  969. .long _sys_setfsgid
  970. .long _sys_pivot_root
  971. .long _sys_ni_syscall /* sys_mincore */
  972. .long _sys_ni_syscall /* sys_madvise */
  973. .long _sys_getdents64 /* 220 */
  974. .long _sys_fcntl64
  975. .long _sys_ni_syscall /* reserved for TUX */
  976. .long _sys_ni_syscall
  977. .long _sys_gettid
  978. .long _sys_ni_syscall /* 225 */ /* sys_readahead */
  979. .long _sys_setxattr
  980. .long _sys_lsetxattr
  981. .long _sys_fsetxattr
  982. .long _sys_getxattr
  983. .long _sys_lgetxattr /* 230 */
  984. .long _sys_fgetxattr
  985. .long _sys_listxattr
  986. .long _sys_llistxattr
  987. .long _sys_flistxattr
  988. .long _sys_removexattr /* 235 */
  989. .long _sys_lremovexattr
  990. .long _sys_fremovexattr
  991. .long _sys_tkill
  992. .long _sys_sendfile64
  993. .long _sys_futex /* 240 */
  994. .long _sys_sched_setaffinity
  995. .long _sys_sched_getaffinity
  996. .long _sys_ni_syscall /* sys_set_thread_area */
  997. .long _sys_ni_syscall /* sys_get_thread_area */
  998. .long _sys_io_setup /* 245 */
  999. .long _sys_io_destroy
  1000. .long _sys_io_getevents
  1001. .long _sys_io_submit
  1002. .long _sys_io_cancel
  1003. .long _sys_ni_syscall /* 250 */ /* sys_alloc_hugepages */
  1004. .long _sys_ni_syscall /* sys_freec_hugepages */
  1005. .long _sys_exit_group
  1006. .long _sys_lookup_dcookie
  1007. .long _sys_bfin_spinlock
  1008. .long _sys_epoll_create /* 255 */
  1009. .long _sys_epoll_ctl
  1010. .long _sys_epoll_wait
  1011. .long _sys_ni_syscall /* remap_file_pages */
  1012. .long _sys_set_tid_address
  1013. .long _sys_timer_create /* 260 */
  1014. .long _sys_timer_settime
  1015. .long _sys_timer_gettime
  1016. .long _sys_timer_getoverrun
  1017. .long _sys_timer_delete
  1018. .long _sys_clock_settime /* 265 */
  1019. .long _sys_clock_gettime
  1020. .long _sys_clock_getres
  1021. .long _sys_clock_nanosleep
  1022. .long _sys_statfs64
  1023. .long _sys_fstatfs64 /* 270 */
  1024. .long _sys_tgkill
  1025. .long _sys_utimes
  1026. .long _sys_fadvise64_64
  1027. .long _sys_ni_syscall /* vserver */
  1028. .long _sys_ni_syscall /* 275, mbind */
  1029. .long _sys_ni_syscall /* get_mempolicy */
  1030. .long _sys_ni_syscall /* set_mempolicy */
  1031. .long _sys_mq_open
  1032. .long _sys_mq_unlink
  1033. .long _sys_mq_timedsend /* 280 */
  1034. .long _sys_mq_timedreceive
  1035. .long _sys_mq_notify
  1036. .long _sys_mq_getsetattr
  1037. .long _sys_ni_syscall /* kexec_load */
  1038. .long _sys_waitid /* 285 */
  1039. .long _sys_add_key
  1040. .long _sys_request_key
  1041. .long _sys_keyctl
  1042. .long _sys_ioprio_set
  1043. .long _sys_ioprio_get /* 290 */
  1044. .long _sys_inotify_init
  1045. .long _sys_inotify_add_watch
  1046. .long _sys_inotify_rm_watch
  1047. .long _sys_ni_syscall /* migrate_pages */
  1048. .long _sys_openat /* 295 */
  1049. .long _sys_mkdirat
  1050. .long _sys_mknodat
  1051. .long _sys_fchownat
  1052. .long _sys_futimesat
  1053. .long _sys_fstatat64 /* 300 */
  1054. .long _sys_unlinkat
  1055. .long _sys_renameat
  1056. .long _sys_linkat
  1057. .long _sys_symlinkat
  1058. .long _sys_readlinkat /* 305 */
  1059. .long _sys_fchmodat
  1060. .long _sys_faccessat
  1061. .long _sys_pselect6
  1062. .long _sys_ppoll
  1063. .long _sys_unshare /* 310 */
  1064. .long _sys_sram_alloc
  1065. .long _sys_sram_free
  1066. .long _sys_dma_memcpy
  1067. .long _sys_accept
  1068. .long _sys_bind /* 315 */
  1069. .long _sys_connect
  1070. .long _sys_getpeername
  1071. .long _sys_getsockname
  1072. .long _sys_getsockopt
  1073. .long _sys_listen /* 320 */
  1074. .long _sys_recv
  1075. .long _sys_recvfrom
  1076. .long _sys_recvmsg
  1077. .long _sys_send
  1078. .long _sys_sendmsg /* 325 */
  1079. .long _sys_sendto
  1080. .long _sys_setsockopt
  1081. .long _sys_shutdown
  1082. .long _sys_socket
  1083. .long _sys_socketpair /* 330 */
  1084. .long _sys_semctl
  1085. .long _sys_semget
  1086. .long _sys_semop
  1087. .long _sys_msgctl
  1088. .long _sys_msgget /* 335 */
  1089. .long _sys_msgrcv
  1090. .long _sys_msgsnd
  1091. .long _sys_shmat
  1092. .long _sys_shmctl
  1093. .long _sys_shmdt /* 340 */
  1094. .long _sys_shmget
  1095. .rept NR_syscalls-(.-_sys_call_table)/4
  1096. .long _sys_ni_syscall
  1097. .endr
  1098. _excpt_saved_imask:
  1099. .long 0;
  1100. _exception_stack:
  1101. .rept 1024
  1102. .long 0;
  1103. .endr
  1104. _exception_stack_top:
  1105. #if defined(ANOMALY_05000261)
  1106. /* Used by the assembly entry point to work around an anomaly. */
  1107. _last_cplb_fault_retx:
  1108. .long 0;
  1109. #endif
  1110. /*
  1111. * Single instructions can have multiple faults, which need to be
  1112. * handled by traps.c, in irq5. We store the exception cause to ensure
  1113. * we don't miss a double fault condition
  1114. */
  1115. ENTRY(_in_ptr_excause)
  1116. .long 0;
  1117. ENTRY(_out_ptr_excause)
  1118. .long 0;
  1119. ALIGN
  1120. ENTRY(_excause_circ_buf)
  1121. .rept 4
  1122. .long 0
  1123. .endr