diff options
| author | Zane Shelley <zshelle@us.ibm.com> | 2013-11-15 10:19:09 -0600 |
|---|---|---|
| committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2013-11-15 16:03:28 -0600 |
| commit | 609e5701ff5318d97d548d47057a48ec5c32e035 (patch) | |
| tree | 8b0d6c5f1ed85274e5228aa67c11cfde60211da3 /src | |
| parent | 6288c172787e0a8071430962cdbfa614d8ed6164 (diff) | |
| download | talos-hostboot-609e5701ff5318d97d548d47057a48ec5c32e035.tar.gz talos-hostboot-609e5701ff5318d97d548d47057a48ec5c32e035.zip | |
PRD: Fix inputs to mss_put_mark_store and mss_put_steer_mux HWPs
Change-Id: I4c262e7844812dd36cc9dab715c40c6ef4de3acc
CQ: SW234841
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/7261
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Reviewed-by: Christopher T. Phan <cphan@us.ibm.com>
Tested-by: Jenkins Server
Reviewed-by: Zane Shelley <zshelle@us.ibm.com>
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/7267
Diffstat (limited to 'src')
3 files changed, 37 insertions, 11 deletions
diff --git a/src/usr/diag/prdf/common/framework/service/prdfPlatServices_common.C b/src/usr/diag/prdf/common/framework/service/prdfPlatServices_common.C index 6ef26e577..ab837246c 100755 --- a/src/usr/diag/prdf/common/framework/service/prdfPlatServices_common.C +++ b/src/usr/diag/prdf/common/framework/service/prdfPlatServices_common.C @@ -450,8 +450,8 @@ int32_t mssSetMarkStore( TargetHandle_t i_mba, const CenRank & i_rank, uint8_t symbolMark = i_mark.getSM().isValid() ? i_mark.getSM().getSymbol() : MSS_INVALID_SYMBOL; - uint8_t chipMark = i_mark.getCM().isValid() ? i_mark.getCM().getSymbol() - : MSS_INVALID_SYMBOL; + uint8_t chipMark = i_mark.getCM().isValid() ? i_mark.getCM().getDramSymbol() + : MSS_INVALID_SYMBOL; fapi::ReturnCode l_rc = mss_put_mark_store( getFapiTarget(i_mba), i_rank.getMaster(), symbolMark, @@ -522,7 +522,8 @@ int32_t mssSetSteerMux( TargetHandle_t i_mba, const CenRank & i_rank, errlHndl_t errl = NULL; PRD_FAPI_TO_ERRL( errl, mss_do_steering, getFapiTarget(i_mba), - i_rank.getMaster(), i_symbol.getSymbol(), i_x4EccSpare ); + i_rank.getMaster(), i_symbol.getDramSymbol(), + i_x4EccSpare ); if ( NULL != errl ) { diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfCenSymbol.C b/src/usr/diag/prdf/common/plat/pegasus/prdfCenSymbol.C index dfffc0377..93f752571 100755 --- a/src/usr/diag/prdf/common/plat/pegasus/prdfCenSymbol.C +++ b/src/usr/diag/prdf/common/plat/pegasus/prdfCenSymbol.C @@ -261,16 +261,30 @@ uint8_t CenSymbol::symbol2PortSlct( uint8_t i_symbol ) //------------------------------------------------------------------------------ -uint8_t CenSymbol::symbol2Dram( uint8_t i_symbol, bool isX4Dram ) +uint8_t CenSymbol::symbol2Dram( uint8_t i_symbol, bool i_isX4Dram ) { - uint8_t dram = isX4Dram ? X4DRAMS_PER_RANK : X8DRAMS_PER_RANK; + const uint8_t dramsPerRank = i_isX4Dram ? X4DRAMS_PER_RANK + : X8DRAMS_PER_RANK; - if ( SYMBOLS_PER_RANK > i_symbol ) - { - dram = i_symbol / (isX4Dram ? SYMBOLS_PER_X4DRAM : SYMBOLS_PER_X8DRAM); - } + const uint8_t symbolsPerDram = i_isX4Dram ? SYMBOLS_PER_X4DRAM + : SYMBOLS_PER_X8DRAM; + + return (SYMBOLS_PER_RANK > i_symbol) ? (i_symbol / symbolsPerDram) + : dramsPerRank; +} + +//------------------------------------------------------------------------------ + +uint8_t CenSymbol::dram2Symbol( uint8_t i_dram, bool i_isX4Dram ) +{ + const uint8_t dramsPerRank = i_isX4Dram ? X4DRAMS_PER_RANK + : X8DRAMS_PER_RANK; + + const uint8_t symbolsPerDram = i_isX4Dram ? SYMBOLS_PER_X4DRAM + : SYMBOLS_PER_X8DRAM; - return dram; + return (dramsPerRank > i_dram) ? (i_dram * symbolsPerDram) + : SYMBOLS_PER_RANK; } //------------------------------------------------------------------------------ diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfCenSymbol.H b/src/usr/diag/prdf/common/plat/pegasus/prdfCenSymbol.H index d6f12864c..85859f583 100755 --- a/src/usr/diag/prdf/common/plat/pegasus/prdfCenSymbol.H +++ b/src/usr/diag/prdf/common/plat/pegasus/prdfCenSymbol.H @@ -166,6 +166,14 @@ class CenSymbol /** @return The DRAM index for this symbol. */ uint8_t getDram() const { return symbol2Dram( iv_symbol, iv_x4Dram ); } + /** + * @return The first symbol of the DRAM associated with this symbol. + * @note Needed for input into mss_put_mark_store and mss_put_steer_mux + * hardware procedures. + */ + uint8_t getDramSymbol() const + { return dram2Symbol( symbol2Dram(iv_symbol, iv_x4Dram), iv_x4Dram); } + /** @return The bad pins associated with this symbol in relation to the DRAM * (x4 mode is 4-bits, x8 mode is 8-bits,). */ uint8_t getDramPins() const; @@ -193,7 +201,10 @@ class CenSymbol static uint8_t symbol2PortSlct( uint8_t i_symbol ); /** @return The DRAM index for the given symbol. */ - static uint8_t symbol2Dram( uint8_t i_symbol, bool isX4Dram ); + static uint8_t symbol2Dram( uint8_t i_symbol, bool i_isX4Dram ); + + /** @return The first symbol of the given DRAM index. */ + static uint8_t dram2Symbol( uint8_t i_dram, bool i_isX4Dram ); /** * @brief Overrides the '<' operator. |

