From eddff9bf40cfbd6e2ac36012607173e6e299267a Mon Sep 17 00:00:00 2001 From: Ryan Grimm Date: Fri, 4 May 2018 14:06:41 +1000 Subject: hmi: Clear unknown debug trigger 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 Signed-off-by: Michael Neuling Reviewed-by: Mahesh Salgaonkar Signed-off-by: Stewart Smith --- core/hmi.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'core/hmi.c') diff --git a/core/hmi.c b/core/hmi.c index 9dbc473..530371e 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"); -- cgit v1.1