Skip to content

Commit

Permalink
L3 update -- p9_sbe_fabricinit
Browse files Browse the repository at this point in the history
  remove stale TODO comments
  replace local defined bit field constants with SCOM address header constants
  add FFDC, HW callouts for all errors

Change-Id: I8440323904cf1c76e0f056b2ecc71de357d522e0
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/40361
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com>
Reviewed-by: Thi N. Tran <thi@us.ibm.com>
Reviewed-by: DHRUVARAJ SUBHASH CHANDRAN <dhruvaraj@in.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/40362
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
  • Loading branch information
jjmcgill authored and sgupta2m committed May 28, 2017
1 parent 99910d4 commit 9ee125f
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 22 deletions.
22 changes: 9 additions & 13 deletions src/import/chips/p9/procedures/hwp/nest/p9_sbe_fabricinit.C
Expand Up @@ -27,14 +27,13 @@
/// @brief Initialize island-mode fabric configuration (FAPI2)
///
/// @author Joe McGill <jmcgill@us.ibm.com>
/// @author Christy Graves <clgraves@us.ibm.com>
///

//
// *HWP HWP Owner: Joe McGill <jmcgill@us.ibm.com>
// *HWP FW Owner: Thi Tran <thi@us.ibm.com>
// *HWP Team: Nest
// *HWP Level: 2
// *HWP Level: 3
// *HWP Consumed by: SBE
//

Expand All @@ -54,12 +53,12 @@
const uint64_t FABRICINIT_DELAY_HW_NS = 1000; // 1us
const uint64_t FABRICINIT_DELAY_SIM_CYCLES = 200;

// ADU Command Register field/bit definitions
// ADU Command Register field definitions
const uint32_t ALTD_CMD_TTYPE_PBOP_EN_ALL = 0x3F;
const uint32_t ALTD_CMD_TSIZE_PBOP_EN_ALL = 0x0B;
const uint32_t ALTD_CMD_SCOPE_GROUP = 0x3;

// ADU Status Register field/bit definitions
// ADU Status Register field definitions
const uint32_t ALTD_STATUS_CRESP_ACK_DONE = 0x04;


Expand Down Expand Up @@ -109,8 +108,8 @@ p9_sbe_fabricinit(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target)
PU_PB_CENT_SM0_PB_CENT_HP_MODE_CURR_CFG_XLATE_ADDR_TO_ID_LEN>(l_fbc_xlate_addr_to_id);

l_hp_mode_data.clearBit<PU_PB_CENT_SM0_PB_CENT_HP_MODE_CURR_CFG_PHYP_IS_GROUP>() // PHYP is group
.clearBit<PU_PB_CENT_SM0_PB_CENT_HP_MODE_CURR_CFG_ADDR_BAR>() // large system map
.clearBit<PU_PB_CENT_SM0_PB_CENT_HP_MODE_CURR_CFG_DCACHE_CAPP>(); // disable Dcache CAPP mode
.clearBit<PU_PB_CENT_SM0_PB_CENT_HP_MODE_CURR_CFG_ADDR_BAR>() // large system map
.clearBit<PU_PB_CENT_SM0_PB_CENT_HP_MODE_CURR_CFG_DCACHE_CAPP>(); // disable Dcache CAPP mode

if (l_pump_mode == fapi2::ENUM_ATTR_PROC_FABRIC_PUMP_MODE_CHIP_IS_NODE) // pump mode
{
Expand Down Expand Up @@ -144,8 +143,7 @@ p9_sbe_fabricinit(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target)
"Error from p9_fbc_utils_get_fbc_state");
FAPI_ASSERT(l_fbc_is_running,
fapi2::P9_SBE_FABRICINIT_FBC_STOPPED_ERR().
set_TARGET(i_target).
set_FBC_RUNNING(l_fbc_is_running),
set_TARGET(i_target),
"Pervasive stop control is asserted, so fabricinit will not run!");

// write ADU Command Register to attempt lock acquisition
Expand Down Expand Up @@ -189,8 +187,8 @@ p9_sbe_fabricinit(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target)
(ALTD_STATUS_CRESP_ACK_DONE);

FAPI_ASSERT(l_status_data_exp == l_status_data_act,
fapi2::P9_SBE_FABRICINIT_FAILED_ERR().set_TARGET(i_target).
set_ADU_STATUS_EXP(l_status_data_act).
fapi2::P9_SBE_FABRICINIT_FAILED_ERR().
set_TARGET(i_target).
set_ADU_STATUS_ACT(l_status_data_act),
"Fabric init failed, or mismatch in expected ADU status!");

Expand All @@ -206,9 +204,7 @@ p9_sbe_fabricinit(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target)
"Error from p9_fbc_utils_get_fbc_state");
FAPI_ASSERT(l_fbc_is_initialized && l_fbc_is_running,
fapi2::P9_SBE_FABRICINIT_NO_INIT_ERR().
set_TARGET(i_target).
set_FBC_INITIALIZED(l_fbc_is_initialized).
set_FBC_RUNNING(l_fbc_is_running),
set_TARGET(i_target),
"ADU command succeded, but fabric was not cleanly initialized!");

fapi_try_exit:
Expand Down
5 changes: 2 additions & 3 deletions src/import/chips/p9/procedures/hwp/nest/p9_sbe_fabricinit.H
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 @@ -60,14 +60,13 @@
/// - Confirm state of fabric init control
///
/// @author Joe McGill <jmcgill@us.ibm.com>
/// @author Christy Graves <clgraves@us.ibm.com>
///

//
// *HWP HWP Owner: Joe McGill <jmcgill@us.ibm.com>
// *HWP FW Owner: Thi Tran <thi@us.ibm.com>
// *HWP Team: Nest
// *HWP Level: 2
// *HWP Level: 3
// *HWP Consumed by: SBE
//

Expand Down
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 @@ -22,8 +22,17 @@
<!-- permissions and limitations under the License. -->
<!-- -->
<!-- IBM_PROLOG_END_TAG -->
<!-- Halt codes for p9_sbe_fabricinit -->
<hwpErrors>
<!-- ******************************************************************** -->
<registerFfdc>
<id>REG_FFDC_SBE_FABRICINIT</id>
<scomRegister>PU_PB_CENT_SM0_PB_CENT_MODE</scomRegister>
<scomRegister>PU_PB_CENT_SM0_PB_CENT_HP_MODE_NEXT</scomRegister>
<scomRegister>PU_PB_CENT_SM0_PB_CENT_HP_MODE_CURR</scomRegister>
<scomRegister>PU_PB_CENT_SM0_PB_CENT_HPX_MODE_NEXT</scomRegister>
<scomRegister>PU_PB_CENT_SM0_PB_CENT_HPX_MODE_CURR</scomRegister>
<scomRegister>PU_SND_MODE_REG</scomRegister>
</registerFfdc>
<!-- ******************************************************************** -->
<hwpError>
<sbeError/>
Expand All @@ -33,7 +42,21 @@
Fabric init sequence not attempted, fabric arbitration is stopped.
</description>
<ffdc>TARGET</ffdc>
<ffdc>FBC_RUNNING</ffdc>
<collectRegisterFfdc>
<id>REG_FFDC_SBE_FABRICINIT</id>
<targetType>TARGET_TYPE_PROC_CHIP</targetType>
<target>TARGET</target>
</collectRegisterFfdc>
<callout>
<target>TARGET</target>
<priority>HIGH</priority>
</callout>
<deconfigure>
<target>TARGET</target>
</deconfigure>
<gard>
<target>TARGET</target>
</gard>
</hwpError>
<!-- ******************************************************************** -->
<hwpError>
Expand All @@ -44,8 +67,22 @@
Fabric init failed, or mismatch in expected ADU status.
</description>
<ffdc>TARGET</ffdc>
<ffdc>ADU_STATUS_EXP</ffdc>
<ffdc>ADU_STATUS_ACT</ffdc>
<collectRegisterFfdc>
<id>REG_FFDC_SBE_FABRICINIT</id>
<targetType>TARGET_TYPE_PROC_CHIP</targetType>
<target>TARGET</target>
</collectRegisterFfdc>
<callout>
<target>TARGET</target>
<priority>HIGH</priority>
</callout>
<deconfigure>
<target>TARGET</target>
</deconfigure>
<gard>
<target>TARGET</target>
</gard>
</hwpError>
<!-- ******************************************************************** -->
<hwpError>
Expand All @@ -56,8 +93,21 @@
ADU operation completed successfully, but fabric was not initialized.
</description>
<ffdc>TARGET</ffdc>
<ffdc>FBC_INITIALIZED</ffdc>
<ffdc>FBC_RUNNING</ffdc>
<collectRegisterFfdc>
<id>REG_FFDC_SBE_FABRICINIT</id>
<targetType>TARGET_TYPE_PROC_CHIP</targetType>
<target>TARGET</target>
</collectRegisterFfdc>
<callout>
<target>TARGET</target>
<priority>HIGH</priority>
</callout>
<deconfigure>
<target>TARGET</target>
</deconfigure>
<gard>
<target>TARGET</target>
</gard>
</hwpError>
<!-- ******************************************************************** -->
</hwpErrors>

0 comments on commit 9ee125f

Please sign in to comment.