Skip to content

Commit

Permalink
eRepair: Correctly update xbus vpd records based on clock group
Browse files Browse the repository at this point in the history
- Each XBUS constituted of two sub-buses XBUS-A and XBUS-B say for
  XBUS0 == [X0A, X0B] where X0A = bits[0:15] and X0B = bits[16:31]
  and they are distinguished by clock group param [0,1].
  Clock group 0 == X[0,1,2]A == bits[00:15]
  Clock group 1 == X[0,1,2]B == bits[16:31]
  When referring xbus record in vpd the clock group param need to
  be encoded in record to correctly identify the xbus referred.
  To do this fabricBus/busNum member of struct eRepairProcDevInfo
  is divided in two parts to capture clock group param as
  bits [0:3] ==> Clock group param [0,1]
  bits [4:7] ==> XBUS bus number [0,1,2]
- Optimized Xbus updateRepairLanesToBufProc() procedure

Change-Id: I6543dd2fe0392bf29c4c9d4ca3843ebf50218d1a
CQ: SW444885
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/66132
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: Christopher W. Steffen <cwsteffen@us.ibm.com>
Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/66133
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
  • Loading branch information
sumitk56 authored and crgeddes committed Sep 19, 2018
1 parent 7b8e409 commit 6dbd41c
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 346 deletions.
3 changes: 3 additions & 0 deletions src/import/chips/p9/procedures/hwp/io/p9_io_erepairConsts.H
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@ struct eRepairProcDevInfo
{
uint8_t processor_id;// Range:0x00-0xFF. Value:Processor MRU IDs
uint8_t fabricBus; // Range:0x00-0xFF. Value: FabricBus(ATTR_CHIP_UNIT_POS)
// fabricBus for XBUS would be treated in two parts:
// bits [0:3] ==> Clock group param [0,1]
// bits [4:7] ==> XBUS bus number [0,1,2]
};

// eRepair structure for failing lanes on Power Bus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,9 @@ fapi2::ReturnCode determineRepairLanesProc(
fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP> l_chipTarget;
fapi2::ReturnCode l_rc = fapi2::FAPI2_RC_SUCCESS;
fapi2::ATTR_CHIP_UNIT_POS_Type l_busNum;
bool l_bClkGroupFound = false;
fapi2::current_err = fapi2::FAPI2_RC_SUCCESS;

FAPI_INF(">> determineRepairLanesProc - BufSize:%d ", i_bufSz);
FAPI_INF(">> determineRepairLanesProc - BufSize:%d ClkGrp:%d ", i_bufSz, i_clkGroup);

// Get the parent chip target
l_chipTarget = i_target.template getParent<fapi2::TARGET_TYPE_PROC_CHIP>();
Expand Down Expand Up @@ -284,18 +283,11 @@ fapi2::ReturnCode determineRepairLanesProc(

FAPI_INF("Channel:%d BusNum:%d ", l_fabricBus->device.fabricBus, l_busNum);

if(l_fabricBus->device.fabricBus != l_busNum)
if(l_fabricBus->device.fabricBus != ((i_clkGroup << 4) | l_busNum))
{
continue;
}

if(i_clkGroup > 0 && !l_bClkGroupFound)
{
l_vpdPtr += l_fabricRepairDataSz;
l_bClkGroupFound = true;
continue;
}

// Copy the fail lane numbers in the vectors
FAPI_INF("Decode:IF:0x%x FailBit:%d ", l_fabricBus->interface, l_fabricBus->failBit);

Expand Down

0 comments on commit 6dbd41c

Please sign in to comment.