diff options
author | Balbir Singh <bsingharora@gmail.com> | 2018-05-15 16:25:41 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.ibm.com> | 2018-05-15 17:51:48 -0500 |
commit | 7bcbc78cea5540597fdbe496fee53e69c5c61f2f (patch) | |
tree | b4d8bd2eaff72cbd460292ac04dbc96b75ca2dee /core | |
parent | 7519644443707e972fed836853dd92031efcb858 (diff) | |
download | skiboot-7bcbc78cea5540597fdbe496fee53e69c5c61f2f.zip skiboot-7bcbc78cea5540597fdbe496fee53e69c5c61f2f.tar.gz skiboot-7bcbc78cea5540597fdbe496fee53e69c5c61f2f.tar.bz2 |
Add location code to NPU2 HMI logging
The current HMI error message does not specifiy where the HMI
error occured.
The original error message was
NPU: FIR#0 FIR 0x0080100000000000 mask 0x009a48180f01ffff
The enhanced error message is
NPU2: [Loc: UOPWR.0000000-Node0-Proc0] P:0 FIR#0 FIR 0x0000100000000000 mask 0x009a48180f03ffff
Signed-off-by: Balbir Singh <bsingharora@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'core')
-rw-r--r-- | core/hmi.c | 22 |
1 files changed, 14 insertions, 8 deletions
@@ -28,6 +28,7 @@ #include <chip.h> #include <npu-regs.h> #include <npu2-regs.h> +#include <npu2.h> #include <npu.h> #include <capp.h> #include <nvram.h> @@ -621,7 +622,8 @@ static uint32_t npu2_scom_dump[] = { 0x00 }; -static void dump_scoms(int flat_chip_id, const char *unit, uint32_t *scoms) +static void dump_scoms(int flat_chip_id, const char *unit, uint32_t *scoms, + const char *loc) { uint64_t value; int r; @@ -631,8 +633,8 @@ static void dump_scoms(int flat_chip_id, const char *unit, uint32_t *scoms) r = _xscom_read(flat_chip_id, *scoms, &value, false); if (r != OPAL_SUCCESS) continue; - prlog(PR_ERR, "%s: 0x%08x=0x%016llx\n", - unit, *scoms, value); + prlog(PR_ERR, "%s: [Loc: %s] P:%d 0x%08x=0x%016llx\n", + unit, loc, this_cpu()->chip_id, *scoms, value); scoms++; } } @@ -655,6 +657,7 @@ static void find_npu2_checkstop_reason(int flat_chip_id, uint64_t npu2_fir_action1_addr; uint64_t fatal_errors; int total_errors = 0; + const char *loc; /* Find the NPU on the chip associated with the HMI. */ for_each_phb(phb) { @@ -688,10 +691,13 @@ static void find_npu2_checkstop_reason(int flat_chip_id, fatal_errors = npu2_fir & ~npu2_fir_mask & npu2_fir_action0 & npu2_fir_action1; if (fatal_errors) { - prlog(PR_ERR, "NPU: FIR#%d FIR 0x%016llx mask 0x%016llx\n", - i, npu2_fir, npu2_fir_mask); - prlog(PR_ERR, "NPU: ACTION0 0x%016llx, ACTION1 0x%016llx\n", - npu2_fir_action0, npu2_fir_action1); + loc = chip_loc_code(this_cpu()->chip_id); + if (!loc) + loc = "Not Available"; + prlog(PR_ERR, "NPU2: [Loc: %s] P:%d FIR#%d FIR 0x%016llx mask 0x%016llx\n", + loc, this_cpu()->chip_id, i, npu2_fir, npu2_fir_mask); + prlog(PR_ERR, "NPU2: [Loc: %s] P:%d ACTION0 0x%016llx, ACTION1 0x%016llx\n", + loc, this_cpu()->chip_id, npu2_fir_action0, npu2_fir_action1); total_errors++; } @@ -712,7 +718,7 @@ static void find_npu2_checkstop_reason(int flat_chip_id, if (npu2_hmi_verbose) { _xscom_lock(); - dump_scoms(flat_chip_id, "NPU2", npu2_scom_dump); + dump_scoms(flat_chip_id, "NPU2", npu2_scom_dump, loc); _xscom_unlock(); prlog(PR_ERR, " _________________________ \n"); prlog(PR_ERR, "< It's Driver Debug time! >\n"); |