entry.S 29 KB

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