summaryrefslogtreecommitdiffstats
path: root/src/usr/diag
diff options
context:
space:
mode:
authorMatt Derksen <mderkse1@us.ibm.com>2018-04-13 16:35:49 -0500
committerZane C. Shelley <zshelle@us.ibm.com>2018-04-17 11:57:05 -0400
commit67bce7927b46080e76f048d9c305b29dcbb5cc3f (patch)
tree3d7797b7a5ccee0d1cf54b948b642476b00f4cf5 /src/usr/diag
parent02d1a4e18137c6172765e365f891988ac9218def (diff)
downloadtalos-hostboot-67bce7927b46080e76f048d9c305b29dcbb5cc3f.tar.gz
talos-hostboot-67bce7927b46080e76f048d9c305b29dcbb5cc3f.zip
Update isDramWidthX4() function to handle X8 drams
TYPE_MCA for Nimbus should always return true, TYPE_MBA should check ATTR_CEN_EFF_DRAM_WIDTH. No other type is supported. Template was initially tried but it required a lot of other changes in calling functions. Change-Id: I25b11e33d541c57689ee491a81f0dc630734101d RTC:161599 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/57206 Reviewed-by: Benjamin J. Weisenbeck <bweisenb@us.ibm.com> CI-Ready: Zane C. Shelley <zshelle@us.ibm.com> Reviewed-by: Caleb N. Palmer <cnpalmer@us.ibm.com> Reviewed-by: Brian J. Stegmiller <bjs@us.ibm.com> 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: Zane C. Shelley <zshelle@us.ibm.com>
Diffstat (limited to 'src/usr/diag')
-rwxr-xr-xsrc/usr/diag/prdf/common/plat/prdfTargetServices.C25
-rwxr-xr-xsrc/usr/diag/prdf/common/plat/prdfTargetServices.H8
2 files changed, 23 insertions, 10 deletions
diff --git a/src/usr/diag/prdf/common/plat/prdfTargetServices.C b/src/usr/diag/prdf/common/plat/prdfTargetServices.C
index 275b774c9..0a15b80bc 100755
--- a/src/usr/diag/prdf/common/plat/prdfTargetServices.C
+++ b/src/usr/diag/prdf/common/plat/prdfTargetServices.C
@@ -1424,12 +1424,25 @@ int32_t getDimmRowCol( TARGETING::TargetHandle_t i_mba, uint8_t & o_rowNum,
bool isDramWidthX4( TargetHandle_t i_trgt )
{
- // TODO RTC 161599
- // all drams for Nimbus will be treated as X4 - this will need to be
- // updated for Cumulus
- return true;
- //return ( fapi2::ENUM_ATTR_EFF_DRAM_WIDTH_X4 ==
- // i_trgt->getAttr<ATTR_EFF_DRAM_WIDTH>() );
+ bool o_dramWidthX4 = false;
+
+ PRDF_ASSERT( nullptr != i_trgt );
+ switch ( getTargetType(i_trgt) )
+ {
+ case TYPE_MCA:
+ o_dramWidthX4 = true; // Nimbus only supports x4 DRAMs
+ break;
+
+ case TYPE_MBA:
+ o_dramWidthX4 = ( fapi2::ENUM_ATTR_CEN_EFF_DRAM_WIDTH_X4 ==
+ i_trgt->getAttr<ATTR_CEN_EFF_DRAM_WIDTH>() );
+ break;
+
+ default:
+ PRDF_ASSERT(false); // code bug
+ }
+
+ return o_dramWidthX4;
}
//------------------------------------------------------------------------------
diff --git a/src/usr/diag/prdf/common/plat/prdfTargetServices.H b/src/usr/diag/prdf/common/plat/prdfTargetServices.H
index 48aa0d1c6..b00e5cadd 100755
--- a/src/usr/diag/prdf/common/plat/prdfTargetServices.H
+++ b/src/usr/diag/prdf/common/plat/prdfTargetServices.H
@@ -397,11 +397,11 @@ template<TARGETING::TYPE T>
uint8_t getDimmSlct( TARGETING::TargetHandle_t i_trgt );
/**
- * @brief checks dram widh ( x4 ) for mba
- * @param i_mbaTarget MBA target
- * @return true if DRAM with is X4 false otherwise
+ * @brief checks dram width ( x4 )
+ * @param i_trgt MCA or MBA target
+ * @return true if DRAM width is X4, false otherwise
*/
-bool isDramWidthX4(TARGETING::TargetHandle_t i_mbaTarget);
+bool isDramWidthX4(TARGETING::TargetHandle_t i_trgt);
/**
* @brief Get DRAM generation
OpenPOWER on IntegriCloud