2 * This file contains the 64-bit "server" PowerPC variant
3 * of the low level exception handling including exception
4 * vectors, exception return, part of the slb and stab
5 * handling and other fixed offset specific things.
7 * This file is meant to be #included from head_64.S due to
8 * position dependent assembly.
10 * Most of this originates from head_64.S and thus has the same
15 #include <asm/hw_irq.h>
16 #include <asm/exception-64s.h>
17 #include <asm/ptrace.h>
20 * We layout physical memory as follows:
21 * 0x0000 - 0x00ff : Secondary processor spin code
22 * 0x0100 - 0x17ff : pSeries Interrupt prologs
23 * 0x1800 - 0x4000 : interrupt support common interrupt prologs
24 * 0x4000 - 0x5fff : pSeries interrupts with IR=1,DR=1
25 * 0x6000 - 0x6fff : more interrupt support including for IR=1,DR=1
26 * 0x7000 - 0x7fff : FWNMI data area
27 * 0x8000 - 0x8fff : Initial (CPU0) segment table
28 * 0x9000 - : Early init and support code
30 /* Syscall routine is used twice, in reloc-off and reloc-on paths */
31 #define SYSCALL_PSERIES_1 \
35 END_FTR_SECTION_IFSET(CPU_FTR_REAL_LE) \
38 mfspr r11,SPRN_SRR0 ; \
41 #define SYSCALL_PSERIES_2_RFID \
42 mfspr r12,SPRN_SRR1 ; \
43 ld r10,PACAKBASE(r13) ; \
44 LOAD_HANDLER(r10, system_call_entry) ; \
45 mtspr SPRN_SRR0,r10 ; \
46 ld r10,PACAKMSR(r13) ; \
47 mtspr SPRN_SRR1,r10 ; \
49 b . ; /* prevent speculative execution */
51 #define SYSCALL_PSERIES_3 \
52 /* Fast LE/BE switch system call */ \
53 1: mfspr r12,SPRN_SRR1 ; \
54 xori r12,r12,MSR_LE ; \
55 mtspr SPRN_SRR1,r12 ; \
56 rfid ; /* return to userspace */ \
58 2: mfspr r12,SPRN_SRR1 ; \
59 andi. r12,r12,MSR_PR ; \
61 mtspr SPRN_SRR0,r3 ; \
62 mtspr SPRN_SRR1,r4 ; \
63 mtspr SPRN_SDR1,r5 ; \
65 b . ; /* prevent speculative execution */
67 #if defined(CONFIG_RELOCATABLE)
69 * We can't branch directly; in the direct case we use LR
70 * and system_call_entry restores LR. (We thus need to move
71 * LR to r10 in the RFID case too.)
73 #define SYSCALL_PSERIES_2_DIRECT \
75 ld r12,PACAKBASE(r13) ; \
76 LOAD_HANDLER(r12, system_call_entry_direct) ; \
78 mfspr r12,SPRN_SRR1 ; \
79 /* Re-use of r13... No spare regs to do this */ \
82 GET_PACA(r13) ; /* get r13 back */ \
85 /* We can branch directly */
86 #define SYSCALL_PSERIES_2_DIRECT \
87 mfspr r12,SPRN_SRR1 ; \
89 mtmsrd r10,1 ; /* Set RI (EE=0) */ \
90 b system_call_entry_direct ;
94 * This is the start of the interrupt handlers for pSeries
95 * This code runs with relocation off.
96 * Code from here to __end_interrupts gets copied down to real
97 * address 0x100 when we are running a relocatable kernel.
98 * Therefore any relative branches in this section must only
99 * branch to labels in this section.
102 .globl __start_interrupts
105 .globl system_reset_pSeries;
106 system_reset_pSeries:
107 HMT_MEDIUM_PPR_DISCARD
109 #ifdef CONFIG_PPC_P7_NAP
111 /* Running native on arch 2.06 or later, check if we are
112 * waking up from nap. We only handle no state loss and
113 * supervisor state loss. We do -not- handle hypervisor
114 * state loss at this time.
117 rlwinm. r13,r13,47-31,30,31
120 /* waking up from powersave (nap) state */
122 /* Total loss of HV state is fatal, we could try to use the
123 * PIR to locate a PACA, then use an emergency stack etc...
124 * but for now, let's just stay stuck here
129 #ifdef CONFIG_KVM_BOOK3S_64_HV
130 li r0,KVM_HWTHREAD_IN_KERNEL
131 stb r0,HSTATE_HWTHREAD_STATE(r13)
132 /* Order setting hwthread_state vs. testing hwthread_req */
134 lbz r0,HSTATE_HWTHREAD_REQ(r13)
142 b .power7_wakeup_noloss
143 2: b .power7_wakeup_loss
145 END_FTR_SECTION_IFSET(CPU_FTR_HVMODE | CPU_FTR_ARCH_206)
146 #endif /* CONFIG_PPC_P7_NAP */
147 EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, system_reset_common, EXC_STD,
151 machine_check_pSeries_1:
152 /* This is moved out of line as it can be patched by FW, but
153 * some code path might still want to branch into the original
156 HMT_MEDIUM_PPR_DISCARD
157 SET_SCRATCH0(r13) /* save r13 */
158 EXCEPTION_PROLOG_0(PACA_EXMC)
159 b machine_check_pSeries_0
162 .globl data_access_pSeries
164 HMT_MEDIUM_PPR_DISCARD
167 b data_access_check_stab
168 data_access_not_stab:
169 END_MMU_FTR_SECTION_IFCLR(MMU_FTR_SLB)
170 EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, data_access_common, EXC_STD,
174 .globl data_access_slb_pSeries
175 data_access_slb_pSeries:
176 HMT_MEDIUM_PPR_DISCARD
178 EXCEPTION_PROLOG_0(PACA_EXSLB)
179 EXCEPTION_PROLOG_1(PACA_EXSLB, KVMTEST, 0x380)
180 std r3,PACA_EXSLB+EX_R3(r13)
183 /* Keep that around for when we re-implement dynamic VSIDs */
185 bge slb_miss_user_pseries
186 #endif /* __DISABLED__ */
188 #ifndef CONFIG_RELOCATABLE
192 * We can't just use a direct branch to .slb_miss_realmode
193 * because the distance from here to there depends on where
194 * the kernel ends up being put.
197 ld r10,PACAKBASE(r13)
198 LOAD_HANDLER(r10, .slb_miss_realmode)
203 STD_EXCEPTION_PSERIES(0x400, 0x400, instruction_access)
206 .globl instruction_access_slb_pSeries
207 instruction_access_slb_pSeries:
208 HMT_MEDIUM_PPR_DISCARD
210 EXCEPTION_PROLOG_0(PACA_EXSLB)
211 EXCEPTION_PROLOG_1(PACA_EXSLB, KVMTEST_PR, 0x480)
212 std r3,PACA_EXSLB+EX_R3(r13)
213 mfspr r3,SPRN_SRR0 /* SRR0 is faulting address */
215 /* Keep that around for when we re-implement dynamic VSIDs */
217 bge slb_miss_user_pseries
218 #endif /* __DISABLED__ */
220 #ifndef CONFIG_RELOCATABLE
224 ld r10,PACAKBASE(r13)
225 LOAD_HANDLER(r10, .slb_miss_realmode)
230 /* We open code these as we can't have a ". = x" (even with
231 * x = "." within a feature section
234 .globl hardware_interrupt_pSeries;
235 .globl hardware_interrupt_hv;
236 hardware_interrupt_pSeries:
237 hardware_interrupt_hv:
238 HMT_MEDIUM_PPR_DISCARD
240 _MASKABLE_EXCEPTION_PSERIES(0x502, hardware_interrupt,
241 EXC_HV, SOFTEN_TEST_HV)
242 KVM_HANDLER(PACA_EXGEN, EXC_HV, 0x502)
244 _MASKABLE_EXCEPTION_PSERIES(0x500, hardware_interrupt,
245 EXC_STD, SOFTEN_TEST_HV_201)
246 KVM_HANDLER(PACA_EXGEN, EXC_STD, 0x500)
247 ALT_FTR_SECTION_END_IFSET(CPU_FTR_HVMODE | CPU_FTR_ARCH_206)
249 STD_EXCEPTION_PSERIES(0x600, 0x600, alignment)
250 KVM_HANDLER_PR(PACA_EXGEN, EXC_STD, 0x600)
252 STD_EXCEPTION_PSERIES(0x700, 0x700, program_check)
253 KVM_HANDLER_PR(PACA_EXGEN, EXC_STD, 0x700)
255 STD_EXCEPTION_PSERIES(0x800, 0x800, fp_unavailable)
256 KVM_HANDLER_PR(PACA_EXGEN, EXC_STD, 0x800)
259 .globl decrementer_pSeries
261 _MASKABLE_EXCEPTION_PSERIES(0x900, decrementer, EXC_STD, SOFTEN_TEST_PR)
263 STD_EXCEPTION_HV(0x980, 0x982, hdecrementer)
265 MASKABLE_EXCEPTION_PSERIES(0xa00, 0xa00, doorbell_super)
266 KVM_HANDLER_PR(PACA_EXGEN, EXC_STD, 0xa00)
268 STD_EXCEPTION_PSERIES(0xb00, 0xb00, trap_0b)
269 KVM_HANDLER_PR(PACA_EXGEN, EXC_STD, 0xb00)
272 .globl system_call_pSeries
275 #ifdef CONFIG_KVM_BOOK3S_64_HANDLER
278 std r9,PACA_EXGEN+EX_R9(r13)
279 std r10,PACA_EXGEN+EX_R10(r13)
285 SYSCALL_PSERIES_2_RFID
287 KVM_HANDLER(PACA_EXGEN, EXC_STD, 0xc00)
289 STD_EXCEPTION_PSERIES(0xd00, 0xd00, single_step)
290 KVM_HANDLER_PR(PACA_EXGEN, EXC_STD, 0xd00)
292 /* At 0xe??? we have a bunch of hypervisor exceptions, we branch
293 * out of line to handle them
296 hv_exception_trampoline:
298 EXCEPTION_PROLOG_0(PACA_EXGEN)
303 EXCEPTION_PROLOG_0(PACA_EXGEN)
308 EXCEPTION_PROLOG_0(PACA_EXGEN)
309 b emulation_assist_hv
313 EXCEPTION_PROLOG_0(PACA_EXGEN)
318 EXCEPTION_PROLOG_0(PACA_EXGEN)
321 /* We need to deal with the Altivec unavailable exception
322 * here which is at 0xf20, thus in the middle of the
323 * prolog code of the PerformanceMonitor one. A little
324 * trickery is thus necessary
326 performance_monitor_pSeries_1:
329 EXCEPTION_PROLOG_0(PACA_EXGEN)
330 b performance_monitor_pSeries
332 altivec_unavailable_pSeries_1:
335 EXCEPTION_PROLOG_0(PACA_EXGEN)
336 b altivec_unavailable_pSeries
338 vsx_unavailable_pSeries_1:
341 EXCEPTION_PROLOG_0(PACA_EXGEN)
342 b vsx_unavailable_pSeries
346 EXCEPTION_PROLOG_0(PACA_EXGEN)
347 b tm_unavailable_pSeries
349 #ifdef CONFIG_CBE_RAS
350 STD_EXCEPTION_HV(0x1200, 0x1202, cbe_system_error)
351 KVM_HANDLER_SKIP(PACA_EXGEN, EXC_HV, 0x1202)
352 #endif /* CONFIG_CBE_RAS */
354 STD_EXCEPTION_PSERIES(0x1300, 0x1300, instruction_breakpoint)
355 KVM_HANDLER_PR_SKIP(PACA_EXGEN, EXC_STD, 0x1300)
358 .global denorm_exception_hv
360 HMT_MEDIUM_PPR_DISCARD
361 mtspr SPRN_SPRG_HSCRATCH0,r13
362 EXCEPTION_PROLOG_0(PACA_EXGEN)
363 std r11,PACA_EXGEN+EX_R11(r13)
364 std r12,PACA_EXGEN+EX_R12(r13)
365 mfspr r9,SPRN_SPRG_HSCRATCH0
366 std r9,PACA_EXGEN+EX_R13(r13)
369 #ifdef CONFIG_PPC_DENORMALISATION
371 mfspr r11,SPRN_HSRR0 /* save HSRR0 */
372 andis. r10,r10,(HSRR1_DENORM)@h /* denorm? */
373 addi r11,r11,-4 /* HSRR0 is next instruction */
377 EXCEPTION_PROLOG_PSERIES_1(denorm_common, EXC_HV)
378 KVM_HANDLER_SKIP(PACA_EXGEN, EXC_STD, 0x1500)
380 #ifdef CONFIG_CBE_RAS
381 STD_EXCEPTION_HV(0x1600, 0x1602, cbe_maintenance)
382 KVM_HANDLER_SKIP(PACA_EXGEN, EXC_HV, 0x1602)
383 #endif /* CONFIG_CBE_RAS */
385 STD_EXCEPTION_PSERIES(0x1700, 0x1700, altivec_assist)
386 KVM_HANDLER_PR(PACA_EXGEN, EXC_STD, 0x1700)
388 #ifdef CONFIG_CBE_RAS
389 STD_EXCEPTION_HV(0x1800, 0x1802, cbe_thermal)
390 KVM_HANDLER_SKIP(PACA_EXGEN, EXC_HV, 0x1802)
393 #endif /* CONFIG_CBE_RAS */
396 /*** Out of line interrupts support ***/
399 /* moved from 0x200 */
400 machine_check_pSeries:
401 .globl machine_check_fwnmi
403 HMT_MEDIUM_PPR_DISCARD
404 SET_SCRATCH0(r13) /* save r13 */
405 EXCEPTION_PROLOG_0(PACA_EXMC)
406 machine_check_pSeries_0:
407 EXCEPTION_PROLOG_1(PACA_EXMC, KVMTEST, 0x200)
408 EXCEPTION_PROLOG_PSERIES_1(machine_check_common, EXC_STD)
409 KVM_HANDLER_SKIP(PACA_EXMC, EXC_STD, 0x200)
411 /* moved from 0x300 */
412 data_access_check_stab:
414 std r9,PACA_EXSLB+EX_R9(r13)
415 std r10,PACA_EXSLB+EX_R10(r13)
419 rlwimi r10,r9,16,0x20
420 #ifdef CONFIG_KVM_BOOK3S_PR
421 lbz r9,HSTATE_IN_GUEST(r13)
422 rlwimi r10,r9,8,0x300
426 beq do_stab_bolted_pSeries
428 ld r9,PACA_EXSLB+EX_R9(r13)
429 ld r10,PACA_EXSLB+EX_R10(r13)
430 b data_access_not_stab
431 do_stab_bolted_pSeries:
432 std r11,PACA_EXSLB+EX_R11(r13)
433 std r12,PACA_EXSLB+EX_R12(r13)
435 std r10,PACA_EXSLB+EX_R13(r13)
436 EXCEPTION_PROLOG_PSERIES_1(.do_stab_bolted, EXC_STD)
438 KVM_HANDLER_SKIP(PACA_EXGEN, EXC_STD, 0x300)
439 KVM_HANDLER_SKIP(PACA_EXSLB, EXC_STD, 0x380)
440 KVM_HANDLER_PR(PACA_EXGEN, EXC_STD, 0x400)
441 KVM_HANDLER_PR(PACA_EXSLB, EXC_STD, 0x480)
442 KVM_HANDLER_PR(PACA_EXGEN, EXC_STD, 0x900)
443 KVM_HANDLER(PACA_EXGEN, EXC_HV, 0x982)
445 #ifdef CONFIG_PPC_DENORMALISATION
449 * To denormalise we need to move a copy of the register to itself.
450 * For POWER6 do that here for all FP regs.
453 ori r10,r10,(MSR_FP|MSR_FE0|MSR_FE1)
454 xori r10,r10,(MSR_FE0|MSR_FE1)
491 * To denormalise we need to move a copy of the register to itself.
492 * For POWER7 do that here for the first 32 VSX registers only.
495 oris r10,r10,MSR_VSX@h
530 ALT_FTR_SECTION_END_IFCLR(CPU_FTR_ARCH_206)
533 ld r9,PACA_EXGEN+EX_R9(r13)
534 RESTORE_PPR_PACA(PACA_EXGEN, r10)
535 ld r10,PACA_EXGEN+EX_R10(r13)
536 ld r11,PACA_EXGEN+EX_R11(r13)
537 ld r12,PACA_EXGEN+EX_R12(r13)
538 ld r13,PACA_EXGEN+EX_R13(r13)
544 /* moved from 0xe00 */
545 STD_EXCEPTION_HV_OOL(0xe02, h_data_storage)
546 KVM_HANDLER_SKIP(PACA_EXGEN, EXC_HV, 0xe02)
547 STD_EXCEPTION_HV_OOL(0xe22, h_instr_storage)
548 KVM_HANDLER(PACA_EXGEN, EXC_HV, 0xe22)
549 STD_EXCEPTION_HV_OOL(0xe42, emulation_assist)
550 KVM_HANDLER(PACA_EXGEN, EXC_HV, 0xe42)
551 STD_EXCEPTION_HV_OOL(0xe62, hmi_exception) /* need to flush cache ? */
552 KVM_HANDLER(PACA_EXGEN, EXC_HV, 0xe62)
553 MASKABLE_EXCEPTION_HV_OOL(0xe82, h_doorbell)
554 KVM_HANDLER(PACA_EXGEN, EXC_HV, 0xe82)
556 /* moved from 0xf00 */
557 STD_EXCEPTION_PSERIES_OOL(0xf00, performance_monitor)
558 KVM_HANDLER_PR(PACA_EXGEN, EXC_STD, 0xf00)
559 STD_EXCEPTION_PSERIES_OOL(0xf20, altivec_unavailable)
560 KVM_HANDLER_PR(PACA_EXGEN, EXC_STD, 0xf20)
561 STD_EXCEPTION_PSERIES_OOL(0xf40, vsx_unavailable)
562 KVM_HANDLER_PR(PACA_EXGEN, EXC_STD, 0xf40)
563 STD_EXCEPTION_PSERIES_OOL(0xf60, tm_unavailable)
564 KVM_HANDLER_PR(PACA_EXGEN, EXC_STD, 0xf60)
567 * An interrupt came in while soft-disabled. We set paca->irq_happened, then:
568 * - If it was a decrementer interrupt, we bump the dec to max and and return.
569 * - If it was a doorbell we return immediately since doorbells are edge
570 * triggered and won't automatically refire.
571 * - else we hard disable and return.
572 * This is called with r10 containing the value to OR to the paca field.
574 #define MASKED_INTERRUPT(_H) \
575 masked_##_H##interrupt: \
576 std r11,PACA_EXGEN+EX_R11(r13); \
577 lbz r11,PACAIRQHAPPENED(r13); \
579 stb r11,PACAIRQHAPPENED(r13); \
580 cmpwi r10,PACA_IRQ_DEC; \
583 ori r10,r10,0xffff; \
584 mtspr SPRN_DEC,r10; \
586 1: cmpwi r10,PACA_IRQ_DBELL; \
588 mfspr r10,SPRN_##_H##SRR1; \
589 rldicl r10,r10,48,1; /* clear MSR_EE */ \
591 mtspr SPRN_##_H##SRR1,r10; \
593 ld r9,PACA_EXGEN+EX_R9(r13); \
594 ld r10,PACA_EXGEN+EX_R10(r13); \
595 ld r11,PACA_EXGEN+EX_R11(r13); \
604 * Called from arch_local_irq_enable when an interrupt needs
605 * to be resent. r3 contains 0x500, 0x900, 0xa00 or 0xe80 to indicate
606 * which kind of interrupt. MSR:EE is already off. We generate a
607 * stackframe like if a real interrupt had happened.
609 * Note: While MSR:EE is off, we need to make sure that _MSR
610 * in the generated frame has EE set to 1 or the exception
611 * handler will not properly re-enable them.
613 _GLOBAL(__replay_interrupt)
614 /* We are going to jump to the exception common code which
615 * will retrieve various register values from the PACA which
616 * we don't give a damn about, so we don't bother storing them.
623 beq decrementer_common
625 beq hardware_interrupt_common
628 beq h_doorbell_common
631 beq doorbell_super_common
632 ALT_FTR_SECTION_END_IFSET(CPU_FTR_HVMODE)
635 #ifdef CONFIG_PPC_PSERIES
637 * Vectors for the FWNMI option. Share common code.
639 .globl system_reset_fwnmi
642 HMT_MEDIUM_PPR_DISCARD
643 SET_SCRATCH0(r13) /* save r13 */
644 EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, system_reset_common, EXC_STD,
647 #endif /* CONFIG_PPC_PSERIES */
651 * This is used for when the SLB miss handler has to go virtual,
652 * which doesn't happen for now anymore but will once we re-implement
653 * dynamic VSIDs for shared page tables
655 slb_miss_user_pseries:
656 std r10,PACA_EXGEN+EX_R10(r13)
657 std r11,PACA_EXGEN+EX_R11(r13)
658 std r12,PACA_EXGEN+EX_R12(r13)
660 ld r11,PACA_EXSLB+EX_R9(r13)
661 ld r12,PACA_EXSLB+EX_R3(r13)
662 std r10,PACA_EXGEN+EX_R13(r13)
663 std r11,PACA_EXGEN+EX_R9(r13)
664 std r12,PACA_EXGEN+EX_R3(r13)
667 mfspr r11,SRR0 /* save SRR0 */
668 ori r12,r12,slb_miss_user_common@l /* virt addr of handler */
669 ori r10,r10,MSR_IR|MSR_DR|MSR_RI
671 mfspr r12,SRR1 /* and SRR1 */
674 b . /* prevent spec. execution */
675 #endif /* __DISABLED__ */
678 * Code from here down to __end_handlers is invoked from the
679 * exception prologs above. Because the prologs assemble the
680 * addresses of these handlers using the LOAD_HANDLER macro,
681 * which uses an ori instruction, these handlers must be in
682 * the first 64k of the kernel image.
685 /*** Common interrupt handlers ***/
687 STD_EXCEPTION_COMMON(0x100, system_reset, .system_reset_exception)
690 * Machine check is different because we use a different
691 * save area: PACA_EXMC instead of PACA_EXGEN.
694 .globl machine_check_common
695 machine_check_common:
698 std r10,PACA_EXGEN+EX_DAR(r13)
700 stw r10,PACA_EXGEN+EX_DSISR(r13)
701 EXCEPTION_PROLOG_COMMON(0x200, PACA_EXMC)
704 ld r3,PACA_EXGEN+EX_DAR(r13)
705 lwz r4,PACA_EXGEN+EX_DSISR(r13)
709 addi r3,r1,STACK_FRAME_OVERHEAD
710 bl .machine_check_exception
713 STD_EXCEPTION_COMMON_ASYNC(0x500, hardware_interrupt, do_IRQ)
714 STD_EXCEPTION_COMMON_ASYNC(0x900, decrementer, .timer_interrupt)
715 STD_EXCEPTION_COMMON(0x980, hdecrementer, .hdec_interrupt)
716 #ifdef CONFIG_PPC_DOORBELL
717 STD_EXCEPTION_COMMON_ASYNC(0xa00, doorbell_super, .doorbell_exception)
719 STD_EXCEPTION_COMMON_ASYNC(0xa00, doorbell_super, .unknown_exception)
721 STD_EXCEPTION_COMMON(0xb00, trap_0b, .unknown_exception)
722 STD_EXCEPTION_COMMON(0xd00, single_step, .single_step_exception)
723 STD_EXCEPTION_COMMON(0xe00, trap_0e, .unknown_exception)
724 STD_EXCEPTION_COMMON(0xe40, emulation_assist, .program_check_exception)
725 STD_EXCEPTION_COMMON(0xe60, hmi_exception, .unknown_exception)
726 #ifdef CONFIG_PPC_DOORBELL
727 STD_EXCEPTION_COMMON_ASYNC(0xe80, h_doorbell, .doorbell_exception)
729 STD_EXCEPTION_COMMON_ASYNC(0xe80, h_doorbell, .unknown_exception)
731 STD_EXCEPTION_COMMON_ASYNC(0xf00, performance_monitor, .performance_monitor_exception)
732 STD_EXCEPTION_COMMON(0x1300, instruction_breakpoint, .instruction_breakpoint_exception)
733 STD_EXCEPTION_COMMON(0x1502, denorm, .unknown_exception)
734 #ifdef CONFIG_ALTIVEC
735 STD_EXCEPTION_COMMON(0x1700, altivec_assist, .altivec_assist_exception)
737 STD_EXCEPTION_COMMON(0x1700, altivec_assist, .unknown_exception)
739 #ifdef CONFIG_CBE_RAS
740 STD_EXCEPTION_COMMON(0x1200, cbe_system_error, .cbe_system_error_exception)
741 STD_EXCEPTION_COMMON(0x1600, cbe_maintenance, .cbe_maintenance_exception)
742 STD_EXCEPTION_COMMON(0x1800, cbe_thermal, .cbe_thermal_exception)
743 #endif /* CONFIG_CBE_RAS */
746 * Relocation-on interrupts: A subset of the interrupts can be delivered
747 * with IR=1/DR=1, if AIL==2 and MSR.HV won't be changed by delivering
748 * it. Addresses are the same as the original interrupt addresses, but
749 * offset by 0xc000000000004000.
750 * It's impossible to receive interrupts below 0x300 via this mechanism.
751 * KVM: None of these traps are from the guest ; anything that escalated
752 * to HV=1 from HV=0 is delivered via real mode handlers.
756 * This uses the standard macro, since the original 0x300 vector
757 * only has extra guff for STAB-based processors -- which never
760 STD_RELON_EXCEPTION_PSERIES(0x4300, 0x300, data_access)
762 .globl data_access_slb_relon_pSeries
763 data_access_slb_relon_pSeries:
765 EXCEPTION_PROLOG_0(PACA_EXSLB)
766 EXCEPTION_PROLOG_1(PACA_EXSLB, NOTEST, 0x380)
767 std r3,PACA_EXSLB+EX_R3(r13)
770 #ifndef CONFIG_RELOCATABLE
774 * We can't just use a direct branch to .slb_miss_realmode
775 * because the distance from here to there depends on where
776 * the kernel ends up being put.
779 ld r10,PACAKBASE(r13)
780 LOAD_HANDLER(r10, .slb_miss_realmode)
785 STD_RELON_EXCEPTION_PSERIES(0x4400, 0x400, instruction_access)
787 .globl instruction_access_slb_relon_pSeries
788 instruction_access_slb_relon_pSeries:
790 EXCEPTION_PROLOG_0(PACA_EXSLB)
791 EXCEPTION_PROLOG_1(PACA_EXSLB, NOTEST, 0x480)
792 std r3,PACA_EXSLB+EX_R3(r13)
793 mfspr r3,SPRN_SRR0 /* SRR0 is faulting address */
795 #ifndef CONFIG_RELOCATABLE
799 ld r10,PACAKBASE(r13)
800 LOAD_HANDLER(r10, .slb_miss_realmode)
806 .globl hardware_interrupt_relon_pSeries;
807 .globl hardware_interrupt_relon_hv;
808 hardware_interrupt_relon_pSeries:
809 hardware_interrupt_relon_hv:
811 _MASKABLE_RELON_EXCEPTION_PSERIES(0x502, hardware_interrupt, EXC_HV, SOFTEN_TEST_HV)
813 _MASKABLE_RELON_EXCEPTION_PSERIES(0x500, hardware_interrupt, EXC_STD, SOFTEN_TEST_PR)
814 ALT_FTR_SECTION_END_IFSET(CPU_FTR_HVMODE)
815 STD_RELON_EXCEPTION_PSERIES(0x4600, 0x600, alignment)
816 STD_RELON_EXCEPTION_PSERIES(0x4700, 0x700, program_check)
817 STD_RELON_EXCEPTION_PSERIES(0x4800, 0x800, fp_unavailable)
818 MASKABLE_RELON_EXCEPTION_PSERIES(0x4900, 0x900, decrementer)
819 STD_RELON_EXCEPTION_HV(0x4980, 0x982, hdecrementer)
820 MASKABLE_RELON_EXCEPTION_PSERIES(0x4a00, 0xa00, doorbell_super)
821 STD_RELON_EXCEPTION_PSERIES(0x4b00, 0xb00, trap_0b)
824 .globl system_call_relon_pSeries
825 system_call_relon_pSeries:
828 SYSCALL_PSERIES_2_DIRECT
831 STD_RELON_EXCEPTION_PSERIES(0x4d00, 0xd00, single_step)
835 EXCEPTION_PROLOG_0(PACA_EXGEN)
836 b h_data_storage_relon_hv
840 EXCEPTION_PROLOG_0(PACA_EXGEN)
841 b h_instr_storage_relon_hv
845 EXCEPTION_PROLOG_0(PACA_EXGEN)
846 b emulation_assist_relon_hv
850 EXCEPTION_PROLOG_0(PACA_EXGEN)
851 b hmi_exception_relon_hv
855 EXCEPTION_PROLOG_0(PACA_EXGEN)
856 b h_doorbell_relon_hv
858 performance_monitor_relon_pSeries_1:
861 EXCEPTION_PROLOG_0(PACA_EXGEN)
862 b performance_monitor_relon_pSeries
864 altivec_unavailable_relon_pSeries_1:
867 EXCEPTION_PROLOG_0(PACA_EXGEN)
868 b altivec_unavailable_relon_pSeries
870 vsx_unavailable_relon_pSeries_1:
873 EXCEPTION_PROLOG_0(PACA_EXGEN)
874 b vsx_unavailable_relon_pSeries
876 tm_unavailable_relon_pSeries_1:
879 EXCEPTION_PROLOG_0(PACA_EXGEN)
880 b tm_unavailable_relon_pSeries
882 STD_RELON_EXCEPTION_PSERIES(0x5300, 0x1300, instruction_breakpoint)
883 #ifdef CONFIG_PPC_DENORMALISATION
885 b denorm_exception_hv
887 STD_RELON_EXCEPTION_PSERIES(0x5700, 0x1700, altivec_assist)
889 /* Other future vectors */
891 .globl __end_interrupts
895 system_call_entry_direct:
896 #if defined(CONFIG_RELOCATABLE)
897 /* The first level prologue may have used LR to get here, saving
898 * orig in r10. To save hacking/ifdeffing common code, restore here.
905 ppc64_runlatch_on_trampoline:
906 b .__ppc64_runlatch_on
909 * Here we have detected that the kernel stack pointer is bad.
910 * R9 contains the saved CR, r13 points to the paca,
911 * r10 contains the (bad) kernel stack pointer,
912 * r11 and r12 contain the saved SRR0 and SRR1.
913 * We switch to using an emergency stack, save the registers there,
914 * and call kernel_bad_stack(), which panics.
917 ld r1,PACAEMERGSP(r13)
918 subi r1,r1,64+INT_FRAME_SIZE
950 std r10,ORIG_GPR3(r1)
951 END_FTR_SECTION_IFSET(CPU_FTR_CFAR)
954 lhz r12,PACA_TRAP_SAVE(r13)
956 addi r11,r1,INT_FRAME_SIZE
961 ld r11,exception_marker@toc(r2)
963 std r11,STACK_FRAME_OVERHEAD-16(r1)
964 1: addi r3,r1,STACK_FRAME_OVERHEAD
969 * Here r13 points to the paca, r9 contains the saved CR,
970 * SRR0 and SRR1 are saved in r11 and r12,
971 * r9 - r13 are saved in paca->exgen.
974 .globl data_access_common
977 std r10,PACA_EXGEN+EX_DAR(r13)
979 stw r10,PACA_EXGEN+EX_DSISR(r13)
980 EXCEPTION_PROLOG_COMMON(0x300, PACA_EXGEN)
983 ld r3,PACA_EXGEN+EX_DAR(r13)
984 lwz r4,PACA_EXGEN+EX_DSISR(r13)
986 b .do_hash_page /* Try to handle as hpte fault */
989 .globl h_data_storage_common
990 h_data_storage_common:
992 std r10,PACA_EXGEN+EX_DAR(r13)
993 mfspr r10,SPRN_HDSISR
994 stw r10,PACA_EXGEN+EX_DSISR(r13)
995 EXCEPTION_PROLOG_COMMON(0xe00, PACA_EXGEN)
998 addi r3,r1,STACK_FRAME_OVERHEAD
999 bl .unknown_exception
1003 .globl instruction_access_common
1004 instruction_access_common:
1005 EXCEPTION_PROLOG_COMMON(0x400, PACA_EXGEN)
1009 andis. r4,r12,0x5820
1011 b .do_hash_page /* Try to handle as hpte fault */
1013 STD_EXCEPTION_COMMON(0xe20, h_instr_storage, .unknown_exception)
1016 * Here is the common SLB miss user that is used when going to virtual
1017 * mode for SLB misses, that is currently not used
1021 .globl slb_miss_user_common
1022 slb_miss_user_common:
1024 std r3,PACA_EXGEN+EX_DAR(r13)
1025 stw r9,PACA_EXGEN+EX_CCR(r13)
1026 std r10,PACA_EXGEN+EX_LR(r13)
1027 std r11,PACA_EXGEN+EX_SRR0(r13)
1028 bl .slb_allocate_user
1030 ld r10,PACA_EXGEN+EX_LR(r13)
1031 ld r3,PACA_EXGEN+EX_R3(r13)
1032 lwz r9,PACA_EXGEN+EX_CCR(r13)
1033 ld r11,PACA_EXGEN+EX_SRR0(r13)
1037 andi. r10,r12,MSR_RI /* check for unrecoverable exception */
1038 beq- unrecov_user_slb
1046 clrrdi r10,r10,2 /* clear RI before setting SRR0/1 */
1052 ld r9,PACA_EXGEN+EX_R9(r13)
1053 ld r10,PACA_EXGEN+EX_R10(r13)
1054 ld r11,PACA_EXGEN+EX_R11(r13)
1055 ld r12,PACA_EXGEN+EX_R12(r13)
1056 ld r13,PACA_EXGEN+EX_R13(r13)
1061 EXCEPTION_PROLOG_COMMON(0x380, PACA_EXGEN)
1062 ld r4,PACA_EXGEN+EX_DAR(r13)
1069 EXCEPTION_PROLOG_COMMON(0x4200, PACA_EXGEN)
1072 1: addi r3,r1,STACK_FRAME_OVERHEAD
1073 bl .unrecoverable_exception
1076 #endif /* __DISABLED__ */
1080 .globl alignment_common
1083 std r10,PACA_EXGEN+EX_DAR(r13)
1084 mfspr r10,SPRN_DSISR
1085 stw r10,PACA_EXGEN+EX_DSISR(r13)
1086 EXCEPTION_PROLOG_COMMON(0x600, PACA_EXGEN)
1087 ld r3,PACA_EXGEN+EX_DAR(r13)
1088 lwz r4,PACA_EXGEN+EX_DSISR(r13)
1093 addi r3,r1,STACK_FRAME_OVERHEAD
1094 bl .alignment_exception
1098 .globl program_check_common
1099 program_check_common:
1100 EXCEPTION_PROLOG_COMMON(0x700, PACA_EXGEN)
1103 addi r3,r1,STACK_FRAME_OVERHEAD
1104 bl .program_check_exception
1108 .globl fp_unavailable_common
1109 fp_unavailable_common:
1110 EXCEPTION_PROLOG_COMMON(0x800, PACA_EXGEN)
1111 bne 1f /* if from user, just load it up */
1114 addi r3,r1,STACK_FRAME_OVERHEAD
1115 bl .kernel_fp_unavailable_exception
1118 #ifdef CONFIG_PPC_TRANSACTIONAL_MEM
1120 /* Test if 2 TM state bits are zero. If non-zero (ie. userspace was in
1121 * transaction), go do TM stuff
1123 rldicl. r0, r12, (64-MSR_TS_LG), (64-2)
1125 END_FTR_SECTION_IFSET(CPU_FTR_TM)
1128 b fast_exception_return
1129 #ifdef CONFIG_PPC_TRANSACTIONAL_MEM
1130 2: /* User process was in a transaction */
1133 addi r3,r1,STACK_FRAME_OVERHEAD
1134 bl .fp_unavailable_tm
1138 .globl altivec_unavailable_common
1139 altivec_unavailable_common:
1140 EXCEPTION_PROLOG_COMMON(0xf20, PACA_EXGEN)
1141 #ifdef CONFIG_ALTIVEC
1144 #ifdef CONFIG_PPC_TRANSACTIONAL_MEM
1145 BEGIN_FTR_SECTION_NESTED(69)
1146 /* Test if 2 TM state bits are zero. If non-zero (ie. userspace was in
1147 * transaction), go do TM stuff
1149 rldicl. r0, r12, (64-MSR_TS_LG), (64-2)
1151 END_FTR_SECTION_NESTED(CPU_FTR_TM, CPU_FTR_TM, 69)
1154 b fast_exception_return
1155 #ifdef CONFIG_PPC_TRANSACTIONAL_MEM
1156 2: /* User process was in a transaction */
1159 addi r3,r1,STACK_FRAME_OVERHEAD
1160 bl .altivec_unavailable_tm
1164 END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
1168 addi r3,r1,STACK_FRAME_OVERHEAD
1169 bl .altivec_unavailable_exception
1173 .globl vsx_unavailable_common
1174 vsx_unavailable_common:
1175 EXCEPTION_PROLOG_COMMON(0xf40, PACA_EXGEN)
1179 #ifdef CONFIG_PPC_TRANSACTIONAL_MEM
1180 BEGIN_FTR_SECTION_NESTED(69)
1181 /* Test if 2 TM state bits are zero. If non-zero (ie. userspace was in
1182 * transaction), go do TM stuff
1184 rldicl. r0, r12, (64-MSR_TS_LG), (64-2)
1186 END_FTR_SECTION_NESTED(CPU_FTR_TM, CPU_FTR_TM, 69)
1189 #ifdef CONFIG_PPC_TRANSACTIONAL_MEM
1190 2: /* User process was in a transaction */
1193 addi r3,r1,STACK_FRAME_OVERHEAD
1194 bl .vsx_unavailable_tm
1198 END_FTR_SECTION_IFSET(CPU_FTR_VSX)
1202 addi r3,r1,STACK_FRAME_OVERHEAD
1203 bl .vsx_unavailable_exception
1207 .globl tm_unavailable_common
1208 tm_unavailable_common:
1209 EXCEPTION_PROLOG_COMMON(0xf60, PACA_EXGEN)
1212 addi r3,r1,STACK_FRAME_OVERHEAD
1213 bl .tm_unavailable_exception
1217 .globl __end_handlers
1220 /* Equivalents to the above handlers for relocation-on interrupt vectors */
1221 STD_RELON_EXCEPTION_HV_OOL(0xe00, h_data_storage)
1222 KVM_HANDLER(PACA_EXGEN, EXC_HV, 0xe00)
1223 STD_RELON_EXCEPTION_HV_OOL(0xe20, h_instr_storage)
1224 KVM_HANDLER(PACA_EXGEN, EXC_HV, 0xe20)
1225 STD_RELON_EXCEPTION_HV_OOL(0xe40, emulation_assist)
1226 KVM_HANDLER(PACA_EXGEN, EXC_HV, 0xe40)
1227 STD_RELON_EXCEPTION_HV_OOL(0xe60, hmi_exception)
1228 KVM_HANDLER(PACA_EXGEN, EXC_HV, 0xe60)
1229 MASKABLE_RELON_EXCEPTION_HV_OOL(0xe80, h_doorbell)
1230 KVM_HANDLER(PACA_EXGEN, EXC_HV, 0xe80)
1232 STD_RELON_EXCEPTION_PSERIES_OOL(0xf00, performance_monitor)
1233 STD_RELON_EXCEPTION_PSERIES_OOL(0xf20, altivec_unavailable)
1234 STD_RELON_EXCEPTION_PSERIES_OOL(0xf40, vsx_unavailable)
1235 STD_RELON_EXCEPTION_PSERIES_OOL(0xf60, tm_unavailable)
1237 #if defined(CONFIG_PPC_PSERIES) || defined(CONFIG_PPC_POWERNV)
1239 * Data area reserved for FWNMI option.
1240 * This address (0x7000) is fixed by the RPA.
1243 .globl fwnmi_data_area
1246 /* pseries and powernv need to keep the whole page from
1247 * 0x7000 to 0x8000 free for use by the firmware
1250 #endif /* defined(CONFIG_PPC_PSERIES) || defined(CONFIG_PPC_POWERNV) */
1252 /* Space for CPU0's segment table */
1258 #ifdef CONFIG_PPC_POWERNV
1259 _GLOBAL(opal_mc_secondary_handler)
1260 HMT_MEDIUM_PPR_DISCARD
1265 std r3,PACA_OPAL_MC_EVT(r13)
1266 ld r13,OPAL_MC_SRR0(r3)
1268 ld r13,OPAL_MC_SRR1(r3)
1270 ld r3,OPAL_MC_GPR3(r3)
1272 b machine_check_pSeries
1273 #endif /* CONFIG_PPC_POWERNV */
1277 * r13 points to the PACA, r9 contains the saved CR,
1278 * r12 contain the saved SRR1, SRR0 is still ready for return
1279 * r3 has the faulting address
1280 * r9 - r13 are saved in paca->exslb.
1281 * r3 is saved in paca->slb_r3
1282 * We assume we aren't going to take any exceptions during this procedure.
1284 _GLOBAL(slb_miss_realmode)
1286 #ifdef CONFIG_RELOCATABLE
1290 stw r9,PACA_EXSLB+EX_CCR(r13) /* save CR in exc. frame */
1291 std r10,PACA_EXSLB+EX_LR(r13) /* save LR */
1293 bl .slb_allocate_realmode
1295 /* All done -- return from exception. */
1297 ld r10,PACA_EXSLB+EX_LR(r13)
1298 ld r3,PACA_EXSLB+EX_R3(r13)
1299 lwz r9,PACA_EXSLB+EX_CCR(r13) /* get saved CR */
1303 andi. r10,r12,MSR_RI /* check for unrecoverable exception */
1309 mtcrf 0x01,r9 /* slb_allocate uses cr0 and cr7 */
1312 RESTORE_PPR_PACA(PACA_EXSLB, r9)
1313 ld r9,PACA_EXSLB+EX_R9(r13)
1314 ld r10,PACA_EXSLB+EX_R10(r13)
1315 ld r11,PACA_EXSLB+EX_R11(r13)
1316 ld r12,PACA_EXSLB+EX_R12(r13)
1317 ld r13,PACA_EXSLB+EX_R13(r13)
1319 b . /* prevent speculative execution */
1321 2: mfspr r11,SPRN_SRR0
1322 ld r10,PACAKBASE(r13)
1323 LOAD_HANDLER(r10,unrecov_slb)
1325 ld r10,PACAKMSR(r13)
1331 EXCEPTION_PROLOG_COMMON(0x4100, PACA_EXSLB)
1334 1: addi r3,r1,STACK_FRAME_OVERHEAD
1335 bl .unrecoverable_exception
1339 #ifdef CONFIG_PPC_970_NAP
1342 std r9,TI_LOCAL_FLAGS(r11)
1343 ld r10,_LINK(r1) /* make idle task do the */
1344 std r10,_NIP(r1) /* equivalent of a blr */
1352 _STATIC(do_hash_page)
1356 andis. r0,r4,0xa410 /* weird error? */
1357 bne- handle_page_fault /* if not, try to insert a HPTE */
1358 andis. r0,r4,DSISR_DABRMATCH@h
1359 bne- handle_dabr_fault
1362 andis. r0,r4,0x0020 /* Is it a segment table fault? */
1363 bne- do_ste_alloc /* If so handle it */
1364 END_MMU_FTR_SECTION_IFCLR(MMU_FTR_SLB)
1366 CURRENT_THREAD_INFO(r11, r1)
1367 lwz r0,TI_PREEMPT(r11) /* If we're in an "NMI" */
1368 andis. r0,r0,NMI_MASK@h /* (i.e. an irq when soft-disabled) */
1369 bne 77f /* then don't call hash_page now */
1371 * We need to set the _PAGE_USER bit if MSR_PR is set or if we are
1372 * accessing a userspace segment (even from the kernel). We assume
1373 * kernel addresses always have the high bit set.
1375 rlwinm r4,r4,32-25+9,31-9,31-9 /* DSISR_STORE -> _PAGE_RW */
1376 rotldi r0,r3,15 /* Move high bit into MSR_PR posn */
1377 orc r0,r12,r0 /* MSR_PR | ~high_bit */
1378 rlwimi r4,r0,32-13,30,30 /* becomes _PAGE_USER access bit */
1379 ori r4,r4,1 /* add _PAGE_PRESENT */
1380 rlwimi r4,r5,22+2,31-2,31-2 /* Set _PAGE_EXEC if trap is 0x400 */
1383 * r3 contains the faulting address
1384 * r4 contains the required access permissions
1385 * r5 contains the trap number
1387 * at return r3 = 0 for success, 1 for page fault, negative for error
1389 bl .hash_page /* build HPTE if possible */
1390 cmpdi r3,0 /* see if hash_page succeeded */
1393 beq fast_exc_return_irq /* Return from exception on success */
1398 /* Here we have a page fault that hash_page can't handle. */
1402 addi r3,r1,STACK_FRAME_OVERHEAD
1408 addi r3,r1,STACK_FRAME_OVERHEAD
1413 /* We have a data breakpoint exception - handle it */
1418 addi r3,r1,STACK_FRAME_OVERHEAD
1420 12: b .ret_from_except_lite
1423 /* We have a page fault that hash_page could handle but HV refused
1428 addi r3,r1,STACK_FRAME_OVERHEAD
1434 * We come here as a result of a DSI at a point where we don't want
1435 * to call hash_page, such as when we are accessing memory (possibly
1436 * user memory) inside a PMU interrupt that occurred while interrupts
1437 * were soft-disabled. We want to invoke the exception handler for
1438 * the access, or panic if there isn't a handler.
1442 addi r3,r1,STACK_FRAME_OVERHEAD
1447 /* here we have a segment miss */
1449 bl .ste_allocate /* try to insert stab entry */
1451 bne- handle_page_fault
1452 b fast_exception_return
1455 * r13 points to the PACA, r9 contains the saved CR,
1456 * r11 and r12 contain the saved SRR0 and SRR1.
1457 * r9 - r13 are saved in paca->exslb.
1458 * We assume we aren't going to take any exceptions during this procedure.
1459 * We assume (DAR >> 60) == 0xc.
1462 _GLOBAL(do_stab_bolted)
1463 stw r9,PACA_EXSLB+EX_CCR(r13) /* save CR in exc. frame */
1464 std r11,PACA_EXSLB+EX_SRR0(r13) /* save SRR0 in exc. frame */
1465 mfspr r11,SPRN_DAR /* ea */
1468 * check for bad kernel/user address
1469 * (ea & ~REGION_MASK) >= PGTABLE_RANGE
1471 rldicr. r9,r11,4,(63 - 46 - 4)
1472 li r9,0 /* VSID = 0 for bad address */
1477 * This is the kernel vsid, we take the top for context from
1478 * the range. context = (MAX_USER_CONTEXT) + ((ea >> 60) - 0xc) + 1
1479 * Here we know that (ea >> 60) == 0xc
1481 lis r9,(MAX_USER_CONTEXT + 1)@ha
1482 addi r9,r9,(MAX_USER_CONTEXT + 1)@l
1484 srdi r10,r11,SID_SHIFT
1485 rldimi r10,r9,ESID_BITS,0 /* proto vsid */
1486 ASM_VSID_SCRAMBLE(r10, r9, 256M)
1487 rldic r9,r10,12,16 /* r9 = vsid << 12 */
1490 /* Hash to the primary group */
1491 ld r10,PACASTABVIRT(r13)
1492 srdi r11,r11,SID_SHIFT
1493 rldimi r10,r11,7,52 /* r10 = first ste of the group */
1495 /* Search the primary group for a free entry */
1496 1: ld r11,0(r10) /* Test valid bit of the current ste */
1503 /* Stick for only searching the primary group for now. */
1504 /* At least for now, we use a very simple random castout scheme */
1505 /* Use the TB as a random number ; OR in 1 to avoid entry 0 */
1507 rldic r11,r11,4,57 /* r11 = (r11 << 4) & 0x70 */
1510 /* r10 currently points to an ste one past the group of interest */
1511 /* make it point to the randomly selected entry */
1513 or r10,r10,r11 /* r10 is the entry to invalidate */
1515 isync /* mark the entry invalid */
1517 rldicl r11,r11,56,1 /* clear the valid bit */
1522 clrrdi r11,r11,28 /* Get the esid part of the ste */
1525 2: std r9,8(r10) /* Store the vsid part of the ste */
1528 mfspr r11,SPRN_DAR /* Get the new esid */
1529 clrrdi r11,r11,28 /* Permits a full 32b of ESID */
1530 ori r11,r11,0x90 /* Turn on valid and kp */
1531 std r11,0(r10) /* Put new entry back into the stab */
1535 /* All done -- return from exception. */
1536 lwz r9,PACA_EXSLB+EX_CCR(r13) /* get saved CR */
1537 ld r11,PACA_EXSLB+EX_SRR0(r13) /* get saved SRR0 */
1539 andi. r10,r12,MSR_RI
1542 mtcrf 0x80,r9 /* restore CR */
1550 ld r9,PACA_EXSLB+EX_R9(r13)
1551 ld r10,PACA_EXSLB+EX_R10(r13)
1552 ld r11,PACA_EXSLB+EX_R11(r13)
1553 ld r12,PACA_EXSLB+EX_R12(r13)
1554 ld r13,PACA_EXSLB+EX_R13(r13)
1556 b . /* prevent speculative execution */