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 dependant assembly.
10 * Most of this originates from head_64.S and thus has the same
16 * We layout physical memory as follows:
17 * 0x0000 - 0x00ff : Secondary processor spin code
18 * 0x0100 - 0x2fff : pSeries Interrupt prologs
19 * 0x3000 - 0x5fff : interrupt support, iSeries and common interrupt prologs
20 * 0x6000 - 0x6fff : Initial (CPU0) segment table
21 * 0x7000 - 0x7fff : FWNMI data area
22 * 0x8000 - : Early init and support code
31 * SPRG0 reserved for hypervisor
32 * SPRG1 temp - used to save gpr
33 * SPRG2 temp - used to save gpr
34 * SPRG3 virt addr of paca
38 * This is the start of the interrupt handlers for pSeries
39 * This code runs with relocation off.
40 * Code from here to __end_interrupts gets copied down to real
41 * address 0x100 when we are running a relocatable kernel.
42 * Therefore any relative branches in this section must only
43 * branch to labels in this section.
46 .globl __start_interrupts
49 STD_EXCEPTION_PSERIES(0x100, system_reset)
52 _machine_check_pSeries:
54 mtspr SPRN_SPRG1,r13 /* save r13 */
55 EXCEPTION_PROLOG_PSERIES(PACA_EXMC, machine_check_common)
58 .globl data_access_pSeries
67 rlwimi r13,r12,16,0x20
70 beq do_stab_bolted_pSeries
73 END_FTR_SECTION_IFCLR(CPU_FTR_SLB)
74 EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, data_access_common)
77 .globl data_access_slb_pSeries
78 data_access_slb_pSeries:
81 mfspr r13,SPRN_SPRG3 /* get paca address into r13 */
82 std r3,PACA_EXSLB+EX_R3(r13)
84 std r9,PACA_EXSLB+EX_R9(r13) /* save r9 - r12 */
87 /* Keep that around for when we re-implement dynamic VSIDs */
89 bge slb_miss_user_pseries
90 #endif /* __DISABLED__ */
91 std r10,PACA_EXSLB+EX_R10(r13)
92 std r11,PACA_EXSLB+EX_R11(r13)
93 std r12,PACA_EXSLB+EX_R12(r13)
95 std r10,PACA_EXSLB+EX_R13(r13)
96 mfspr r12,SPRN_SRR1 /* and SRR1 */
97 #ifndef CONFIG_RELOCATABLE
101 * We can't just use a direct branch to .slb_miss_realmode
102 * because the distance from here to there depends on where
103 * the kernel ends up being put.
106 ld r10,PACAKBASE(r13)
107 LOAD_HANDLER(r10, .slb_miss_realmode)
112 STD_EXCEPTION_PSERIES(0x400, instruction_access)
115 .globl instruction_access_slb_pSeries
116 instruction_access_slb_pSeries:
119 mfspr r13,SPRN_SPRG3 /* get paca address into r13 */
120 std r3,PACA_EXSLB+EX_R3(r13)
121 mfspr r3,SPRN_SRR0 /* SRR0 is faulting address */
122 std r9,PACA_EXSLB+EX_R9(r13) /* save r9 - r12 */
125 /* Keep that around for when we re-implement dynamic VSIDs */
127 bge slb_miss_user_pseries
128 #endif /* __DISABLED__ */
129 std r10,PACA_EXSLB+EX_R10(r13)
130 std r11,PACA_EXSLB+EX_R11(r13)
131 std r12,PACA_EXSLB+EX_R12(r13)
133 std r10,PACA_EXSLB+EX_R13(r13)
134 mfspr r12,SPRN_SRR1 /* and SRR1 */
135 #ifndef CONFIG_RELOCATABLE
139 ld r10,PACAKBASE(r13)
140 LOAD_HANDLER(r10, .slb_miss_realmode)
145 MASKABLE_EXCEPTION_PSERIES(0x500, hardware_interrupt)
146 STD_EXCEPTION_PSERIES(0x600, alignment)
147 STD_EXCEPTION_PSERIES(0x700, program_check)
148 STD_EXCEPTION_PSERIES(0x800, fp_unavailable)
149 MASKABLE_EXCEPTION_PSERIES(0x900, decrementer)
150 STD_EXCEPTION_PSERIES(0xa00, trap_0a)
151 STD_EXCEPTION_PSERIES(0xb00, trap_0b)
154 .globl system_call_pSeries
160 END_FTR_SECTION_IFSET(CPU_FTR_REAL_LE)
164 ld r12,PACAKBASE(r13)
166 LOAD_HANDLER(r12, system_call_entry)
171 b . /* prevent speculative execution */
173 /* Fast LE/BE switch system call */
174 1: mfspr r12,SPRN_SRR1
177 rfid /* return to userspace */
180 STD_EXCEPTION_PSERIES(0xd00, single_step)
181 STD_EXCEPTION_PSERIES(0xe00, trap_0e)
183 /* We need to deal with the Altivec unavailable exception
184 * here which is at 0xf20, thus in the middle of the
185 * prolog code of the PerformanceMonitor one. A little
186 * trickery is thus necessary
189 b performance_monitor_pSeries
192 b altivec_unavailable_pSeries
195 b vsx_unavailable_pSeries
197 #ifdef CONFIG_CBE_RAS
198 HSTD_EXCEPTION_PSERIES(0x1200, cbe_system_error)
199 #endif /* CONFIG_CBE_RAS */
200 STD_EXCEPTION_PSERIES(0x1300, instruction_breakpoint)
201 #ifdef CONFIG_CBE_RAS
202 HSTD_EXCEPTION_PSERIES(0x1600, cbe_maintenance)
203 #endif /* CONFIG_CBE_RAS */
204 STD_EXCEPTION_PSERIES(0x1700, altivec_assist)
205 #ifdef CONFIG_CBE_RAS
206 HSTD_EXCEPTION_PSERIES(0x1800, cbe_thermal)
207 #endif /* CONFIG_CBE_RAS */
211 /*** pSeries interrupt support ***/
213 /* moved from 0xf00 */
214 STD_EXCEPTION_PSERIES(., performance_monitor)
215 STD_EXCEPTION_PSERIES(., altivec_unavailable)
216 STD_EXCEPTION_PSERIES(., vsx_unavailable)
219 * An interrupt came in while soft-disabled; clear EE in SRR1,
220 * clear paca->hard_enabled and return.
223 stb r10,PACAHARDIRQEN(r13)
225 ld r9,PACA_EXGEN+EX_R9(r13)
227 rldicl r10,r10,48,1 /* clear MSR_EE */
230 ld r10,PACA_EXGEN+EX_R10(r13)
236 do_stab_bolted_pSeries:
239 EXCEPTION_PROLOG_PSERIES(PACA_EXSLB, .do_stab_bolted)
241 #ifdef CONFIG_PPC_PSERIES
243 * Vectors for the FWNMI option. Share common code.
245 .globl system_reset_fwnmi
249 mtspr SPRN_SPRG1,r13 /* save r13 */
250 EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, system_reset_common)
252 .globl machine_check_fwnmi
256 mtspr SPRN_SPRG1,r13 /* save r13 */
257 EXCEPTION_PROLOG_PSERIES(PACA_EXMC, machine_check_common)
259 #endif /* CONFIG_PPC_PSERIES */
263 * This is used for when the SLB miss handler has to go virtual,
264 * which doesn't happen for now anymore but will once we re-implement
265 * dynamic VSIDs for shared page tables
267 slb_miss_user_pseries:
268 std r10,PACA_EXGEN+EX_R10(r13)
269 std r11,PACA_EXGEN+EX_R11(r13)
270 std r12,PACA_EXGEN+EX_R12(r13)
272 ld r11,PACA_EXSLB+EX_R9(r13)
273 ld r12,PACA_EXSLB+EX_R3(r13)
274 std r10,PACA_EXGEN+EX_R13(r13)
275 std r11,PACA_EXGEN+EX_R9(r13)
276 std r12,PACA_EXGEN+EX_R3(r13)
279 mfspr r11,SRR0 /* save SRR0 */
280 ori r12,r12,slb_miss_user_common@l /* virt addr of handler */
281 ori r10,r10,MSR_IR|MSR_DR|MSR_RI
283 mfspr r12,SRR1 /* and SRR1 */
286 b . /* prevent spec. execution */
287 #endif /* __DISABLED__ */
290 .globl __end_interrupts
294 * Code from here down to __end_handlers is invoked from the
295 * exception prologs above. Because the prologs assemble the
296 * addresses of these handlers using the LOAD_HANDLER macro,
297 * which uses an addi instruction, these handlers must be in
298 * the first 32k of the kernel image.
301 /*** Common interrupt handlers ***/
303 STD_EXCEPTION_COMMON(0x100, system_reset, .system_reset_exception)
306 * Machine check is different because we use a different
307 * save area: PACA_EXMC instead of PACA_EXGEN.
310 .globl machine_check_common
311 machine_check_common:
312 EXCEPTION_PROLOG_COMMON(0x200, PACA_EXMC)
316 addi r3,r1,STACK_FRAME_OVERHEAD
317 bl .machine_check_exception
320 STD_EXCEPTION_COMMON_LITE(0x900, decrementer, .timer_interrupt)
321 STD_EXCEPTION_COMMON(0xa00, trap_0a, .unknown_exception)
322 STD_EXCEPTION_COMMON(0xb00, trap_0b, .unknown_exception)
323 STD_EXCEPTION_COMMON(0xd00, single_step, .single_step_exception)
324 STD_EXCEPTION_COMMON(0xe00, trap_0e, .unknown_exception)
325 STD_EXCEPTION_COMMON_IDLE(0xf00, performance_monitor, .performance_monitor_exception)
326 STD_EXCEPTION_COMMON(0x1300, instruction_breakpoint, .instruction_breakpoint_exception)
327 #ifdef CONFIG_ALTIVEC
328 STD_EXCEPTION_COMMON(0x1700, altivec_assist, .altivec_assist_exception)
330 STD_EXCEPTION_COMMON(0x1700, altivec_assist, .unknown_exception)
332 #ifdef CONFIG_CBE_RAS
333 STD_EXCEPTION_COMMON(0x1200, cbe_system_error, .cbe_system_error_exception)
334 STD_EXCEPTION_COMMON(0x1600, cbe_maintenance, .cbe_maintenance_exception)
335 STD_EXCEPTION_COMMON(0x1800, cbe_thermal, .cbe_thermal_exception)
336 #endif /* CONFIG_CBE_RAS */
343 * Here we have detected that the kernel stack pointer is bad.
344 * R9 contains the saved CR, r13 points to the paca,
345 * r10 contains the (bad) kernel stack pointer,
346 * r11 and r12 contain the saved SRR0 and SRR1.
347 * We switch to using an emergency stack, save the registers there,
348 * and call kernel_bad_stack(), which panics.
351 ld r1,PACAEMERGSP(r13)
352 subi r1,r1,64+INT_FRAME_SIZE
373 lhz r12,PACA_TRAP_SAVE(r13)
375 addi r11,r1,INT_FRAME_SIZE
380 1: addi r3,r1,STACK_FRAME_OVERHEAD
385 * Here r13 points to the paca, r9 contains the saved CR,
386 * SRR0 and SRR1 are saved in r11 and r12,
387 * r9 - r13 are saved in paca->exgen.
390 .globl data_access_common
393 std r10,PACA_EXGEN+EX_DAR(r13)
395 stw r10,PACA_EXGEN+EX_DSISR(r13)
396 EXCEPTION_PROLOG_COMMON(0x300, PACA_EXGEN)
397 ld r3,PACA_EXGEN+EX_DAR(r13)
398 lwz r4,PACA_EXGEN+EX_DSISR(r13)
400 b .do_hash_page /* Try to handle as hpte fault */
403 .globl instruction_access_common
404 instruction_access_common:
405 EXCEPTION_PROLOG_COMMON(0x400, PACA_EXGEN)
409 b .do_hash_page /* Try to handle as hpte fault */
412 * Here is the common SLB miss user that is used when going to virtual
413 * mode for SLB misses, that is currently not used
417 .globl slb_miss_user_common
418 slb_miss_user_common:
420 std r3,PACA_EXGEN+EX_DAR(r13)
421 stw r9,PACA_EXGEN+EX_CCR(r13)
422 std r10,PACA_EXGEN+EX_LR(r13)
423 std r11,PACA_EXGEN+EX_SRR0(r13)
424 bl .slb_allocate_user
426 ld r10,PACA_EXGEN+EX_LR(r13)
427 ld r3,PACA_EXGEN+EX_R3(r13)
428 lwz r9,PACA_EXGEN+EX_CCR(r13)
429 ld r11,PACA_EXGEN+EX_SRR0(r13)
433 andi. r10,r12,MSR_RI /* check for unrecoverable exception */
434 beq- unrecov_user_slb
442 clrrdi r10,r10,2 /* clear RI before setting SRR0/1 */
448 ld r9,PACA_EXGEN+EX_R9(r13)
449 ld r10,PACA_EXGEN+EX_R10(r13)
450 ld r11,PACA_EXGEN+EX_R11(r13)
451 ld r12,PACA_EXGEN+EX_R12(r13)
452 ld r13,PACA_EXGEN+EX_R13(r13)
457 EXCEPTION_PROLOG_COMMON(0x380, PACA_EXGEN)
458 ld r4,PACA_EXGEN+EX_DAR(r13)
465 EXCEPTION_PROLOG_COMMON(0x4200, PACA_EXGEN)
468 1: addi r3,r1,STACK_FRAME_OVERHEAD
469 bl .unrecoverable_exception
472 #endif /* __DISABLED__ */
476 * r13 points to the PACA, r9 contains the saved CR,
477 * r12 contain the saved SRR1, SRR0 is still ready for return
478 * r3 has the faulting address
479 * r9 - r13 are saved in paca->exslb.
480 * r3 is saved in paca->slb_r3
481 * We assume we aren't going to take any exceptions during this procedure.
483 _GLOBAL(slb_miss_realmode)
485 #ifdef CONFIG_RELOCATABLE
489 stw r9,PACA_EXSLB+EX_CCR(r13) /* save CR in exc. frame */
490 std r10,PACA_EXSLB+EX_LR(r13) /* save LR */
492 bl .slb_allocate_realmode
494 /* All done -- return from exception. */
496 ld r10,PACA_EXSLB+EX_LR(r13)
497 ld r3,PACA_EXSLB+EX_R3(r13)
498 lwz r9,PACA_EXSLB+EX_CCR(r13) /* get saved CR */
499 #ifdef CONFIG_PPC_ISERIES
501 ld r11,PACALPPACAPTR(r13)
502 ld r11,LPPACASRR0(r11) /* get SRR0 value */
503 END_FW_FTR_SECTION_IFSET(FW_FEATURE_ISERIES)
504 #endif /* CONFIG_PPC_ISERIES */
508 andi. r10,r12,MSR_RI /* check for unrecoverable exception */
514 mtcrf 0x01,r9 /* slb_allocate uses cr0 and cr7 */
517 #ifdef CONFIG_PPC_ISERIES
521 END_FW_FTR_SECTION_IFSET(FW_FEATURE_ISERIES)
522 #endif /* CONFIG_PPC_ISERIES */
523 ld r9,PACA_EXSLB+EX_R9(r13)
524 ld r10,PACA_EXSLB+EX_R10(r13)
525 ld r11,PACA_EXSLB+EX_R11(r13)
526 ld r12,PACA_EXSLB+EX_R12(r13)
527 ld r13,PACA_EXSLB+EX_R13(r13)
529 b . /* prevent speculative execution */
532 #ifdef CONFIG_PPC_ISERIES
535 END_FW_FTR_SECTION_IFSET(FW_FEATURE_ISERIES)
536 #endif /* CONFIG_PPC_ISERIES */
538 ld r10,PACAKBASE(r13)
539 LOAD_HANDLER(r10,unrecov_slb)
547 EXCEPTION_PROLOG_COMMON(0x4100, PACA_EXSLB)
550 1: addi r3,r1,STACK_FRAME_OVERHEAD
551 bl .unrecoverable_exception
555 .globl hardware_interrupt_common
556 .globl hardware_interrupt_entry
557 hardware_interrupt_common:
558 EXCEPTION_PROLOG_COMMON(0x500, PACA_EXGEN)
560 hardware_interrupt_entry:
563 bl .ppc64_runlatch_on
564 END_FTR_SECTION_IFSET(CPU_FTR_CTRL)
565 addi r3,r1,STACK_FRAME_OVERHEAD
567 b .ret_from_except_lite
569 #ifdef CONFIG_PPC_970_NAP
572 std r9,TI_LOCAL_FLAGS(r11)
573 ld r10,_LINK(r1) /* make idle task do the */
574 std r10,_NIP(r1) /* equivalent of a blr */
579 .globl alignment_common
582 std r10,PACA_EXGEN+EX_DAR(r13)
584 stw r10,PACA_EXGEN+EX_DSISR(r13)
585 EXCEPTION_PROLOG_COMMON(0x600, PACA_EXGEN)
586 ld r3,PACA_EXGEN+EX_DAR(r13)
587 lwz r4,PACA_EXGEN+EX_DSISR(r13)
591 addi r3,r1,STACK_FRAME_OVERHEAD
593 bl .alignment_exception
597 .globl program_check_common
598 program_check_common:
599 EXCEPTION_PROLOG_COMMON(0x700, PACA_EXGEN)
601 addi r3,r1,STACK_FRAME_OVERHEAD
603 bl .program_check_exception
607 .globl fp_unavailable_common
608 fp_unavailable_common:
609 EXCEPTION_PROLOG_COMMON(0x800, PACA_EXGEN)
610 bne 1f /* if from user, just load it up */
612 addi r3,r1,STACK_FRAME_OVERHEAD
614 bl .kernel_fp_unavailable_exception
617 b fast_exception_return
620 .globl altivec_unavailable_common
621 altivec_unavailable_common:
622 EXCEPTION_PROLOG_COMMON(0xf20, PACA_EXGEN)
623 #ifdef CONFIG_ALTIVEC
627 b fast_exception_return
629 END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
632 addi r3,r1,STACK_FRAME_OVERHEAD
634 bl .altivec_unavailable_exception
638 .globl vsx_unavailable_common
639 vsx_unavailable_common:
640 EXCEPTION_PROLOG_COMMON(0xf40, PACA_EXGEN)
645 END_FTR_SECTION_IFSET(CPU_FTR_VSX)
648 addi r3,r1,STACK_FRAME_OVERHEAD
650 bl .vsx_unavailable_exception
654 .globl __end_handlers
658 * Return from an exception with minimal checks.
659 * The caller is assumed to have done EXCEPTION_PROLOG_COMMON.
660 * If interrupts have been enabled, or anything has been
661 * done that might have changed the scheduling status of
662 * any task or sent any task a signal, you should use
663 * ret_from_except or ret_from_except_lite instead of this.
665 fast_exc_return_irq: /* restores irq state too */
667 TRACE_AND_RESTORE_IRQ(r3);
669 rldicl r4,r12,49,63 /* get MSR_EE to LSB */
670 stb r4,PACAHARDIRQEN(r13) /* restore paca->hard_enabled */
673 .globl fast_exception_return
674 fast_exception_return:
677 andi. r3,r12,MSR_RI /* check if RI is set */
680 #ifdef CONFIG_VIRT_CPU_ACCOUNTING
683 ACCOUNT_CPU_USER_EXIT(r3, r4)
699 rldicl r10,r10,48,1 /* clear EE */
700 rldicr r10,r10,16,61 /* clear RI (LE is 0 already) */
708 b . /* prevent speculative execution */
712 1: addi r3,r1,STACK_FRAME_OVERHEAD
713 bl .unrecoverable_exception
721 _STATIC(do_hash_page)
725 andis. r0,r4,0xa450 /* weird error? */
726 bne- handle_page_fault /* if not, try to insert a HPTE */
728 andis. r0,r4,0x0020 /* Is it a segment table fault? */
729 bne- do_ste_alloc /* If so handle it */
730 END_FTR_SECTION_IFCLR(CPU_FTR_SLB)
733 * On iSeries, we soft-disable interrupts here, then
734 * hard-enable interrupts so that the hash_page code can spin on
735 * the hash_table_lock without problems on a shared processor.
740 * Currently, trace_hardirqs_off() will be called by DISABLE_INTS
741 * and will clobber volatile registers when irq tracing is enabled
742 * so we need to reload them. It may be possible to be smarter here
743 * and move the irq tracing elsewhere but let's keep it simple for
746 #ifdef CONFIG_TRACE_IRQFLAGS
752 #endif /* CONFIG_TRACE_IRQFLAGS */
754 * We need to set the _PAGE_USER bit if MSR_PR is set or if we are
755 * accessing a userspace segment (even from the kernel). We assume
756 * kernel addresses always have the high bit set.
758 rlwinm r4,r4,32-25+9,31-9,31-9 /* DSISR_STORE -> _PAGE_RW */
759 rotldi r0,r3,15 /* Move high bit into MSR_PR posn */
760 orc r0,r12,r0 /* MSR_PR | ~high_bit */
761 rlwimi r4,r0,32-13,30,30 /* becomes _PAGE_USER access bit */
762 ori r4,r4,1 /* add _PAGE_PRESENT */
763 rlwimi r4,r5,22+2,31-2,31-2 /* Set _PAGE_EXEC if trap is 0x400 */
766 * r3 contains the faulting address
767 * r4 contains the required access permissions
768 * r5 contains the trap number
770 * at return r3 = 0 for success
772 bl .hash_page /* build HPTE if possible */
773 cmpdi r3,0 /* see if hash_page succeeded */
777 * If we had interrupts soft-enabled at the point where the
778 * DSI/ISI occurred, and an interrupt came in during hash_page,
780 * We jump to ret_from_except_lite rather than fast_exception_return
781 * because ret_from_except_lite will check for and handle pending
782 * interrupts if necessary.
785 END_FW_FTR_SECTION_IFSET(FW_FEATURE_ISERIES)
789 * Here we have interrupts hard-disabled, so it is sufficient
790 * to restore paca->{soft,hard}_enable and get out.
792 beq fast_exc_return_irq /* Return from exception on success */
793 END_FW_FTR_SECTION_IFCLR(FW_FEATURE_ISERIES)
795 /* For a hash failure, we don't bother re-enabling interrupts */
799 * hash_page couldn't handle it, set soft interrupt enable back
800 * to what it was before the trap. Note that .raw_local_irq_restore
801 * handles any interrupts pending at this point.
804 TRACE_AND_RESTORE_IRQ_PARTIAL(r3, 11f)
805 bl .raw_local_irq_restore
808 /* Here we have a page fault that hash_page can't handle. */
813 addi r3,r1,STACK_FRAME_OVERHEAD
819 addi r3,r1,STACK_FRAME_OVERHEAD
824 13: b .ret_from_except_lite
826 /* We have a page fault that hash_page could handle but HV refused
831 addi r3,r1,STACK_FRAME_OVERHEAD
836 /* here we have a segment miss */
838 bl .ste_allocate /* try to insert stab entry */
840 bne- handle_page_fault
841 b fast_exception_return
844 * r13 points to the PACA, r9 contains the saved CR,
845 * r11 and r12 contain the saved SRR0 and SRR1.
846 * r9 - r13 are saved in paca->exslb.
847 * We assume we aren't going to take any exceptions during this procedure.
848 * We assume (DAR >> 60) == 0xc.
851 _GLOBAL(do_stab_bolted)
852 stw r9,PACA_EXSLB+EX_CCR(r13) /* save CR in exc. frame */
853 std r11,PACA_EXSLB+EX_SRR0(r13) /* save SRR0 in exc. frame */
855 /* Hash to the primary group */
856 ld r10,PACASTABVIRT(r13)
859 rldimi r10,r11,7,52 /* r10 = first ste of the group */
862 /* This is a kernel address, so protovsid = ESID */
863 ASM_VSID_SCRAMBLE(r11, r9, 256M)
864 rldic r9,r11,12,16 /* r9 = vsid << 12 */
866 /* Search the primary group for a free entry */
867 1: ld r11,0(r10) /* Test valid bit of the current ste */
874 /* Stick for only searching the primary group for now. */
875 /* At least for now, we use a very simple random castout scheme */
876 /* Use the TB as a random number ; OR in 1 to avoid entry 0 */
878 rldic r11,r11,4,57 /* r11 = (r11 << 4) & 0x70 */
881 /* r10 currently points to an ste one past the group of interest */
882 /* make it point to the randomly selected entry */
884 or r10,r10,r11 /* r10 is the entry to invalidate */
886 isync /* mark the entry invalid */
888 rldicl r11,r11,56,1 /* clear the valid bit */
893 clrrdi r11,r11,28 /* Get the esid part of the ste */
896 2: std r9,8(r10) /* Store the vsid part of the ste */
899 mfspr r11,SPRN_DAR /* Get the new esid */
900 clrrdi r11,r11,28 /* Permits a full 32b of ESID */
901 ori r11,r11,0x90 /* Turn on valid and kp */
902 std r11,0(r10) /* Put new entry back into the stab */
906 /* All done -- return from exception. */
907 lwz r9,PACA_EXSLB+EX_CCR(r13) /* get saved CR */
908 ld r11,PACA_EXSLB+EX_SRR0(r13) /* get saved SRR0 */
913 mtcrf 0x80,r9 /* restore CR */
921 ld r9,PACA_EXSLB+EX_R9(r13)
922 ld r10,PACA_EXSLB+EX_R10(r13)
923 ld r11,PACA_EXSLB+EX_R11(r13)
924 ld r12,PACA_EXSLB+EX_R12(r13)
925 ld r13,PACA_EXSLB+EX_R13(r13)
927 b . /* prevent speculative execution */
930 * Space for CPU0's segment table.
932 * On iSeries, the hypervisor must fill in at least one entry before
933 * we get control (with relocate on). The address is given to the hv
934 * as a page number (see xLparMap below), so this must be at a
935 * fixed address (the linker can't compute (u64)&initial_stab >>
938 . = STAB0_OFFSET /* 0x6000 */
943 #ifdef CONFIG_PPC_PSERIES
945 * Data area reserved for FWNMI option.
946 * This address (0x7000) is fixed by the RPA.
949 .globl fwnmi_data_area
951 #endif /* CONFIG_PPC_PSERIES */
953 /* iSeries does not use the FWNMI stuff, so it is safe to put
954 * this here, even if we later allow kernels that will boot on
955 * both pSeries and iSeries */
956 #ifdef CONFIG_PPC_ISERIES
960 .quad HvEsidsToMap /* xNumberEsids */
961 .quad HvRangesToMap /* xNumberRanges */
962 .quad STAB0_PAGE /* xSegmentTableOffs */
964 /* xEsids (HvEsidsToMap entries of 2 quads) */
965 .quad PAGE_OFFSET_ESID /* xKernelEsid */
966 .quad PAGE_OFFSET_VSID /* xKernelVsid */
967 .quad VMALLOC_START_ESID /* xKernelEsid */
968 .quad VMALLOC_START_VSID /* xKernelVsid */
969 /* xRanges (HvRangesToMap entries of 3 quads) */
970 .quad HvPagesToMap /* xPages */
971 .quad 0 /* xOffset */
972 .quad PAGE_OFFSET_VSID << (SID_SHIFT - HW_PAGE_SHIFT) /* xVPN */
974 #endif /* CONFIG_PPC_ISERIES */
976 #ifdef CONFIG_PPC_PSERIES
978 #endif /* CONFIG_PPC_PSERIES */