entry.S 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218
  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. /* Set orig_p0 to -1 to indicate this isn't the end of a syscall. */
  635. r0 = -1 (x);
  636. [sp + PT_ORIG_P0] = r0;
  637. p1 = rets;
  638. [sp + PT_RESERVED] = p1;
  639. p0.l = _irq_flags;
  640. p0.h = _irq_flags;
  641. r0 = [p0];
  642. sti r0;
  643. jump.s .Lresume_userspace;
  644. _schedule_and_signal:
  645. SAVE_CONTEXT_SYSCALL
  646. /* To end up here, vector 15 was changed - so we have to change it
  647. * back.
  648. */
  649. p0.l = lo(EVT15);
  650. p0.h = hi(EVT15);
  651. p1.l = _evt_system_call;
  652. p1.h = _evt_system_call;
  653. [p0] = p1;
  654. csync;
  655. p0.l = 1f;
  656. p0.h = 1f;
  657. [sp + PT_RESERVED] = P0;
  658. call .Lresume_userspace;
  659. 1:
  660. RESTORE_CONTEXT
  661. rti;
  662. /* Make sure when we start, that the circular buffer is initialized properly
  663. * R0 and P0 are call clobbered, so we can use them here.
  664. */
  665. ENTRY(_init_exception_buff)
  666. r0 = 0;
  667. p0.h = _in_ptr_excause;
  668. p0.l = _in_ptr_excause;
  669. [p0] = r0;
  670. p0.h = _out_ptr_excause;
  671. p0.l = _out_ptr_excause;
  672. [p0] = r0;
  673. rts;
  674. /*
  675. * Put these in the kernel data section - that should always be covered by
  676. * a CPLB. This is needed to ensure we don't get double fault conditions
  677. */
  678. #ifdef CONFIG_SYSCALL_TAB_L1
  679. .section .l1.data
  680. #else
  681. .data
  682. #endif
  683. ALIGN
  684. _extable:
  685. /* entry for each EXCAUSE[5:0]
  686. * This table bmust be in sync with the table in ./kernel/traps.c
  687. * EXCPT instruction can provide 4 bits of EXCAUSE, allowing 16 to be user defined
  688. */
  689. .long _ex_syscall; /* 0x00 - User Defined - Linux Syscall */
  690. .long _ex_soft_bp /* 0x01 - User Defined - Software breakpoint */
  691. .long _ex_trap_c /* 0x02 - User Defined */
  692. .long _ex_trap_c /* 0x03 - User Defined - Atomic test and set service */
  693. .long _ex_spinlock /* 0x04 - User Defined */
  694. .long _ex_trap_c /* 0x05 - User Defined */
  695. .long _ex_trap_c /* 0x06 - User Defined */
  696. .long _ex_trap_c /* 0x07 - User Defined */
  697. .long _ex_trap_c /* 0x08 - User Defined */
  698. .long _ex_trap_c /* 0x09 - User Defined */
  699. .long _ex_trap_c /* 0x0A - User Defined */
  700. .long _ex_trap_c /* 0x0B - User Defined */
  701. .long _ex_trap_c /* 0x0C - User Defined */
  702. .long _ex_trap_c /* 0x0D - User Defined */
  703. .long _ex_trap_c /* 0x0E - User Defined */
  704. .long _ex_trap_c /* 0x0F - User Defined */
  705. .long _ex_single_step /* 0x10 - HW Single step */
  706. .long _ex_trap_c /* 0x11 - Trace Buffer Full */
  707. .long _ex_trap_c /* 0x12 - Reserved */
  708. .long _ex_trap_c /* 0x13 - Reserved */
  709. .long _ex_trap_c /* 0x14 - Reserved */
  710. .long _ex_trap_c /* 0x15 - Reserved */
  711. .long _ex_trap_c /* 0x16 - Reserved */
  712. .long _ex_trap_c /* 0x17 - Reserved */
  713. .long _ex_trap_c /* 0x18 - Reserved */
  714. .long _ex_trap_c /* 0x19 - Reserved */
  715. .long _ex_trap_c /* 0x1A - Reserved */
  716. .long _ex_trap_c /* 0x1B - Reserved */
  717. .long _ex_trap_c /* 0x1C - Reserved */
  718. .long _ex_trap_c /* 0x1D - Reserved */
  719. .long _ex_trap_c /* 0x1E - Reserved */
  720. .long _ex_trap_c /* 0x1F - Reserved */
  721. .long _ex_trap_c /* 0x20 - Reserved */
  722. .long _ex_trap_c /* 0x21 - Undefined Instruction */
  723. .long _ex_trap_c /* 0x22 - Illegal Instruction Combination */
  724. .long _ex_dcplb /* 0x23 - Data CPLB Protection Violation */
  725. .long _ex_trap_c /* 0x24 - Data access misaligned */
  726. .long _ex_trap_c /* 0x25 - Unrecoverable Event */
  727. .long _ex_dcplb /* 0x26 - Data CPLB Miss */
  728. .long _ex_trap_c /* 0x27 - Data CPLB Multiple Hits - Linux Trap Zero */
  729. .long _ex_trap_c /* 0x28 - Emulation Watchpoint */
  730. .long _ex_trap_c /* 0x29 - Instruction fetch access error (535 only) */
  731. .long _ex_trap_c /* 0x2A - Instruction fetch misaligned */
  732. .long _ex_icplb /* 0x2B - Instruction CPLB protection Violation */
  733. .long _ex_icplb /* 0x2C - Instruction CPLB miss */
  734. .long _ex_trap_c /* 0x2D - Instruction CPLB Multiple Hits */
  735. .long _ex_trap_c /* 0x2E - Illegal use of Supervisor Resource */
  736. .long _ex_trap_c /* 0x2E - Illegal use of Supervisor Resource */
  737. .long _ex_trap_c /* 0x2F - Reserved */
  738. .long _ex_trap_c /* 0x30 - Reserved */
  739. .long _ex_trap_c /* 0x31 - Reserved */
  740. .long _ex_trap_c /* 0x32 - Reserved */
  741. .long _ex_trap_c /* 0x33 - Reserved */
  742. .long _ex_trap_c /* 0x34 - Reserved */
  743. .long _ex_trap_c /* 0x35 - Reserved */
  744. .long _ex_trap_c /* 0x36 - Reserved */
  745. .long _ex_trap_c /* 0x37 - Reserved */
  746. .long _ex_trap_c /* 0x38 - Reserved */
  747. .long _ex_trap_c /* 0x39 - Reserved */
  748. .long _ex_trap_c /* 0x3A - Reserved */
  749. .long _ex_trap_c /* 0x3B - Reserved */
  750. .long _ex_trap_c /* 0x3C - Reserved */
  751. .long _ex_trap_c /* 0x3D - Reserved */
  752. .long _ex_trap_c /* 0x3E - Reserved */
  753. .long _ex_trap_c /* 0x3F - Reserved */
  754. ALIGN
  755. ENTRY(_sys_call_table)
  756. .long _sys_ni_syscall /* 0 - old "setup()" system call*/
  757. .long _sys_exit
  758. .long _sys_fork
  759. .long _sys_read
  760. .long _sys_write
  761. .long _sys_open /* 5 */
  762. .long _sys_close
  763. .long _sys_ni_syscall /* old waitpid */
  764. .long _sys_creat
  765. .long _sys_link
  766. .long _sys_unlink /* 10 */
  767. .long _sys_execve
  768. .long _sys_chdir
  769. .long _sys_time
  770. .long _sys_mknod
  771. .long _sys_chmod /* 15 */
  772. .long _sys_chown /* chown16 */
  773. .long _sys_ni_syscall /* old break syscall holder */
  774. .long _sys_ni_syscall /* old stat */
  775. .long _sys_lseek
  776. .long _sys_getpid /* 20 */
  777. .long _sys_mount
  778. .long _sys_ni_syscall /* old umount */
  779. .long _sys_setuid
  780. .long _sys_getuid
  781. .long _sys_stime /* 25 */
  782. .long _sys_ptrace
  783. .long _sys_alarm
  784. .long _sys_ni_syscall /* old fstat */
  785. .long _sys_pause
  786. .long _sys_ni_syscall /* old utime */ /* 30 */
  787. .long _sys_ni_syscall /* old stty syscall holder */
  788. .long _sys_ni_syscall /* old gtty syscall holder */
  789. .long _sys_access
  790. .long _sys_nice
  791. .long _sys_ni_syscall /* 35 */ /* old ftime syscall holder */
  792. .long _sys_sync
  793. .long _sys_kill
  794. .long _sys_rename
  795. .long _sys_mkdir
  796. .long _sys_rmdir /* 40 */
  797. .long _sys_dup
  798. .long _sys_pipe
  799. .long _sys_times
  800. .long _sys_ni_syscall /* old prof syscall holder */
  801. .long _sys_brk /* 45 */
  802. .long _sys_setgid
  803. .long _sys_getgid
  804. .long _sys_ni_syscall /* old sys_signal */
  805. .long _sys_geteuid /* geteuid16 */
  806. .long _sys_getegid /* getegid16 */ /* 50 */
  807. .long _sys_acct
  808. .long _sys_umount /* recycled never used phys() */
  809. .long _sys_ni_syscall /* old lock syscall holder */
  810. .long _sys_ioctl
  811. .long _sys_fcntl /* 55 */
  812. .long _sys_ni_syscall /* old mpx syscall holder */
  813. .long _sys_setpgid
  814. .long _sys_ni_syscall /* old ulimit syscall holder */
  815. .long _sys_ni_syscall /* old old uname */
  816. .long _sys_umask /* 60 */
  817. .long _sys_chroot
  818. .long _sys_ustat
  819. .long _sys_dup2
  820. .long _sys_getppid
  821. .long _sys_getpgrp /* 65 */
  822. .long _sys_setsid
  823. .long _sys_ni_syscall /* old sys_sigaction */
  824. .long _sys_sgetmask
  825. .long _sys_ssetmask
  826. .long _sys_setreuid /* setreuid16 */ /* 70 */
  827. .long _sys_setregid /* setregid16 */
  828. .long _sys_ni_syscall /* old sys_sigsuspend */
  829. .long _sys_ni_syscall /* old sys_sigpending */
  830. .long _sys_sethostname
  831. .long _sys_setrlimit /* 75 */
  832. .long _sys_ni_syscall /* old getrlimit */
  833. .long _sys_getrusage
  834. .long _sys_gettimeofday
  835. .long _sys_settimeofday
  836. .long _sys_getgroups /* getgroups16 */ /* 80 */
  837. .long _sys_setgroups /* setgroups16 */
  838. .long _sys_ni_syscall /* old_select */
  839. .long _sys_symlink
  840. .long _sys_ni_syscall /* old lstat */
  841. .long _sys_readlink /* 85 */
  842. .long _sys_uselib
  843. .long _sys_ni_syscall /* sys_swapon */
  844. .long _sys_reboot
  845. .long _sys_ni_syscall /* old_readdir */
  846. .long _sys_ni_syscall /* sys_mmap */ /* 90 */
  847. .long _sys_munmap
  848. .long _sys_truncate
  849. .long _sys_ftruncate
  850. .long _sys_fchmod
  851. .long _sys_fchown /* fchown16 */ /* 95 */
  852. .long _sys_getpriority
  853. .long _sys_setpriority
  854. .long _sys_ni_syscall /* old profil syscall holder */
  855. .long _sys_statfs
  856. .long _sys_fstatfs /* 100 */
  857. .long _sys_ni_syscall
  858. .long _sys_ni_syscall /* old sys_socketcall */
  859. .long _sys_syslog
  860. .long _sys_setitimer
  861. .long _sys_getitimer /* 105 */
  862. .long _sys_newstat
  863. .long _sys_newlstat
  864. .long _sys_newfstat
  865. .long _sys_ni_syscall /* old uname */
  866. .long _sys_ni_syscall /* iopl for i386 */ /* 110 */
  867. .long _sys_vhangup
  868. .long _sys_ni_syscall /* obsolete idle() syscall */
  869. .long _sys_ni_syscall /* vm86old for i386 */
  870. .long _sys_wait4
  871. .long _sys_ni_syscall /* 115 */ /* sys_swapoff */
  872. .long _sys_sysinfo
  873. .long _sys_ni_syscall /* old sys_ipc */
  874. .long _sys_fsync
  875. .long _sys_ni_syscall /* old sys_sigreturn */
  876. .long _sys_clone /* 120 */
  877. .long _sys_setdomainname
  878. .long _sys_newuname
  879. .long _sys_ni_syscall /* old sys_modify_ldt */
  880. .long _sys_adjtimex
  881. .long _sys_ni_syscall /* 125 */ /* sys_mprotect */
  882. .long _sys_ni_syscall /* old sys_sigprocmask */
  883. .long _sys_ni_syscall /* old "creat_module" */
  884. .long _sys_init_module
  885. .long _sys_delete_module
  886. .long _sys_ni_syscall /* 130: old "get_kernel_syms" */
  887. .long _sys_quotactl
  888. .long _sys_getpgid
  889. .long _sys_fchdir
  890. .long _sys_bdflush
  891. .long _sys_ni_syscall /* 135 */ /* sys_sysfs */
  892. .long _sys_personality
  893. .long _sys_ni_syscall /* for afs_syscall */
  894. .long _sys_setfsuid /* setfsuid16 */
  895. .long _sys_setfsgid /* setfsgid16 */
  896. .long _sys_llseek /* 140 */
  897. .long _sys_getdents
  898. .long _sys_ni_syscall /* sys_select */
  899. .long _sys_flock
  900. .long _sys_ni_syscall /* sys_msync */
  901. .long _sys_readv /* 145 */
  902. .long _sys_writev
  903. .long _sys_getsid
  904. .long _sys_fdatasync
  905. .long _sys_sysctl
  906. .long _sys_ni_syscall /* 150 */ /* sys_mlock */
  907. .long _sys_ni_syscall /* sys_munlock */
  908. .long _sys_ni_syscall /* sys_mlockall */
  909. .long _sys_ni_syscall /* sys_munlockall */
  910. .long _sys_sched_setparam
  911. .long _sys_sched_getparam /* 155 */
  912. .long _sys_sched_setscheduler
  913. .long _sys_sched_getscheduler
  914. .long _sys_sched_yield
  915. .long _sys_sched_get_priority_max
  916. .long _sys_sched_get_priority_min /* 160 */
  917. .long _sys_sched_rr_get_interval
  918. .long _sys_nanosleep
  919. .long _sys_ni_syscall /* sys_mremap */
  920. .long _sys_setresuid /* setresuid16 */
  921. .long _sys_getresuid /* getresuid16 */ /* 165 */
  922. .long _sys_ni_syscall /* for vm86 */
  923. .long _sys_ni_syscall /* old "query_module" */
  924. .long _sys_ni_syscall /* sys_poll */
  925. .long _sys_ni_syscall /* sys_nfsservctl */
  926. .long _sys_setresgid /* setresgid16 */ /* 170 */
  927. .long _sys_getresgid /* getresgid16 */
  928. .long _sys_prctl
  929. .long _sys_rt_sigreturn
  930. .long _sys_rt_sigaction
  931. .long _sys_rt_sigprocmask /* 175 */
  932. .long _sys_rt_sigpending
  933. .long _sys_rt_sigtimedwait
  934. .long _sys_rt_sigqueueinfo
  935. .long _sys_rt_sigsuspend
  936. .long _sys_pread64 /* 180 */
  937. .long _sys_pwrite64
  938. .long _sys_lchown /* lchown16 */
  939. .long _sys_getcwd
  940. .long _sys_capget
  941. .long _sys_capset /* 185 */
  942. .long _sys_sigaltstack
  943. .long _sys_sendfile
  944. .long _sys_ni_syscall /* streams1 */
  945. .long _sys_ni_syscall /* streams2 */
  946. .long _sys_vfork /* 190 */
  947. .long _sys_getrlimit
  948. .long _sys_mmap2
  949. .long _sys_truncate64
  950. .long _sys_ftruncate64
  951. .long _sys_stat64 /* 195 */
  952. .long _sys_lstat64
  953. .long _sys_fstat64
  954. .long _sys_chown
  955. .long _sys_getuid
  956. .long _sys_getgid /* 200 */
  957. .long _sys_geteuid
  958. .long _sys_getegid
  959. .long _sys_setreuid
  960. .long _sys_setregid
  961. .long _sys_getgroups /* 205 */
  962. .long _sys_setgroups
  963. .long _sys_fchown
  964. .long _sys_setresuid
  965. .long _sys_getresuid
  966. .long _sys_setresgid /* 210 */
  967. .long _sys_getresgid
  968. .long _sys_lchown
  969. .long _sys_setuid
  970. .long _sys_setgid
  971. .long _sys_setfsuid /* 215 */
  972. .long _sys_setfsgid
  973. .long _sys_pivot_root
  974. .long _sys_ni_syscall /* sys_mincore */
  975. .long _sys_ni_syscall /* sys_madvise */
  976. .long _sys_getdents64 /* 220 */
  977. .long _sys_fcntl64
  978. .long _sys_ni_syscall /* reserved for TUX */
  979. .long _sys_ni_syscall
  980. .long _sys_gettid
  981. .long _sys_ni_syscall /* 225 */ /* sys_readahead */
  982. .long _sys_setxattr
  983. .long _sys_lsetxattr
  984. .long _sys_fsetxattr
  985. .long _sys_getxattr
  986. .long _sys_lgetxattr /* 230 */
  987. .long _sys_fgetxattr
  988. .long _sys_listxattr
  989. .long _sys_llistxattr
  990. .long _sys_flistxattr
  991. .long _sys_removexattr /* 235 */
  992. .long _sys_lremovexattr
  993. .long _sys_fremovexattr
  994. .long _sys_tkill
  995. .long _sys_sendfile64
  996. .long _sys_futex /* 240 */
  997. .long _sys_sched_setaffinity
  998. .long _sys_sched_getaffinity
  999. .long _sys_ni_syscall /* sys_set_thread_area */
  1000. .long _sys_ni_syscall /* sys_get_thread_area */
  1001. .long _sys_io_setup /* 245 */
  1002. .long _sys_io_destroy
  1003. .long _sys_io_getevents
  1004. .long _sys_io_submit
  1005. .long _sys_io_cancel
  1006. .long _sys_ni_syscall /* 250 */ /* sys_alloc_hugepages */
  1007. .long _sys_ni_syscall /* sys_freec_hugepages */
  1008. .long _sys_exit_group
  1009. .long _sys_lookup_dcookie
  1010. .long _sys_bfin_spinlock
  1011. .long _sys_epoll_create /* 255 */
  1012. .long _sys_epoll_ctl
  1013. .long _sys_epoll_wait
  1014. .long _sys_ni_syscall /* remap_file_pages */
  1015. .long _sys_set_tid_address
  1016. .long _sys_timer_create /* 260 */
  1017. .long _sys_timer_settime
  1018. .long _sys_timer_gettime
  1019. .long _sys_timer_getoverrun
  1020. .long _sys_timer_delete
  1021. .long _sys_clock_settime /* 265 */
  1022. .long _sys_clock_gettime
  1023. .long _sys_clock_getres
  1024. .long _sys_clock_nanosleep
  1025. .long _sys_statfs64
  1026. .long _sys_fstatfs64 /* 270 */
  1027. .long _sys_tgkill
  1028. .long _sys_utimes
  1029. .long _sys_fadvise64_64
  1030. .long _sys_ni_syscall /* vserver */
  1031. .long _sys_ni_syscall /* 275, mbind */
  1032. .long _sys_ni_syscall /* get_mempolicy */
  1033. .long _sys_ni_syscall /* set_mempolicy */
  1034. .long _sys_mq_open
  1035. .long _sys_mq_unlink
  1036. .long _sys_mq_timedsend /* 280 */
  1037. .long _sys_mq_timedreceive
  1038. .long _sys_mq_notify
  1039. .long _sys_mq_getsetattr
  1040. .long _sys_ni_syscall /* kexec_load */
  1041. .long _sys_waitid /* 285 */
  1042. .long _sys_add_key
  1043. .long _sys_request_key
  1044. .long _sys_keyctl
  1045. .long _sys_ioprio_set
  1046. .long _sys_ioprio_get /* 290 */
  1047. .long _sys_inotify_init
  1048. .long _sys_inotify_add_watch
  1049. .long _sys_inotify_rm_watch
  1050. .long _sys_ni_syscall /* migrate_pages */
  1051. .long _sys_openat /* 295 */
  1052. .long _sys_mkdirat
  1053. .long _sys_mknodat
  1054. .long _sys_fchownat
  1055. .long _sys_futimesat
  1056. .long _sys_fstatat64 /* 300 */
  1057. .long _sys_unlinkat
  1058. .long _sys_renameat
  1059. .long _sys_linkat
  1060. .long _sys_symlinkat
  1061. .long _sys_readlinkat /* 305 */
  1062. .long _sys_fchmodat
  1063. .long _sys_faccessat
  1064. .long _sys_pselect6
  1065. .long _sys_ppoll
  1066. .long _sys_unshare /* 310 */
  1067. .long _sys_sram_alloc
  1068. .long _sys_sram_free
  1069. .long _sys_dma_memcpy
  1070. .long _sys_accept
  1071. .long _sys_bind /* 315 */
  1072. .long _sys_connect
  1073. .long _sys_getpeername
  1074. .long _sys_getsockname
  1075. .long _sys_getsockopt
  1076. .long _sys_listen /* 320 */
  1077. .long _sys_recv
  1078. .long _sys_recvfrom
  1079. .long _sys_recvmsg
  1080. .long _sys_send
  1081. .long _sys_sendmsg /* 325 */
  1082. .long _sys_sendto
  1083. .long _sys_setsockopt
  1084. .long _sys_shutdown
  1085. .long _sys_socket
  1086. .long _sys_socketpair /* 330 */
  1087. .long _sys_semctl
  1088. .long _sys_semget
  1089. .long _sys_semop
  1090. .long _sys_msgctl
  1091. .long _sys_msgget /* 335 */
  1092. .long _sys_msgrcv
  1093. .long _sys_msgsnd
  1094. .long _sys_shmat
  1095. .long _sys_shmctl
  1096. .long _sys_shmdt /* 340 */
  1097. .long _sys_shmget
  1098. .rept NR_syscalls-(.-_sys_call_table)/4
  1099. .long _sys_ni_syscall
  1100. .endr
  1101. _excpt_saved_imask:
  1102. .long 0;
  1103. _exception_stack:
  1104. .rept 1024
  1105. .long 0;
  1106. .endr
  1107. _exception_stack_top:
  1108. #if defined(ANOMALY_05000261)
  1109. /* Used by the assembly entry point to work around an anomaly. */
  1110. _last_cplb_fault_retx:
  1111. .long 0;
  1112. #endif
  1113. /*
  1114. * Single instructions can have multiple faults, which need to be
  1115. * handled by traps.c, in irq5. We store the exception cause to ensure
  1116. * we don't miss a double fault condition
  1117. */
  1118. ENTRY(_in_ptr_excause)
  1119. .long 0;
  1120. ENTRY(_out_ptr_excause)
  1121. .long 0;
  1122. ALIGN
  1123. ENTRY(_excause_circ_buf)
  1124. .rept 4
  1125. .long 0
  1126. .endr