Skip to content

Commit

Permalink
Fix for workaround for HW480181
Browse files Browse the repository at this point in the history
The workaround works fine when Cronus only sets up a single
TOD topology, but once _actual_ firmware on an _actual_ system
sets up a primary and backup topology, the simpleton fix wipes
out part of the primary config when the backup config is set up.

Fixed by only updating the partial register and only while the
primary topology is being set up.

Also fix MPIPL setup where a copy-paste error cause an invalid
value in the master path control register.

Change-Id: Ief4757cd1d082f18e625142f3e3246dfdc5771a2
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/72337
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: Joseph J. McGill <jmcgill@us.ibm.com>
Reviewed-by: Manish K. Chowdhary <manichow@in.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/72350
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
  • Loading branch information
fenkes-ibm authored and dcrowell77 committed Apr 8, 2019
1 parent 63a8b58 commit 96195e4
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions src/import/chips/p9/procedures/hwp/nest/p9_tod_setup.C
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
//--------------------------------------------------------------------------
#include <p9_tod_setup.H>

const uint64_t M_PATH_CTRL_REG_CLEAR_VALUE = 0x0000003F00000000;
const uint64_t M_PATH_CTRL_REG_CLEAR_VALUE = 0x0000000000000000;
const uint64_t S_PATH_CTRL_REG_CLEAR_VALUE = 0x0000003F00000000;

/// @brief MPIPL specific steps to clear the previous topology, this should be
Expand Down Expand Up @@ -173,12 +173,22 @@ fapi2::ReturnCode clear_tod_node(
0x0ULL),
"Error from putScom (0x%08X)!", l_port_ctrl_check_reg);

// Workaround for HW480181: Init remote sync checker tolerance to maximum;
// will be closed down by tod_init later.
FAPI_TRY(fapi2::putScom(*(i_tod_node->i_target),
PERV_TOD_S_PATH_CTRL_REG,
S_PATH_CTRL_REG_CLEAR_VALUE),
"Error from putScom (0x%08X)!", l_port_ctrl_check_reg);
if (i_tod_sel == TOD_PRIMARY)
{
// Workaround for HW480181: Init remote sync checker tolerance to maximum;
// will be closed down by configure_tod_node later.
fapi2::buffer<uint64_t> l_data;
FAPI_TRY(fapi2::getScom(*(i_tod_node->i_target), PERV_TOD_S_PATH_CTRL_REG, l_data),
"Error from getScom (PERV_TOD_S_PATH_CTRL_REG)!");
l_data.insertFromRight<PERV_TOD_S_PATH_CTRL_REG_REMOTE_SYNC_CHECK_CPS_DEVIATION,
PERV_TOD_S_PATH_CTRL_REG_REMOTE_SYNC_CHECK_CPS_DEVIATION_LEN>
(STEP_CHECK_CPS_DEVIATION_93_75_PCENT);
l_data.insertFromRight<PERV_TOD_S_PATH_CTRL_REG_REMOTE_SYNC_CHECK_CPS_DEVIATION_FACTOR,
PERV_TOD_S_PATH_CTRL_REG_REMOTE_SYNC_CHECK_CPS_DEVIATION_FACTOR_LEN>
(STEP_CHECK_CPS_DEVIATION_FACTOR_8);
FAPI_TRY(fapi2::putScom(*(i_tod_node->i_target), PERV_TOD_S_PATH_CTRL_REG, l_data),
"Error from putScom (PERV_TOD_S_PATH_CTRL_REG)!");
}


// TOD is cleared for this node; if it has children, start clearing
Expand Down

0 comments on commit 96195e4

Please sign in to comment.