From 06f75dffe7d2ad2bb6bd93e3ef45c6e99b3312a8 Mon Sep 17 00:00:00 2001 From: Stephen Glancy Date: Sun, 17 Mar 2019 14:33:49 -0400 Subject: Fixes four-rank rank pairing code Change-Id: I8dd1ecd4b6f49bf40c394caaffeee72d3edca921 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/73511 Tested-by: FSP CI Jenkins Reviewed-by: Louis Stermole Reviewed-by: ANDRE A. MARIN Tested-by: Jenkins Server Tested-by: HWSV CI Tested-by: Hostboot CI Dev-Ready: STEPHEN GLANCY Reviewed-by: Jennifer A. Stofer Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/73541 Reviewed-by: Christian R. Geddes Tested-by: Christian R. Geddes --- src/import/chips/p9/procedures/hwp/memory/lib/mc/port.H | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/import/chips/p9/procedures/hwp/memory/lib/mc') diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/mc/port.H b/src/import/chips/p9/procedures/hwp/memory/lib/mc/port.H index 45ffbee13..458bff645 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/mc/port.H +++ b/src/import/chips/p9/procedures/hwp/memory/lib/mc/port.H @@ -830,7 +830,14 @@ fapi2::ReturnCode reset_zqcal_config( const fapi2::Target& i_target ) for (const auto r : l_ranks) { - FAPI_TRY(l_phy_zqcal_config.setBit(TT::PER_ZCAL_ENA_RANK + rank::map_rank_ordinal_to_phy(i_target, r))); + uint64_t l_phy_rank = 0; + FAPI_TRY(rank::map_rank_ordinal_to_phy(i_target, r, l_phy_rank)) + + // Only add on an additional rank if we have a valid rank + if(l_phy_rank != NO_RANK) + { + FAPI_TRY(l_phy_zqcal_config.setBit(TT::PER_ZCAL_ENA_RANK + l_phy_rank)); + } } // Write the ZQCAL periodic config -- cgit v1.2.1