diff options
author | Caleb Palmer <cnpalmer@us.ibm.com> | 2018-08-16 17:02:54 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2018-08-20 13:05:30 -0500 |
commit | 307b61a6de9baae0c7bb73078ea856b728c19e7f (patch) | |
tree | 798207a5c1ccd01a5723099fb921aa73eca829f4 | |
parent | af570fbad576e871955c855db39686ce83774227 (diff) | |
download | talos-hostboot-307b61a6de9baae0c7bb73078ea856b728c19e7f.tar.gz talos-hostboot-307b61a6de9baae0c7bb73078ea856b728c19e7f.zip |
Adjust port select in bad dq for spares
Change-Id: Id4a693bafc2d1190a563994eef004277e5fb82d4
CQ: SW441852
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/64798
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>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
-rw-r--r-- | src/usr/fapi2/attribute_service.C | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/usr/fapi2/attribute_service.C b/src/usr/fapi2/attribute_service.C index ae9bb9475..848905401 100644 --- a/src/usr/fapi2/attribute_service.C +++ b/src/usr/fapi2/attribute_service.C @@ -591,6 +591,11 @@ ReturnCode __getMcsAndPortSlct( const Target<TARGET_TYPE_DIMM>& i_fapiDimm, fapi2::ReturnCode l_rc; errlHndl_t l_errl = nullptr; + // NOTE: this function returns the port select we need for the translation + // attribute. This means, for Cumulus it returns the MBA port from the + // centaur perspective (0-3), and for Nimbus it returns the port select from + // an MCS perspective (0-1). + do { TARGETING::ATTR_MODEL_type procType = __getChipModel(); @@ -869,12 +874,13 @@ ReturnCode __dimmGetDqBitmapSpareByte( TARGETING::TargetHandle_t i_dimm, TARGETING::TargetHandle_t l_mcsTarget = nullptr; uint32_t l_ps = 0; - __getMcsAndPortSlct( l_fapiDimm, l_mcsTarget, l_ps ); TARGETING::ATTR_MODEL_type procType = __getChipModel(); if ( TARGETING::MODEL_NIMBUS == procType ) { + __getMcsAndPortSlct( l_fapiDimm, l_mcsTarget, l_ps ); + l_rc = FAPI_ATTR_GET( fapi2::ATTR_EFF_DIMM_SPARE, l_mcsTarget, l_dramSpare ); } @@ -893,6 +899,12 @@ ReturnCode __dimmGetDqBitmapSpareByte( TARGETING::TargetHandle_t i_dimm, } l_rc = FAPI_ATTR_GET( fapi2::ATTR_CEN_VPD_DIMM_SPARE, l_mbaTrgt, l_dramSpare ); + + // In this case we need the port select from the MBA perspective + // not the centaur perspective that __getMcsAndPortSlct gives + // us, so we can't use that function. + l_ps = i_dimm->getAttr<TARGETING::ATTR_CEN_MBA_PORT>() % + MAX_PORTS_PER_MBA; } else { |