[Skiboot] [PATCH] hmi: Clear unknown debug trigger

Michael Neuling mikey at neuling.org
Fri May 4 14:06:41 AEST 2018


From: Ryan Grimm <grimm at linux.vnet.ibm.com>

On some systems, seeing hangs like this when Linux starts:
  [ 170.027252763,5] OCC: All Chip Rdy after 0 ms
  [ 170.062930145,5] INIT: Starting kernel at 0x20011000, fdt at 0x30ae0530 366247 bytes)
  [ 171.238270428,5] OPAL: Switch to little-endian OS

If you look at the in memory skiboot console (or do 'nvram -p
ibm,skiboot --update-config log-level-driver=7') we see the console get
spammed with:
  [ 5209.109790675,7] HMI: Received HMI interrupt: HMER = 0x0000400000000000
  [ 5209.109792716,7] HMI: Received HMI interrupt: HMER = 0x0000400000000000
  [ 5209.109794695,7] HMI: Received HMI interrupt: HMER = 0x0000400000000000
  [ 5209.109796689,7] HMI: Received HMI interrupt: HMER = 0x0000400000000000

We're taking the debug trigger (bit 17) early on, before the
hmi_debug_trigger function in the kernel is set up.

This clears the HMI in Skiboot and reports to the kernel instead of
bringing down the machine.

Signed-off-by: Ryan Grimm <grimm at linux.vnet.ibm.com>
Signed-off-by: Michael Neuling <mikey at neuling.org>
---
 core/hmi.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/core/hmi.c b/core/hmi.c
index bd0fc13b80..9e80c54f47 100644
--- a/core/hmi.c
+++ b/core/hmi.c
@@ -1258,6 +1258,16 @@ static int handle_hmi_exception(uint64_t hmer, struct OpalHMIEvent *hmi_evt,
 			queue_hmi_event(hmi_evt, recover, out_flags);
 		}
 	}
+	if (hmer & SPR_HMER_TRIG_FIR_HMI) {
+		hmer &= ~SPR_HMER_TRIG_FIR_HMI;
+
+		hmi_print_debug("Clearing unknown debug trigger", hmer);
+		if (hmi_evt) {
+			hmi_evt->severity = OpalHMI_SEV_NO_ERROR;
+			hmi_evt->type = OpalHMI_ERROR_DEBUG_TRIG_FIR,
+				queue_hmi_event(hmi_evt, recover, out_flags);
+		}
+	}
 
 	if (recover == 0)
 		disable_fast_reboot("Unrecoverable HMI");
-- 
2.14.1



More information about the Skiboot mailing list