entry.S 30 KB

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