diff options
author | Caleb Palmer <cnpalmer@us.ibm.com> | 2018-03-01 08:46:34 -0600 |
---|---|---|
committer | Zane C. Shelley <zshelle@us.ibm.com> | 2018-03-01 16:08:03 -0500 |
commit | 1467cbcb8be553e1dbbd5e46b2312dd0d8ce2ceb (patch) | |
tree | ba0a0bd90a23ac6481ddc9f11daf5475dde27feb /src/usr | |
parent | 8cf2925f7e0122c56b2c0699a52dd7c7416ff02a (diff) | |
download | talos-hostboot-1467cbcb8be553e1dbbd5e46b2312dd0d8ce2ceb.tar.gz talos-hostboot-1467cbcb8be553e1dbbd5e46b2312dd0d8ce2ceb.zip |
Fix target type check in bad dq helper function
Change-Id: If302eb22908f51345e041b7c381266bfbf5ba526
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/54888
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: Benjamin J. Weisenbeck <bweisenb@us.ibm.com>
Reviewed-by: Brian J. Stegmiller <bjs@us.ibm.com>
Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com>
Diffstat (limited to 'src/usr')
-rw-r--r-- | src/usr/fapi2/dimmBadDqBitmapFuncs.C | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/usr/fapi2/dimmBadDqBitmapFuncs.C b/src/usr/fapi2/dimmBadDqBitmapFuncs.C index 2bfe2d25f..e55431187 100644 --- a/src/usr/fapi2/dimmBadDqBitmapFuncs.C +++ b/src/usr/fapi2/dimmBadDqBitmapFuncs.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2017 */ +/* Contributors Listed Below - COPYRIGHT 2017,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -72,10 +72,16 @@ fapi2::ReturnCode dimmBadDqCheckParamGetBitmap( const fapi2::Target break; } + // Get the proc model + TARGETING::Target* l_masterProc = nullptr; + TARGETING::targetService().masterProcChipTargetHandle( l_masterProc ); + TARGETING::ATTR_MODEL_type l_procModel = + l_masterProc->getAttr<TARGETING::ATTR_MODEL>(); + // Get the DIMM TargetHandleList l_dimmList; - if ( fapi2::TARGET_TYPE_MBA == i_fapiTrgt.getType() ) + if ( TARGETING::MODEL_CUMULUS == l_procModel ) { // Get all functional DIMMs getChildAffinityTargets( l_dimmList, l_trgt, CLASS_NA, TYPE_DIMM ); @@ -105,7 +111,7 @@ fapi2::ReturnCode dimmBadDqCheckParamGetBitmap( const fapi2::Target } } } - else + else if ( TARGETING::MODEL_NIMBUS == l_procModel ) { // Get all connected DIMMs, even nonfunctioning ones. getChildAffinityTargets( l_dimmList, l_trgt, CLASS_NA, TYPE_DIMM, @@ -116,6 +122,13 @@ fapi2::ReturnCode dimmBadDqCheckParamGetBitmap( const fapi2::Target l_rc = FAPI_ATTR_GET( fapi2::ATTR_BAD_DQ_BITMAP, o_dimmTrgt, o_dqBitmap ); } + else + { + // Invalid target. + FAPI_ERR( "dimmBadDqCheckParamGetBitmap: Invalid proc model" ); + l_rc = fapi2::FAPI2_RC_INVALID_ATTR_GET; + break; + } if ( l_rc ) { |