Skip to content

Commit

Permalink
Add subsystem translations for NVDIMM part callouts
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
dcrowell77 committed Aug 22, 2019
1 parent 4e83985 commit 6d14af6
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/include/usr/hwas/common/hwasCallout.H
Expand Up @@ -180,6 +180,7 @@ enum callOutPriority

enum busTypeEnum
{
NO_BUS_TYPE = 0,
FSI_BUS_TYPE = 1,
DMI_BUS_TYPE = 2,
A_BUS_TYPE = 3,
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
3 changes: 3 additions & 0 deletions src/usr/errl/errlentry_consts.H
Expand Up @@ -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
Expand Down
53 changes: 52 additions & 1 deletion src/usr/errl/test/errltest.H
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2011,2018 */
/* Contributors Listed Below - COPYRIGHT 2011,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -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

}


};
Expand Down

0 comments on commit 6d14af6

Please sign in to comment.