Skip to content

Commit

Permalink
Remove functionality from tp enable ridi and move it to nest enabled …
Browse files Browse the repository at this point in the history
…ridi

Previously, we were enabled TP RIDI before we did a bunch of scans which
touch LPC logic. This was causing LPC logic to get messed up because
once TP ridi is enabled LPC traffic is flowing. To get around this,
we are moving the enablement of the TP RIDI to after the scans of the
LPC logic so that the LPC logic wont get messed with

Change-Id: I6244fdf1314a21d9c76519bde3905287c7870b26
CQ: SW396004
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/46941
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com>
Reviewed-by: Dean Sanner <dsanner@us.ibm.com>
Reviewed-by: Joseph J. McGill <jmcgill@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/46966
Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
  • Loading branch information
crgeddes authored and sgupta2m committed Oct 3, 2017
1 parent de2de6b commit fcecddd
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 26 deletions.
40 changes: 38 additions & 2 deletions src/import/chips/p9/procedures/hwp/perv/p9_sbe_nest_enable_ridi.C
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER sbe Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2015,2016 */
/* Contributors Listed Below - COPYRIGHT 2015,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -40,17 +40,29 @@
#include "p9_sbe_nest_enable_ridi.H"

#include "p9_perv_scom_addresses.H"
#include "p9_perv_scom_addresses_fld.H"

static fapi2::ReturnCode p9_sbe_nest_enable_ridi_net_ctrl_action_function(
const fapi2::Target<fapi2::TARGET_TYPE_PERV>& i_target_chiplet);

static fapi2::ReturnCode tp_enable_ridi(const
fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target_chip);

fapi2::ReturnCode p9_sbe_nest_enable_ridi(const
fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target_chip)
{
auto l_perv_functional_vector =
i_target_chip.getChildren<fapi2::TARGET_TYPE_PERV>
(fapi2::TARGET_STATE_FUNCTIONAL);
FAPI_DBG("p9_sbe_nest_enable_ridi: Entering ...");
FAPI_DBG("p9_sbe_nest_enable_ridi: Enabling TP RI/DI ...");
//First enable the TP ri/di, originally they were enabled in
//a previous istep, but running the steps in that order
//was allowing LPC traffic to flow while the LPC logic was scanned
FAPI_TRY(tp_enable_ridi(i_target_chip));
FAPI_DBG("p9_sbe_nest_enable_ridi: Enabling TP RI/DI Complete ...");

FAPI_DBG("p9_sbe_nest_enable_ridi: Enabling nest RI/DI ...");

for (auto& l_chplt_trgt : l_perv_functional_vector)
{
Expand All @@ -71,13 +83,38 @@ fapi2::ReturnCode p9_sbe_nest_enable_ridi(const
FAPI_TRY(p9_sbe_nest_enable_ridi_net_ctrl_action_function(l_chplt_trgt));
}

FAPI_DBG("p9_sbe_nest_enable_ridi: Enabling nest RI/DI Complete ...");
FAPI_DBG("p9_sbe_nest_enable_ridi: Exiting ...");

fapi_try_exit:
return fapi2::current_err;

}

/// @brief enables TP ridi bits in RC regs
///
/// @param[in] i_target_chip Reference to TARGET_TYPE_PROC_CHIP target
/// @return FAPI2_RC_SUCCESS if success, else error code.
static fapi2::ReturnCode tp_enable_ridi(const
fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target_chip)
{
fapi2::buffer<uint64_t> l_data64;
FAPI_DBG("tp_enable_ridi: Entering ...");

FAPI_INF("tp_enable_ridi:: Enable Recievers, Drivers DI1 & DI2");
//Setting ROOT_CTRL1 register value
FAPI_TRY(fapi2::getScom(i_target_chip, PERV_ROOT_CTRL1_SCOM, l_data64));
l_data64.setBit<PERV_ROOT_CTRL1_TP_RI_DC_B>(); // 19
l_data64.setBit<PERV_ROOT_CTRL1_TP_DI1_DC_B>(); // 20
l_data64.setBit<PERV_ROOT_CTRL1_TP_DI2_DC_B>(); // 21
FAPI_TRY(fapi2::putScom(i_target_chip, PERV_ROOT_CTRL1_SCOM, l_data64));

FAPI_DBG("tp_enable_ridi: Exiting ...");

fapi_try_exit:
return fapi2::current_err;
}

/// @brief Enable Drivers/Recievers of Nest chiplet
///
/// @param[in] i_target_chiplet Reference to TARGET_TYPE_PERV target
Expand Down Expand Up @@ -109,5 +146,4 @@ static fapi2::ReturnCode p9_sbe_nest_enable_ridi_net_ctrl_action_function(

fapi_try_exit:
return fapi2::current_err;

}
25 changes: 4 additions & 21 deletions src/import/chips/p9/procedures/hwp/perv/p9_sbe_tp_enable_ridi.C
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER sbe Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2015,2016 */
/* Contributors Listed Below - COPYRIGHT 2015,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand All @@ -25,7 +25,8 @@
//------------------------------------------------------------------------------
/// @file p9_sbe_tp_enable_ridi.C
///
/// @brief enables ridi bits in RC regs after scan initialize and start clock the pervasive chiplet
/// @brief This is a method stub, the real functionality has been moved to
/// p9_sbe_nest_enable_ridi.C
//------------------------------------------------------------------------------
// *HWP HW Owner : Abhishek Agarwal <abagarw8@in.ibm.com>
// *HWP HW Backup Owner : Srinivas V Naga <srinivan@in.ibm.com>
Expand All @@ -35,30 +36,12 @@
// *HWP Consumed by : SBE
//------------------------------------------------------------------------------


//## auto_generated
#include "p9_sbe_tp_enable_ridi.H"

#include "p9_perv_scom_addresses.H"


fapi2::ReturnCode p9_sbe_tp_enable_ridi(const
fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target_chip)
{
fapi2::buffer<uint64_t> l_data64;
FAPI_DBG("p9_sbe_tp_enable_ridi: Entering ...");

FAPI_INF("Enable Recievers, Drivers DI1 & DI2");
//Setting ROOT_CTRL1 register value
FAPI_TRY(fapi2::getScom(i_target_chip, PERV_ROOT_CTRL1_SCOM, l_data64));
l_data64.setBit<19>(); //PIB.ROOT_CTRL1.TP_RI_DC_B = 1
l_data64.setBit<20>(); //PIB.ROOT_CTRL1.TP_DI1_DC_B = 1
l_data64.setBit<21>(); //PIB.ROOT_CTRL1.TP_DI2_DC_B = 1
FAPI_TRY(fapi2::putScom(i_target_chip, PERV_ROOT_CTRL1_SCOM, l_data64));

FAPI_DBG("p9_sbe_tp_enable_ridi: Exiting ...");

fapi_try_exit:
// This function is now a stub, functionality has been moved to p9_sbe_nest_enable_ridi.C
return fapi2::current_err;

}
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER sbe Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2015,2016 */
/* Contributors Listed Below - COPYRIGHT 2015,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand All @@ -25,7 +25,8 @@
//------------------------------------------------------------------------------
/// @file p9_sbe_tp_enable_ridi.H
///
/// @brief enables ridi bits in RC regs after scan initialize and start clock the pervasive chiplet
/// @brief This is a method stub, the real functionality has been moved to
/// p9_sbe_nest_enable_ridi.C
//------------------------------------------------------------------------------
// *HWP HW Owner : Abhishek Agarwal <abagarw8@in.ibm.com>
// *HWP HW Backup Owner : Srinivas V Naga <srinivan@in.ibm.com>
Expand All @@ -46,7 +47,8 @@
typedef fapi2::ReturnCode (*p9_sbe_tp_enable_ridi_FP_t)(
const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>&);

/// @brief Enable drivers/receivers for PRV chiplet
/// @brief This is a method stub, the real functionality has been moved to
/// p9_sbe_nest_enable_ridi.C
///
/// @param[in] i_target_chip Reference to TARGET_TYPE_PROC_CHIP target
/// @return FAPI2_RC_SUCCESS if success, else error code.
Expand Down

0 comments on commit fcecddd

Please sign in to comment.