head_booke.h 17 KB

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