- STD_EXCEPTION_PSERIES( 0x100, SystemReset )
- STD_EXCEPTION_PSERIES( 0x200, MachineCheck )
- STD_EXCEPTION_PSERIES( 0x300, DataAccess )
- STD_EXCEPTION_PSERIES( 0x380, DataAccessSLB )
- STD_EXCEPTION_PSERIES( 0x400, InstructionAccess )
- STD_EXCEPTION_PSERIES( 0x480, InstructionAccessSLB )
- STD_EXCEPTION_PSERIES( 0x500, HardwareInterrupt )
- STD_EXCEPTION_PSERIES( 0x600, Alignment )
- STD_EXCEPTION_PSERIES( 0x700, ProgramCheck )
- STD_EXCEPTION_PSERIES( 0x800, FPUnavailable )
- STD_EXCEPTION_PSERIES( 0x900, Decrementer )
- STD_EXCEPTION_PSERIES( 0xa00, Trap_0a )
- STD_EXCEPTION_PSERIES( 0xb00, Trap_0b )
- STD_EXCEPTION_PSERIES( 0xc00, SystemCall )
- STD_EXCEPTION_PSERIES( 0xd00, SingleStep )
- STD_EXCEPTION_PSERIES( 0xe00, Trap_0e )
+ STD_EXCEPTION_PSERIES(0x100, SystemReset)
+
+ . = 0x200
+_MachineCheckPseries:
+ HMT_MEDIUM
+ mtspr SPRG1,r13 /* save r13 */
+ EXCEPTION_PROLOG_PSERIES(PACA_EXMC, MachineCheck_common)
+
+ . = 0x300
+ .globl DataAccess_Pseries
+DataAccess_Pseries:
+ HMT_MEDIUM
+ mtspr SPRG1,r13
+BEGIN_FTR_SECTION
+ mtspr SPRG2,r12
+ mfspr r13,DAR
+ mfspr r12,DSISR
+ srdi r13,r13,60
+ rlwimi r13,r12,16,0x20
+ mfcr r12
+ cmpwi r13,0x2c
+ beq .do_stab_bolted_Pseries
+ mtcrf 0x80,r12
+ mfspr r12,SPRG2
+END_FTR_SECTION_IFCLR(CPU_FTR_SLB)
+ EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, DataAccess_common)
+
+ . = 0x380
+ .globl DataAccessSLB_Pseries
+DataAccessSLB_Pseries:
+ HMT_MEDIUM
+ mtspr SPRG1,r13
+ mfspr r13,SPRG3 /* get paca address into r13 */
+ std r9,PACA_EXSLB+EX_R9(r13) /* save r9 - r12 */
+ std r10,PACA_EXSLB+EX_R10(r13)
+ std r11,PACA_EXSLB+EX_R11(r13)
+ std r12,PACA_EXSLB+EX_R12(r13)
+ std r3,PACA_EXSLB+EX_R3(r13)
+ mfspr r9,SPRG1
+ std r9,PACA_EXSLB+EX_R13(r13)
+ mfcr r9
+ mfspr r12,SRR1 /* and SRR1 */
+ mfspr r3,DAR
+ b .do_slb_miss /* Rel. branch works in real mode */
+
+ STD_EXCEPTION_PSERIES(0x400, InstructionAccess)
+
+ . = 0x480
+ .globl InstructionAccessSLB_Pseries
+InstructionAccessSLB_Pseries:
+ HMT_MEDIUM
+ mtspr SPRG1,r13
+ mfspr r13,SPRG3 /* get paca address into r13 */
+ std r9,PACA_EXSLB+EX_R9(r13) /* save r9 - r12 */
+ std r10,PACA_EXSLB+EX_R10(r13)
+ std r11,PACA_EXSLB+EX_R11(r13)
+ std r12,PACA_EXSLB+EX_R12(r13)
+ std r3,PACA_EXSLB+EX_R3(r13)
+ mfspr r9,SPRG1
+ std r9,PACA_EXSLB+EX_R13(r13)
+ mfcr r9
+ mfspr r12,SRR1 /* and SRR1 */
+ mfspr r3,SRR0 /* SRR0 is faulting address */
+ b .do_slb_miss /* Rel. branch works in real mode */
+
+ STD_EXCEPTION_PSERIES(0x500, HardwareInterrupt)
+ STD_EXCEPTION_PSERIES(0x600, Alignment)
+ STD_EXCEPTION_PSERIES(0x700, ProgramCheck)
+ STD_EXCEPTION_PSERIES(0x800, FPUnavailable)
+ STD_EXCEPTION_PSERIES(0x900, Decrementer)
+ STD_EXCEPTION_PSERIES(0xa00, Trap_0a)
+ STD_EXCEPTION_PSERIES(0xb00, Trap_0b)
+
+ . = 0xc00
+ .globl SystemCall_Pseries
+SystemCall_Pseries:
+ HMT_MEDIUM
+ mr r9,r13
+ mfmsr r10
+ mfspr r13,SPRG3
+ mfspr r11,SRR0
+ clrrdi r12,r13,32
+ oris r12,r12,SystemCall_common@h
+ ori r12,r12,SystemCall_common@l
+ mtspr SRR0,r12
+ ori r10,r10,MSR_IR|MSR_DR|MSR_RI
+ mfspr r12,SRR1
+ mtspr SRR1,r10
+ rfid
+ b . /* prevent speculative execution */
+
+ STD_EXCEPTION_PSERIES(0xd00, SingleStep)
+ STD_EXCEPTION_PSERIES(0xe00, Trap_0e)