aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/exceptions-64s.S
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-09-19 13:45:04 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-09-20 02:10:03 -0400
commited79ba9e15f84cef05aba5cbfe6e93f9b43c31f4 (patch)
tree7df9a2dc61e5c43e426562adc4367cb7e32380a0 /arch/powerpc/kernel/exceptions-64s.S
parenta125e0928c736bc50cdd9a13151d4f4ee7821266 (diff)
powerpc/powernv: Machine check and other system interrupts
OPAL can handle various interrupt for us such as Machine Checks (it performs all sorts of recovery tasks and passes back control to us with informations about the error), Hardware Management Interrupts and Softpatch interrupts. This wires up the mechanisms and prints out specific informations returned by HAL when a machine check occurs. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/exceptions-64s.S')
-rw-r--r--arch/powerpc/kernel/exceptions-64s.S27
1 files changed, 23 insertions, 4 deletions
diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S
index 41b02c792aa..d51458fa8de 100644
--- a/arch/powerpc/kernel/exceptions-64s.S
+++ b/arch/powerpc/kernel/exceptions-64s.S
@@ -1143,7 +1143,7 @@ _GLOBAL(do_stab_bolted)
1143 rfid 1143 rfid
1144 b . /* prevent speculative execution */ 1144 b . /* prevent speculative execution */
1145 1145
1146#ifdef CONFIG_PPC_PSERIES 1146#if defined(CONFIG_PPC_PSERIES) || defined(CONFIG_PPC_POWERNV)
1147/* 1147/*
1148 * Data area reserved for FWNMI option. 1148 * Data area reserved for FWNMI option.
1149 * This address (0x7000) is fixed by the RPA. 1149 * This address (0x7000) is fixed by the RPA.
@@ -1151,7 +1151,7 @@ _GLOBAL(do_stab_bolted)
1151 .= 0x7000 1151 .= 0x7000
1152 .globl fwnmi_data_area 1152 .globl fwnmi_data_area
1153fwnmi_data_area: 1153fwnmi_data_area:
1154#endif /* CONFIG_PPC_PSERIES */ 1154#endif /* defined(CONFIG_PPC_PSERIES) || defined(CONFIG_PPC_POWERNV) */
1155 1155
1156 /* iSeries does not use the FWNMI stuff, so it is safe to put 1156 /* iSeries does not use the FWNMI stuff, so it is safe to put
1157 * this here, even if we later allow kernels that will boot on 1157 * this here, even if we later allow kernels that will boot on
@@ -1176,9 +1176,12 @@ xLparMap:
1176 1176
1177#endif /* CONFIG_PPC_ISERIES */ 1177#endif /* CONFIG_PPC_ISERIES */
1178 1178
1179#ifdef CONFIG_PPC_PSERIES 1179#if defined(CONFIG_PPC_PSERIES) || defined(CONFIG_PPC_POWERNV)
1180 /* pseries and powernv need to keep the whole page from
1181 * 0x7000 to 0x8000 free for use by the firmware
1182 */
1180 . = 0x8000 1183 . = 0x8000
1181#endif /* CONFIG_PPC_PSERIES */ 1184#endif /* defined(CONFIG_PPC_PSERIES) || defined(CONFIG_PPC_POWERNV) */
1182 1185
1183/* 1186/*
1184 * Space for CPU0's segment table. 1187 * Space for CPU0's segment table.
@@ -1193,3 +1196,19 @@ xLparMap:
1193 .globl initial_stab 1196 .globl initial_stab
1194initial_stab: 1197initial_stab:
1195 .space 4096 1198 .space 4096
1199#ifdef CONFIG_PPC_POWERNV
1200_GLOBAL(opal_mc_secondary_handler)
1201 HMT_MEDIUM
1202 SET_SCRATCH0(r13)
1203 GET_PACA(r13)
1204 clrldi r3,r3,2
1205 tovirt(r3,r3)
1206 std r3,PACA_OPAL_MC_EVT(r13)
1207 ld r13,OPAL_MC_SRR0(r3)
1208 mtspr SPRN_SRR0,r13
1209 ld r13,OPAL_MC_SRR1(r3)
1210 mtspr SPRN_SRR1,r13
1211 ld r3,OPAL_MC_GPR3(r3)
1212 GET_SCRATCH0(r13)
1213 b machine_check_pSeries
1214#endif /* CONFIG_PPC_POWERNV */