head_booke.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458
  1. #ifndef __HEAD_BOOKE_H__
  2. #define __HEAD_BOOKE_H__
  3. #include <asm/ptrace.h> /* for STACK_FRAME_REGS_MARKER */
  4. #include <asm/kvm_asm.h>
  5. #include <asm/kvm_booke_hv_asm.h>
  6. /*
  7. * Macros used for common Book-e exception handling
  8. */
  9. #define SET_IVOR(vector_number, vector_label) \
  10. li r26,vector_label@l; \
  11. mtspr SPRN_IVOR##vector_number,r26; \
  12. sync
  13. #if (THREAD_SHIFT < 15)
  14. #define ALLOC_STACK_FRAME(reg, val) \
  15. addi reg,reg,val
  16. #else
  17. #define ALLOC_STACK_FRAME(reg, val) \
  18. addis reg,reg,val@ha; \
  19. addi reg,reg,val@l
  20. #endif
  21. /*
  22. * Macro used to get to thread save registers.
  23. * Note that entries 0-3 are used for the prolog code, and the remaining
  24. * entries are available for specific exception use in the event a handler
  25. * requires more than 4 scratch registers.
  26. */
  27. #define THREAD_NORMSAVE(offset) (THREAD_NORMSAVES + (offset * 4))
  28. #ifdef CONFIG_PPC_FSL_BOOK3E
  29. #define BOOKE_CLEAR_BTB(reg) \
  30. START_BTB_FLUSH_SECTION \
  31. BTB_FLUSH(reg) \
  32. END_BTB_FLUSH_SECTION
  33. #else
  34. #define BOOKE_CLEAR_BTB(reg)
  35. #endif
  36. #define NORMAL_EXCEPTION_PROLOG(intno) \
  37. mtspr SPRN_SPRG_WSCRATCH0, r10; /* save one register */ \
  38. mfspr r10, SPRN_SPRG_THREAD; \
  39. stw r11, THREAD_NORMSAVE(0)(r10); \
  40. stw r13, THREAD_NORMSAVE(2)(r10); \
  41. mfcr r13; /* save CR in r13 for now */\
  42. mfspr r11, SPRN_SRR1; \
  43. DO_KVM BOOKE_INTERRUPT_##intno SPRN_SRR1; \
  44. andi. r11, r11, MSR_PR; /* check whether user or kernel */\
  45. mr r11, r1; \
  46. beq 1f; \
  47. BOOKE_CLEAR_BTB(r11) \
  48. /* if from user, start at top of this thread's kernel stack */ \
  49. lwz r11, THREAD_INFO-THREAD(r10); \
  50. ALLOC_STACK_FRAME(r11, THREAD_SIZE); \
  51. 1 : subi r11, r11, INT_FRAME_SIZE; /* Allocate exception frame */ \
  52. stw r13, _CCR(r11); /* save various registers */ \
  53. stw r12,GPR12(r11); \
  54. stw r9,GPR9(r11); \
  55. mfspr r13, SPRN_SPRG_RSCRATCH0; \
  56. stw r13, GPR10(r11); \
  57. lwz r12, THREAD_NORMSAVE(0)(r10); \
  58. stw r12,GPR11(r11); \
  59. lwz r13, THREAD_NORMSAVE(2)(r10); /* restore r13 */ \
  60. mflr r10; \
  61. stw r10,_LINK(r11); \
  62. mfspr r12,SPRN_SRR0; \
  63. stw r1, GPR1(r11); \
  64. mfspr r9,SPRN_SRR1; \
  65. stw r1, 0(r11); \
  66. mr r1, r11; \
  67. rlwinm r9,r9,0,14,12; /* clear MSR_WE (necessary?) */\
  68. stw r0,GPR0(r11); \
  69. lis r10, STACK_FRAME_REGS_MARKER@ha;/* exception frame marker */ \
  70. addi r10, r10, STACK_FRAME_REGS_MARKER@l; \
  71. stw r10, 8(r11); \
  72. SAVE_4GPRS(3, r11); \
  73. SAVE_2GPRS(7, r11)
  74. /* To handle the additional exception priority levels on 40x and Book-E
  75. * processors we allocate a stack per additional priority level.
  76. *
  77. * On 40x critical is the only additional level
  78. * On 44x/e500 we have critical and machine check
  79. * On e200 we have critical and debug (machine check occurs via critical)
  80. *
  81. * Additionally we reserve a SPRG for each priority level so we can free up a
  82. * GPR to use as the base for indirect access to the exception stacks. This
  83. * is necessary since the MMU is always on, for Book-E parts, and the stacks
  84. * are offset from KERNELBASE.
  85. *
  86. * There is some space optimization to be had here if desired. However
  87. * to allow for a common kernel with support for debug exceptions either
  88. * going to critical or their own debug level we aren't currently
  89. * providing configurations that micro-optimize space usage.
  90. */
  91. #define MC_STACK_BASE mcheckirq_ctx
  92. #define CRIT_STACK_BASE critirq_ctx
  93. /* only on e500mc/e200 */
  94. #define DBG_STACK_BASE dbgirq_ctx
  95. #define EXC_LVL_FRAME_OVERHEAD (THREAD_SIZE - INT_FRAME_SIZE - EXC_LVL_SIZE)
  96. #ifdef CONFIG_SMP
  97. #define BOOKE_LOAD_EXC_LEVEL_STACK(level) \
  98. mfspr r8,SPRN_PIR; \
  99. slwi r8,r8,2; \
  100. addis r8,r8,level##_STACK_BASE@ha; \
  101. lwz r8,level##_STACK_BASE@l(r8); \
  102. addi r8,r8,EXC_LVL_FRAME_OVERHEAD;
  103. #else
  104. #define BOOKE_LOAD_EXC_LEVEL_STACK(level) \
  105. lis r8,level##_STACK_BASE@ha; \
  106. lwz r8,level##_STACK_BASE@l(r8); \
  107. addi r8,r8,EXC_LVL_FRAME_OVERHEAD;
  108. #endif
  109. /*
  110. * Exception prolog for critical/machine check exceptions. This is a
  111. * little different from the normal exception prolog above since a
  112. * critical/machine check exception can potentially occur at any point
  113. * during normal exception processing. Thus we cannot use the same SPRG
  114. * registers as the normal prolog above. Instead we use a portion of the
  115. * critical/machine check exception stack at low physical addresses.
  116. */
  117. #define EXC_LEVEL_EXCEPTION_PROLOG(exc_level, intno, exc_level_srr0, exc_level_srr1) \
  118. mtspr SPRN_SPRG_WSCRATCH_##exc_level,r8; \
  119. BOOKE_LOAD_EXC_LEVEL_STACK(exc_level);/* r8 points to the exc_level stack*/ \
  120. stw r9,GPR9(r8); /* save various registers */\
  121. mfcr r9; /* save CR in r9 for now */\
  122. stw r10,GPR10(r8); \
  123. stw r11,GPR11(r8); \
  124. stw r9,_CCR(r8); /* save CR on stack */\
  125. mfspr r11,exc_level_srr1; /* check whether user or kernel */\
  126. DO_KVM BOOKE_INTERRUPT_##intno exc_level_srr1; \
  127. BOOKE_CLEAR_BTB(r10) \
  128. andi. r11,r11,MSR_PR; \
  129. mfspr r11,SPRN_SPRG_THREAD; /* if from user, start at top of */\
  130. lwz r11,THREAD_INFO-THREAD(r11); /* this thread's kernel stack */\
  131. addi r11,r11,EXC_LVL_FRAME_OVERHEAD; /* allocate stack frame */\
  132. beq 1f; \
  133. /* COMING FROM USER MODE */ \
  134. stw r9,_CCR(r11); /* save CR */\
  135. lwz r10,GPR10(r8); /* copy regs from exception stack */\
  136. lwz r9,GPR9(r8); \
  137. stw r10,GPR10(r11); \
  138. lwz r10,GPR11(r8); \
  139. stw r9,GPR9(r11); \
  140. stw r10,GPR11(r11); \
  141. b 2f; \
  142. /* COMING FROM PRIV MODE */ \
  143. 1: lwz r9,TI_FLAGS-EXC_LVL_FRAME_OVERHEAD(r11); \
  144. lwz r10,TI_PREEMPT-EXC_LVL_FRAME_OVERHEAD(r11); \
  145. stw r9,TI_FLAGS-EXC_LVL_FRAME_OVERHEAD(r8); \
  146. stw r10,TI_PREEMPT-EXC_LVL_FRAME_OVERHEAD(r8); \
  147. lwz r9,TI_TASK-EXC_LVL_FRAME_OVERHEAD(r11); \
  148. stw r9,TI_TASK-EXC_LVL_FRAME_OVERHEAD(r8); \
  149. mr r11,r8; \
  150. 2: mfspr r8,SPRN_SPRG_RSCRATCH_##exc_level; \
  151. stw r12,GPR12(r11); /* save various registers */\
  152. mflr r10; \
  153. stw r10,_LINK(r11); \
  154. mfspr r12,SPRN_DEAR; /* save DEAR and ESR in the frame */\
  155. stw r12,_DEAR(r11); /* since they may have had stuff */\
  156. mfspr r9,SPRN_ESR; /* in them at the point where the */\
  157. stw r9,_ESR(r11); /* exception was taken */\
  158. mfspr r12,exc_level_srr0; \
  159. stw r1,GPR1(r11); \
  160. mfspr r9,exc_level_srr1; \
  161. stw r1,0(r11); \
  162. mr r1,r11; \
  163. rlwinm r9,r9,0,14,12; /* clear MSR_WE (necessary?) */\
  164. stw r0,GPR0(r11); \
  165. SAVE_4GPRS(3, r11); \
  166. SAVE_2GPRS(7, r11)
  167. #define CRITICAL_EXCEPTION_PROLOG(intno) \
  168. EXC_LEVEL_EXCEPTION_PROLOG(CRIT, intno, SPRN_CSRR0, SPRN_CSRR1)
  169. #define DEBUG_EXCEPTION_PROLOG \
  170. EXC_LEVEL_EXCEPTION_PROLOG(DBG, DEBUG, SPRN_DSRR0, SPRN_DSRR1)
  171. #define MCHECK_EXCEPTION_PROLOG \
  172. EXC_LEVEL_EXCEPTION_PROLOG(MC, MACHINE_CHECK, \
  173. SPRN_MCSRR0, SPRN_MCSRR1)
  174. /*
  175. * Guest Doorbell -- this is a bit odd in that uses GSRR0/1 despite
  176. * being delivered to the host. This exception can only happen
  177. * inside a KVM guest -- so we just handle up to the DO_KVM rather
  178. * than try to fit this into one of the existing prolog macros.
  179. */
  180. #define GUEST_DOORBELL_EXCEPTION \
  181. START_EXCEPTION(GuestDoorbell); \
  182. mtspr SPRN_SPRG_WSCRATCH0, r10; /* save one register */ \
  183. mfspr r10, SPRN_SPRG_THREAD; \
  184. stw r11, THREAD_NORMSAVE(0)(r10); \
  185. mfspr r11, SPRN_SRR1; \
  186. stw r13, THREAD_NORMSAVE(2)(r10); \
  187. mfcr r13; /* save CR in r13 for now */\
  188. DO_KVM BOOKE_INTERRUPT_GUEST_DBELL SPRN_GSRR1; \
  189. trap
  190. /*
  191. * Exception vectors.
  192. */
  193. #define START_EXCEPTION(label) \
  194. .align 5; \
  195. label:
  196. #define EXCEPTION(n, intno, label, hdlr, xfer) \
  197. START_EXCEPTION(label); \
  198. NORMAL_EXCEPTION_PROLOG(intno); \
  199. addi r3,r1,STACK_FRAME_OVERHEAD; \
  200. xfer(n, hdlr)
  201. #define CRITICAL_EXCEPTION(n, intno, label, hdlr) \
  202. START_EXCEPTION(label); \
  203. CRITICAL_EXCEPTION_PROLOG(intno); \
  204. addi r3,r1,STACK_FRAME_OVERHEAD; \
  205. EXC_XFER_TEMPLATE(hdlr, n+2, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), \
  206. NOCOPY, crit_transfer_to_handler, \
  207. ret_from_crit_exc)
  208. #define MCHECK_EXCEPTION(n, label, hdlr) \
  209. START_EXCEPTION(label); \
  210. MCHECK_EXCEPTION_PROLOG; \
  211. mfspr r5,SPRN_ESR; \
  212. stw r5,_ESR(r11); \
  213. addi r3,r1,STACK_FRAME_OVERHEAD; \
  214. EXC_XFER_TEMPLATE(hdlr, n+4, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), \
  215. NOCOPY, mcheck_transfer_to_handler, \
  216. ret_from_mcheck_exc)
  217. #define EXC_XFER_TEMPLATE(hdlr, trap, msr, copyee, tfer, ret) \
  218. li r10,trap; \
  219. stw r10,_TRAP(r11); \
  220. lis r10,msr@h; \
  221. ori r10,r10,msr@l; \
  222. copyee(r10, r9); \
  223. bl tfer; \
  224. .long hdlr; \
  225. .long ret
  226. #define COPY_EE(d, s) rlwimi d,s,0,16,16
  227. #define NOCOPY(d, s)
  228. #define EXC_XFER_STD(n, hdlr) \
  229. EXC_XFER_TEMPLATE(hdlr, n, MSR_KERNEL, NOCOPY, transfer_to_handler_full, \
  230. ret_from_except_full)
  231. #define EXC_XFER_LITE(n, hdlr) \
  232. EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, NOCOPY, transfer_to_handler, \
  233. ret_from_except)
  234. #define EXC_XFER_EE(n, hdlr) \
  235. EXC_XFER_TEMPLATE(hdlr, n, MSR_KERNEL, COPY_EE, transfer_to_handler_full, \
  236. ret_from_except_full)
  237. #define EXC_XFER_EE_LITE(n, hdlr) \
  238. EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, COPY_EE, transfer_to_handler, \
  239. ret_from_except)
  240. /* Check for a single step debug exception while in an exception
  241. * handler before state has been saved. This is to catch the case
  242. * where an instruction that we are trying to single step causes
  243. * an exception (eg ITLB/DTLB miss) and thus the first instruction of
  244. * the exception handler generates a single step debug exception.
  245. *
  246. * If we get a debug trap on the first instruction of an exception handler,
  247. * we reset the MSR_DE in the _exception handler's_ MSR (the debug trap is
  248. * a critical exception, so we are using SPRN_CSRR1 to manipulate the MSR).
  249. * The exception handler was handling a non-critical interrupt, so it will
  250. * save (and later restore) the MSR via SPRN_CSRR1, which will still have
  251. * the MSR_DE bit set.
  252. */
  253. #define DEBUG_DEBUG_EXCEPTION \
  254. START_EXCEPTION(DebugDebug); \
  255. DEBUG_EXCEPTION_PROLOG; \
  256. \
  257. /* \
  258. * If there is a single step or branch-taken exception in an \
  259. * exception entry sequence, it was probably meant to apply to \
  260. * the code where the exception occurred (since exception entry \
  261. * doesn't turn off DE automatically). We simulate the effect \
  262. * of turning off DE on entry to an exception handler by turning \
  263. * off DE in the DSRR1 value and clearing the debug status. \
  264. */ \
  265. mfspr r10,SPRN_DBSR; /* check single-step/branch taken */ \
  266. andis. r10,r10,(DBSR_IC|DBSR_BT)@h; \
  267. beq+ 2f; \
  268. \
  269. lis r10,interrupt_base@h; /* check if exception in vectors */ \
  270. ori r10,r10,interrupt_base@l; \
  271. cmplw r12,r10; \
  272. blt+ 2f; /* addr below exception vectors */ \
  273. \
  274. lis r10,interrupt_end@h; \
  275. ori r10,r10,interrupt_end@l; \
  276. cmplw r12,r10; \
  277. bgt+ 2f; /* addr above exception vectors */ \
  278. \
  279. /* here it looks like we got an inappropriate debug exception. */ \
  280. 1: rlwinm r9,r9,0,~MSR_DE; /* clear DE in the CDRR1 value */ \
  281. lis r10,(DBSR_IC|DBSR_BT)@h; /* clear the IC event */ \
  282. mtspr SPRN_DBSR,r10; \
  283. /* restore state and get out */ \
  284. lwz r10,_CCR(r11); \
  285. lwz r0,GPR0(r11); \
  286. lwz r1,GPR1(r11); \
  287. mtcrf 0x80,r10; \
  288. mtspr SPRN_DSRR0,r12; \
  289. mtspr SPRN_DSRR1,r9; \
  290. lwz r9,GPR9(r11); \
  291. lwz r12,GPR12(r11); \
  292. mtspr SPRN_SPRG_WSCRATCH_DBG,r8; \
  293. BOOKE_LOAD_EXC_LEVEL_STACK(DBG); /* r8 points to the debug stack */ \
  294. lwz r10,GPR10(r8); \
  295. lwz r11,GPR11(r8); \
  296. mfspr r8,SPRN_SPRG_RSCRATCH_DBG; \
  297. \
  298. PPC_RFDI; \
  299. b .; \
  300. \
  301. /* continue normal handling for a debug exception... */ \
  302. 2: mfspr r4,SPRN_DBSR; \
  303. addi r3,r1,STACK_FRAME_OVERHEAD; \
  304. EXC_XFER_TEMPLATE(DebugException, 0x2008, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), NOCOPY, debug_transfer_to_handler, ret_from_debug_exc)
  305. #define DEBUG_CRIT_EXCEPTION \
  306. START_EXCEPTION(DebugCrit); \
  307. CRITICAL_EXCEPTION_PROLOG(DEBUG); \
  308. \
  309. /* \
  310. * If there is a single step or branch-taken exception in an \
  311. * exception entry sequence, it was probably meant to apply to \
  312. * the code where the exception occurred (since exception entry \
  313. * doesn't turn off DE automatically). We simulate the effect \
  314. * of turning off DE on entry to an exception handler by turning \
  315. * off DE in the CSRR1 value and clearing the debug status. \
  316. */ \
  317. mfspr r10,SPRN_DBSR; /* check single-step/branch taken */ \
  318. andis. r10,r10,(DBSR_IC|DBSR_BT)@h; \
  319. beq+ 2f; \
  320. \
  321. lis r10,interrupt_base@h; /* check if exception in vectors */ \
  322. ori r10,r10,interrupt_base@l; \
  323. cmplw r12,r10; \
  324. blt+ 2f; /* addr below exception vectors */ \
  325. \
  326. lis r10,interrupt_end@h; \
  327. ori r10,r10,interrupt_end@l; \
  328. cmplw r12,r10; \
  329. bgt+ 2f; /* addr above exception vectors */ \
  330. \
  331. /* here it looks like we got an inappropriate debug exception. */ \
  332. 1: rlwinm r9,r9,0,~MSR_DE; /* clear DE in the CSRR1 value */ \
  333. lis r10,(DBSR_IC|DBSR_BT)@h; /* clear the IC event */ \
  334. mtspr SPRN_DBSR,r10; \
  335. /* restore state and get out */ \
  336. lwz r10,_CCR(r11); \
  337. lwz r0,GPR0(r11); \
  338. lwz r1,GPR1(r11); \
  339. mtcrf 0x80,r10; \
  340. mtspr SPRN_CSRR0,r12; \
  341. mtspr SPRN_CSRR1,r9; \
  342. lwz r9,GPR9(r11); \
  343. lwz r12,GPR12(r11); \
  344. mtspr SPRN_SPRG_WSCRATCH_CRIT,r8; \
  345. BOOKE_LOAD_EXC_LEVEL_STACK(CRIT); /* r8 points to the debug stack */ \
  346. lwz r10,GPR10(r8); \
  347. lwz r11,GPR11(r8); \
  348. mfspr r8,SPRN_SPRG_RSCRATCH_CRIT; \
  349. \
  350. rfci; \
  351. b .; \
  352. \
  353. /* continue normal handling for a critical exception... */ \
  354. 2: mfspr r4,SPRN_DBSR; \
  355. addi r3,r1,STACK_FRAME_OVERHEAD; \
  356. EXC_XFER_TEMPLATE(DebugException, 0x2002, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), NOCOPY, crit_transfer_to_handler, ret_from_crit_exc)
  357. #define DATA_STORAGE_EXCEPTION \
  358. START_EXCEPTION(DataStorage) \
  359. NORMAL_EXCEPTION_PROLOG(DATA_STORAGE); \
  360. mfspr r5,SPRN_ESR; /* Grab the ESR and save it */ \
  361. stw r5,_ESR(r11); \
  362. mfspr r4,SPRN_DEAR; /* Grab the DEAR */ \
  363. EXC_XFER_LITE(0x0300, handle_page_fault)
  364. #define INSTRUCTION_STORAGE_EXCEPTION \
  365. START_EXCEPTION(InstructionStorage) \
  366. NORMAL_EXCEPTION_PROLOG(INST_STORAGE); \
  367. mfspr r5,SPRN_ESR; /* Grab the ESR and save it */ \
  368. stw r5,_ESR(r11); \
  369. mr r4,r12; /* Pass SRR0 as arg2 */ \
  370. li r5,0; /* Pass zero as arg3 */ \
  371. EXC_XFER_LITE(0x0400, handle_page_fault)
  372. #define ALIGNMENT_EXCEPTION \
  373. START_EXCEPTION(Alignment) \
  374. NORMAL_EXCEPTION_PROLOG(ALIGNMENT); \
  375. mfspr r4,SPRN_DEAR; /* Grab the DEAR and save it */ \
  376. stw r4,_DEAR(r11); \
  377. addi r3,r1,STACK_FRAME_OVERHEAD; \
  378. EXC_XFER_EE(0x0600, alignment_exception)
  379. #define PROGRAM_EXCEPTION \
  380. START_EXCEPTION(Program) \
  381. NORMAL_EXCEPTION_PROLOG(PROGRAM); \
  382. mfspr r4,SPRN_ESR; /* Grab the ESR and save it */ \
  383. stw r4,_ESR(r11); \
  384. addi r3,r1,STACK_FRAME_OVERHEAD; \
  385. EXC_XFER_STD(0x0700, program_check_exception)
  386. #define DECREMENTER_EXCEPTION \
  387. START_EXCEPTION(Decrementer) \
  388. NORMAL_EXCEPTION_PROLOG(DECREMENTER); \
  389. lis r0,TSR_DIS@h; /* Setup the DEC interrupt mask */ \
  390. mtspr SPRN_TSR,r0; /* Clear the DEC interrupt */ \
  391. addi r3,r1,STACK_FRAME_OVERHEAD; \
  392. EXC_XFER_LITE(0x0900, timer_interrupt)
  393. #define FP_UNAVAILABLE_EXCEPTION \
  394. START_EXCEPTION(FloatingPointUnavailable) \
  395. NORMAL_EXCEPTION_PROLOG(FP_UNAVAIL); \
  396. beq 1f; \
  397. bl load_up_fpu; /* if from user, just load it up */ \
  398. b fast_exception_return; \
  399. 1: addi r3,r1,STACK_FRAME_OVERHEAD; \
  400. EXC_XFER_EE_LITE(0x800, kernel_fp_unavailable_exception)
  401. #ifndef __ASSEMBLY__
  402. struct exception_regs {
  403. unsigned long mas0;
  404. unsigned long mas1;
  405. unsigned long mas2;
  406. unsigned long mas3;
  407. unsigned long mas6;
  408. unsigned long mas7;
  409. unsigned long srr0;
  410. unsigned long srr1;
  411. unsigned long csrr0;
  412. unsigned long csrr1;
  413. unsigned long dsrr0;
  414. unsigned long dsrr1;
  415. unsigned long saved_ksp_limit;
  416. };
  417. /* ensure this structure is always sized to a multiple of the stack alignment */
  418. #define STACK_EXC_LVL_FRAME_SIZE _ALIGN_UP(sizeof (struct exception_regs), 16)
  419. #endif /* __ASSEMBLY__ */
  420. #endif /* __HEAD_BOOKE_H__ */