diff options
| author | Dan Crowell <dcrowell@us.ibm.com> | 2019-08-21 08:56:13 -0500 |
|---|---|---|
| committer | Daniel M Crowell <dcrowell@us.ibm.com> | 2019-08-22 08:32:00 -0500 |
| commit | 6d14af625c19ba9b9e8783627a8ec2670839738a (patch) | |
| tree | 1a42f77dd7e8b6f24c61741305cd2b679e9f6e39 /src | |
| parent | 4e839856db99f863c58bd37b63a9b29d567b8e27 (diff) | |
| download | talos-hostboot-6d14af625c19ba9b9e8783627a8ec2670839738a.tar.gz talos-hostboot-6d14af625c19ba9b9e8783627a8ec2670839738a.zip | |
Add subsystem translations for NVDIMM part callouts
A few new part callouts were added to support the NVDIMM function
but a corresponding error log subsystem was never added.
This change also adds a testcase to check for missing subsystems
going forward.
Change-Id: I523840615fe734553dd30af8e608c1aa214fd2dc
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/82591
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Corey V Swenson <cswenson@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>
Reviewed-by: Matt Derksen <mderkse1@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: ARAVIND T. NAIR <aravindnair@in.ibm.com>
Reviewed-by: Daniel M Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/include/usr/hwas/common/hwasCallout.H | 7 | ||||
| -rw-r--r-- | src/usr/errl/errlentry_consts.H | 3 | ||||
| -rw-r--r-- | src/usr/errl/test/errltest.H | 53 |
3 files changed, 62 insertions, 1 deletions
diff --git a/src/include/usr/hwas/common/hwasCallout.H b/src/include/usr/hwas/common/hwasCallout.H index 9c11236df..3cf4a2638 100644 --- a/src/include/usr/hwas/common/hwasCallout.H +++ b/src/include/usr/hwas/common/hwasCallout.H @@ -180,6 +180,7 @@ enum callOutPriority enum busTypeEnum { + NO_BUS_TYPE = 0, FSI_BUS_TYPE = 1, DMI_BUS_TYPE = 2, A_BUS_TYPE = 3, @@ -188,6 +189,8 @@ enum busTypeEnum PSI_BUS_TYPE = 6, O_BUS_TYPE = 7, OMI_BUS_TYPE = 8, + + LAST_BUS_TYPE, //for looping in testcases }; // Used by Hostboot code where real clock targets do not exist @@ -227,6 +230,8 @@ enum partTypeEnum BPM_CABLE_PART_TYPE = 13, //Backup Power Module Cable for NVDIMM NV_CONTROLLER_PART_TYPE = 14, //Controller for NVDIMM BPM_PART_TYPE = 15, //Backup Power Module for NVDIMM + + LAST_PART_TYPE, //for looping in testcases }; enum sensorTypeEnum @@ -235,6 +240,8 @@ enum sensorTypeEnum GPU_FUNC_SENSOR = 1, GPU_TEMPERATURE_SENSOR = 2, GPU_MEMORY_TEMP_SENSOR = 3, + + LAST_SENSOR_TYPE, //for looping in testcases }; //-- Flags diff --git a/src/usr/errl/errlentry_consts.H b/src/usr/errl/errlentry_consts.H index 86d58a77c..816738010 100644 --- a/src/usr/errl/errlentry_consts.H +++ b/src/usr/errl/errlentry_consts.H @@ -166,6 +166,9 @@ const epubPartTypeToSub_t PART_TO_SUBSYS_TABLE[] = { HWAS::PROC_REF_CLOCK , EPUB_CEC_HDW_CLK_CTL }, { HWAS::PCI_REF_CLOCK , EPUB_CEC_HDW_CLK_CTL }, { HWAS::SMP_CABLE , EPUB_CEC_HDW_SUBSYS }, + { HWAS::BPM_CABLE_PART_TYPE , EPUB_MEMORY_SUBSYS }, + { HWAS::NV_CONTROLLER_PART_TYPE , EPUB_MEMORY_SUBSYS }, + { HWAS::BPM_PART_TYPE , EPUB_MEMORY_SUBSYS }, }; struct epubSensorTypeToSub_t diff --git a/src/usr/errl/test/errltest.H b/src/usr/errl/test/errltest.H index ff5df6b65..32e798ac4 100644 --- a/src/usr/errl/test/errltest.H +++ b/src/usr/errl/test/errltest.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2011,2018 */ +/* Contributors Listed Below - COPYRIGHT 2011,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -1214,6 +1214,57 @@ public: l_err = NULL; } + /** + * @brief Ensure all callouts have a SUBSYS mapping + * + */ + void testErrl_ensureSubsystemMapping(void) + { + // dummy log to call non-static methods with + errlHndl_t l_err = new ERRORLOG::ErrlEntry( + ERRORLOG::ERRL_SEV_INFORMATIONAL, + ERRORLOG::ERRL_TEST_MOD_ID, + ERRORLOG::ERRL_TEST_REASON_CODE, + 0x494E464F, //INFO + 0); + + // Walk through every BUS_TYPE + for( busTypeEnum bus = (busTypeEnum)(NO_BUS_TYPE+1); + bus < LAST_BUS_TYPE; + bus = (busTypeEnum)(bus+1) ) + { + if( l_err->getSubSystem(bus) == EPUB_MISC_UNKNOWN ) + { + TS_FAIL( "No subsystem returned for BUS_TYPE %d", bus ); + } + } + + // Walk through every PART_TYPE + for( partTypeEnum part = (partTypeEnum)(NO_PART_TYPE+1); + part < LAST_PART_TYPE; + part = (partTypeEnum)(part+1) ) + { + if( l_err->getSubSystem(part) == EPUB_MISC_UNKNOWN ) + { + TS_FAIL( "No subsystem returned for PART_TYPE %d", part ); + } + } + + // Walk through every SENSOR_TYPE + for( sensorTypeEnum sensor = (sensorTypeEnum)(UNKNOWN_SENSOR+1); + sensor < LAST_SENSOR_TYPE; + sensor = (sensorTypeEnum)(sensor+1) ) + { + if( l_err->getSubSystem(sensor) == EPUB_MISC_UNKNOWN ) + { + TS_FAIL( "No subsystem returned for SENSOR_TYPE %d", sensor ); + } + } + + // Note - Can't loop over epubProcedureID because the values are + // sparsely populated + + } }; |

