summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtem Senichev <a.senichev@yadro.com>2019-11-20 18:10:02 +0300
committerDaniel M Crowell <dcrowell@us.ibm.com>2019-12-16 13:32:07 -0600
commitb47fb59838e42c091316e1c77a51688c99c81f27 (patch)
tree0bc0ee4ee001d3e4a630bafe2621bc8921469e08
parent70ef787002a78ebbe6430a5f3355d42a8b1790b9 (diff)
downloadtalos-hostboot-b47fb59838e42c091316e1c77a51688c99c81f27.tar.gz
talos-hostboot-b47fb59838e42c091316e1c77a51688c99c81f27.zip
Replace descriptions with JEDEC register names
For some NVDIMM errors, Hostboot generates a PEL record, that contains a dump of NVDIMM controller registers. The values of these registers can be decoded and analyzed using the JEDEC specification JESD245, but it is difficult to do without standard register names. This changes replaces human readable descriptions with JEDEC specific names in the errl plugin implementation. Signed-off-by: Artem Senichev <a.senichev@yadro.com> Resolves #189 Change-Id: If7190772485530514e3ba21f48a04143de5a08d7 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/87583 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Corey V Swenson <cswenson@us.ibm.com> Reviewed-by: Roland Veloz <rveloz@us.ibm.com> Reviewed-by: Daniel M Crowell <dcrowell@us.ibm.com>
-rw-r--r--src/usr/isteps/nvdimm/plugins/errludP_nvdimm.H127
1 files changed, 39 insertions, 88 deletions
diff --git a/src/usr/isteps/nvdimm/plugins/errludP_nvdimm.H b/src/usr/isteps/nvdimm/plugins/errludP_nvdimm.H
index 76bc8ecac..fdd94e01d 100644
--- a/src/usr/isteps/nvdimm/plugins/errludP_nvdimm.H
+++ b/src/usr/isteps/nvdimm/plugins/errludP_nvdimm.H
@@ -7,6 +7,7 @@
/* */
/* Contributors Listed Below - COPYRIGHT 2014,2019 */
/* [+] International Business Machines Corp. */
+/* [+] YADRO */
/* */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
@@ -195,96 +196,46 @@ public:
void * i_pBuffer,
const uint32_t i_buflen) const
{
- char* l_databuf = static_cast<char*>(i_pBuffer);
+ const uint8_t* l_databuf = static_cast<const uint8_t*>(i_pBuffer);
i_parser.PrintHeading("NVDIMM I2C Register Traces");
- //***** Memory Layout *****
- // 1 byte : MODULE_HEALTH
- // 1 byte : MODULE_HEALTH_STATUS0
- // 1 byte : MODULE_HEALTH_STATUS1
- // 1 byte : CSAVE_STATUS
- // 1 byte : CSAVE_INFO
- // 1 byte : CSAVE_FAIL_INFO0
- // 1 byte : CSAVE_FAIL_INFO1
- // 1 byte : CSAVE_TIMEOUT_INFO0
- // 1 byte : CSAVE_TIMEOUT_INFO1
- // 1 byte : ERROR_THRESHOLD_STATUS
- // 1 byte : NVDIMM_READY
- // 1 byte : NVDIMM_CMD_STATUS0
- // 1 byte : ERASE_STATUS
- // 1 byte : ERASE_FAIL_INFO
- // 1 byte : ERASE_TIMEOUT0
- // 1 byte : ERASE_TIMEOUT1
- // 1 byte : ABORT_CMD_TIMEOUT
- // 1 byte : SET_ES_POLICY_STATUS
- // 1 byte : RESTORE_STATUS
- // 1 byte : RESTORE_FAIL_INFO
- // 1 byte : RESTORE_TIMEOUT0
- // 1 byte : RESTORE_TIMEOUT1
- // 1 byte : ARM_STATUS
- // 1 byte : ARM_FAIL_INFO
- // 1 byte : ARM_TIMEOUT0
- // 1 byte : ARM_TIMEOUT1
- // 1 byte : SET_EVENT_NOTIFICATION_STATUS
- // 1 byte : ENCRYPTION_CONFIG_STATUS
- //
-
- i_parser.PrintNumber("Module Health Register: ","%.2lX",TO_UINT8(l_databuf));
- ++l_databuf;
- i_parser.PrintNumber("Module Health Status0 Register: ","%.2lX",TO_UINT8(l_databuf));
- ++l_databuf;
- i_parser.PrintNumber("Module Health Status1 Register: ","%.2lX",TO_UINT8(l_databuf));
- ++l_databuf;
- i_parser.PrintNumber("CSave Status Register: ","%.2lX",TO_UINT8(l_databuf));
- ++l_databuf;
- i_parser.PrintNumber("CSave Info Register: ","%.2lX",TO_UINT8(l_databuf));
- ++l_databuf;
- i_parser.PrintNumber("CSave Fail Info0 Register: ","%.2lX",TO_UINT8(l_databuf));
- ++l_databuf;
- i_parser.PrintNumber("CSave Fail Info1 Register: ","%.2lX",TO_UINT8(l_databuf));
- ++l_databuf;
- i_parser.PrintNumber("CSave Timeout Info0 Register: ","%.2lX",TO_UINT8(l_databuf));
- ++l_databuf;
- i_parser.PrintNumber("CSave Timeout Info1 Register: ","%.2lX",TO_UINT8(l_databuf));
- ++l_databuf;
- i_parser.PrintNumber("Error Threshold Status Register: ","%.2lX",TO_UINT8(l_databuf));
- ++l_databuf;
- i_parser.PrintNumber("NVDIMM Ready Register: ","%.2lX",TO_UINT8(l_databuf));
- ++l_databuf;
- i_parser.PrintNumber("NVDIMM CMD Status0 Register: ","%.2lX",TO_UINT8(l_databuf));
- ++l_databuf;
- i_parser.PrintNumber("Erase Status Register: ","%.2lX",TO_UINT8(l_databuf));
- ++l_databuf;
- i_parser.PrintNumber("Erase Fail Info Register: ","%.2lX",TO_UINT8(l_databuf));
- ++l_databuf;
- i_parser.PrintNumber("Erase Timeout0 Register: ","%.2lX",TO_UINT8(l_databuf));
- ++l_databuf;
- i_parser.PrintNumber("Erase Timeout1 Register: ","%.2lX",TO_UINT8(l_databuf));
- ++l_databuf;
- i_parser.PrintNumber("Abort CMD Timeout Register: ","%.2lX",TO_UINT8(l_databuf));
- ++l_databuf;
- i_parser.PrintNumber("Set ES Policy Status Register: ","%.2lX",TO_UINT8(l_databuf));
- ++l_databuf;
- i_parser.PrintNumber("Restore Status Register: ","%.2lX",TO_UINT8(l_databuf));
- ++l_databuf;
- i_parser.PrintNumber("Restore Fail Info0 Register: ","%.2lX",TO_UINT8(l_databuf));
- ++l_databuf;
- i_parser.PrintNumber("Restore Timeout0 Register: ","%.2lX",TO_UINT8(l_databuf));
- ++l_databuf;
- i_parser.PrintNumber("Restore Timeout1 Register: ","%.2lX",TO_UINT8(l_databuf));
- ++l_databuf;
- i_parser.PrintNumber("Arm Status Register: ","%.2lX",TO_UINT8(l_databuf));
- ++l_databuf;
- i_parser.PrintNumber("Arm Fail Info Register: ","%.2lX",TO_UINT8(l_databuf));
- ++l_databuf;
- i_parser.PrintNumber("Arm Timeout0 Register: ","%.2lX",TO_UINT8(l_databuf));
- ++l_databuf;
- i_parser.PrintNumber("Arm Timeout1 Register: ","%.2lX",TO_UINT8(l_databuf));
- ++l_databuf;
- i_parser.PrintNumber("Set Event Notification Status Register: ","%.2lX",TO_UINT8(l_databuf));
- ++l_databuf;
- i_parser.PrintNumber("NVDIMM Encryption Configuration and Status Register: ","%.2lX",TO_UINT8(l_databuf));
- ++l_databuf;
+ // Memory Layout (1 byte each)
+ static const char* l_registers[] = {
+ "MODULE_HEALTH",
+ "MODULE_HEALTH_STATUS0",
+ "MODULE_HEALTH_STATUS1",
+ "CSAVE_STATUS",
+ "CSAVE_INFO",
+ "CSAVE_FAIL_INFO0",
+ "CSAVE_FAIL_INFO1",
+ "CSAVE_TIMEOUT_INFO0",
+ "CSAVE_TIMEOUT_INFO1",
+ "ERROR_THRESHOLD_STATUS",
+ "NVDIMM_READY",
+ "NVDIMM_CMD_STATUS0",
+ "ERASE_STATUS",
+ "ERASE_FAIL_INFO",
+ "ERASE_TIMEOUT0",
+ "ERASE_TIMEOUT1",
+ "ABORT_CMD_TIMEOUT",
+ "SET_ES_POLICY_STATUS",
+ "RESTORE_STATUS",
+ "RESTORE_FAIL_INFO",
+ "RESTORE_TIMEOUT0",
+ "RESTORE_TIMEOUT1",
+ "ARM_STATUS",
+ "ARM_FAIL_INFO",
+ "ARM_TIMEOUT0",
+ "ARM_TIMEOUT1",
+ "SET_EVENT_NOTIFICATION_STATUS",
+ "ENCRYPTION_CONFIG_STATUS"
+ };
+
+ for (uint32_t i = 0; i < i_buflen &&
+ i < sizeof(l_registers) / sizeof(l_registers[0]); ++i)
+ {
+ i_parser.PrintNumber(l_registers[i], "%02X", l_databuf[i]);
+ }
}
// Disabled
OpenPOWER on IntegriCloud