diff options
author | Andrew Donnellan <andrew.donnellan@au1.ibm.com> | 2017-03-01 10:58:17 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-03-16 17:17:32 +1100 |
commit | 9ffc890d500ed553c0053fb56f97803696fc9f4d (patch) | |
tree | 5e19caca2975b6b9a54519b3a985daa257695276 /core/hmi.c | |
parent | b2dc494a4950927cdda5f009e1a482aabcb25afa (diff) | |
download | skiboot-9ffc890d500ed553c0053fb56f97803696fc9f4d.zip skiboot-9ffc890d500ed553c0053fb56f97803696fc9f4d.tar.gz skiboot-9ffc890d500ed553c0053fb56f97803696fc9f4d.tar.bz2 |
hmi: Print CAPP FIR information when handling CAPP malfunction alerts
When diagnosing or debugging CAPP errors, it's rather useful to have the
CAPP FIR, which often provides very helpful information.
Print the CAPP FIR to the log when we handle a Malfunction Alert HMI for a
CAPP error.
Cc: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Reviewed-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'core/hmi.c')
-rw-r--r-- | core/hmi.c | 29 |
1 files changed, 29 insertions, 0 deletions
@@ -25,6 +25,7 @@ #include <chip.h> #include <npu-regs.h> #include <npu.h> +#include <capp.h> /* * HMER register layout: @@ -387,8 +388,36 @@ static void find_capp_checkstop_reason(int flat_chip_id, int capp_index; struct proc_chip *chip = get_chip(flat_chip_id); int capp_num = CHIP_IS_NAPLES(chip) ? 2 : 1; + uint32_t reg_offset; + uint64_t capp_fir; + uint64_t capp_fir_mask; + uint64_t capp_fir_action0; + uint64_t capp_fir_action1; for (capp_index = 0; capp_index < capp_num; capp_index++) { + reg_offset = capp_index ? CAPP1_REG_OFFSET : 0x0; + + if (xscom_read(flat_chip_id, + CAPP_FIR + reg_offset, &capp_fir) || + xscom_read(flat_chip_id, + CAPP_FIR_MASK + reg_offset, &capp_fir_mask) || + xscom_read(flat_chip_id, + CAPP_FIR_ACTION0 + reg_offset, &capp_fir_action0) || + xscom_read(flat_chip_id, + CAPP_FIR_ACTION1 + reg_offset, &capp_fir_action1)) { + prerror("CAPP: Couldn't read CAPP#%d FIR registers by XSCOM!\n", + capp_index); + continue; + } + + if (!(capp_fir & ~capp_fir_mask)) + continue; + + prlog(PR_DEBUG, "HMI: CAPP#%d: FIR 0x%016llx mask 0x%016llx\n", + capp_index, capp_fir, capp_fir_mask); + prlog(PR_DEBUG, "HMI: CAPP#%d: ACTION0 0x%016llx, ACTION1 0x%016llx\n", + capp_index, capp_fir_action0, capp_fir_action1); + if (is_capp_recoverable(flat_chip_id, capp_index)) { if (handle_capp_recoverable(flat_chip_id, capp_index)) { hmi_evt->severity = OpalHMI_SEV_NO_ERROR; |