summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYue Du <daviddu@us.ibm.com>2017-03-23 11:16:09 -0500
committerSachin Gupta <sgupta2m@in.ibm.com>2017-03-31 01:09:36 -0400
commit399fecf5280d573ce53712e2e9648b9c9b86e036 (patch)
treed21e43844e4eab06733628987e52853c8c1d4c0f
parent7ba97a1cfe20537bfa98e1c9d195c5e0d52236e1 (diff)
downloadtalos-sbe-399fecf5280d573ce53712e2e9648b9c9b86e036.tar.gz
talos-sbe-399fecf5280d573ce53712e2e9648b9c9b86e036.zip
IPL: Change select_ex to use core/eq targets instead of perv
This change has impact to multicast groups Change-Id: I36647ff61a0d52d9dbb8e1fd52b9f1cd0b78f1de Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/38359 Reviewed-by: Michael S. Floyd <mfloyd@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: AMIT KUMAR <akumar3@us.ibm.com> Reviewed-by: ASHISH A. MORE <ashish.more@in.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/38368 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
-rw-r--r--src/import/chips/p9/procedures/hwp/perv/p9_sbe_select_ex.C48
1 files changed, 23 insertions, 25 deletions
diff --git a/src/import/chips/p9/procedures/hwp/perv/p9_sbe_select_ex.C b/src/import/chips/p9/procedures/hwp/perv/p9_sbe_select_ex.C
index 7307cdfd..562843ef 100644
--- a/src/import/chips/p9/procedures/hwp/perv/p9_sbe_select_ex.C
+++ b/src/import/chips/p9/procedures/hwp/perv/p9_sbe_select_ex.C
@@ -140,14 +140,14 @@ static const uint8_t PERV_CORE_COUNT = 24;
// -----------------------------------------------------------------------------
fapi2::ReturnCode select_ex_add_core_to_mc_group(
- const fapi2::Target<fapi2::TARGET_TYPE_PERV>& i_target_cplt);
+ const fapi2::Target<fapi2::TARGET_TYPE_CORE>& i_target_cplt);
fapi2::ReturnCode select_ex_add_ex_to_mc_groups(
- const fapi2::Target<fapi2::TARGET_TYPE_PERV>& i_target_cplt,
+ const fapi2::Target<fapi2::TARGET_TYPE_EQ>& i_target_cplt,
const uint32_t i_ex_num);
fapi2::ReturnCode select_ex_add_eq_to_mc_group(
- const fapi2::Target<fapi2::TARGET_TYPE_PERV>& i_target_cplt);
+ const fapi2::Target<fapi2::TARGET_TYPE_EQ>& i_target_cplt);
fapi2::ReturnCode select_ex_update_mc_group(
const fapi2::Target<fapi2::TARGET_TYPE_PERV>& i_target_cplt,
@@ -177,13 +177,11 @@ fapi2::ReturnCode p9_sbe_select_ex(
uint32_t l_master_eq_num = 0xFF; // invalid EQ number initialized
const fapi2::Target<fapi2::TARGET_TYPE_SYSTEM> FAPI_SYSTEM;
- auto l_core_functional_vector = i_target.getChildren<fapi2::TARGET_TYPE_PERV>
- (fapi2::TARGET_FILTER_ALL_CORES,
- fapi2::TARGET_STATE_FUNCTIONAL );
+ auto l_core_functional_vector = i_target.getChildren<fapi2::TARGET_TYPE_CORE>
+ (fapi2::TARGET_STATE_FUNCTIONAL);
- auto l_eq_functional_vector = i_target.getChildren<fapi2::TARGET_TYPE_PERV>
- (fapi2::TARGET_FILTER_ALL_CACHES,
- fapi2::TARGET_STATE_FUNCTIONAL );
+ auto l_eq_functional_vector = i_target.getChildren<fapi2::TARGET_TYPE_EQ>
+ (fapi2::TARGET_STATE_FUNCTIONAL );
// Read the "FORCE_ALL" attribute
FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_SYS_FORCE_ALL_CORES,
@@ -216,7 +214,7 @@ fapi2::ReturnCode p9_sbe_select_ex(
{
uint8_t l_attr_chip_unit_pos = 0; //actual value is read in FAPI_ATTR_GET below
FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_CHIP_UNIT_POS,
- core,
+ core.getParent<fapi2::TARGET_TYPE_PERV>(),
l_attr_chip_unit_pos));
// Needed as core is a PERV target
@@ -314,7 +312,7 @@ fapi2::ReturnCode p9_sbe_select_ex(
.insertFromRight<0, 4>(p9power::PFET_DELAY_POWERDOWN_CORE)
.insertFromRight<4, 4>(p9power::PFET_DELAY_POWERUP_CORE);
- FAPI_TRY(fapi2::putScom(core,
+ FAPI_TRY(fapi2::putScom(core.getParent<fapi2::TARGET_TYPE_PERV>(),
C_PPM_PFDLY - 0x20000000, // Create chip address base
l_data64),
"Error: Core PFET Delay register");
@@ -326,7 +324,7 @@ fapi2::ReturnCode p9_sbe_select_ex(
{
uint8_t l_attr_chip_unit_pos = 0; //actual value is read in FAPI_ATTR_GET below
FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_CHIP_UNIT_POS,
- eq,
+ eq.getParent<fapi2::TARGET_TYPE_PERV>(),
l_attr_chip_unit_pos));
// Needed as eq is a PERV target
@@ -366,7 +364,7 @@ fapi2::ReturnCode p9_sbe_select_ex(
.insertFromRight<0, 4>(p9power::PFET_DELAY_POWERDOWN_EQ)
.insertFromRight<4, 4>(p9power::PFET_DELAY_POWERUP_EQ);
- FAPI_TRY(fapi2::putScom(eq,
+ FAPI_TRY(fapi2::putScom(eq.getParent<fapi2::TARGET_TYPE_PERV>(),
EQ_PPM_PFDLY - 0x10000000, // Create chip address base
l_data64),
"Error: EQ PFET Delay register, rc 0x%.8X",
@@ -406,14 +404,14 @@ fapi_try_exit:
/// that is a core
/// @return FAPI2_RC_SUCCESS if success, else error code.
fapi2::ReturnCode select_ex_add_core_to_mc_group(
- const fapi2::Target<fapi2::TARGET_TYPE_PERV>& i_target_cplt)
+ const fapi2::Target<fapi2::TARGET_TYPE_CORE>& i_target_cplt)
{
FAPI_INF("> add_to_core_mc_group...");
#ifndef __PPE__
uint8_t l_attr_chip_unit_pos = 0;
FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_CHIP_UNIT_POS,
- i_target_cplt,
+ i_target_cplt.getParent<fapi2::TARGET_TYPE_PERV>(),
l_attr_chip_unit_pos));
FAPI_DBG("Adding Core %d to MC group %d",
@@ -421,7 +419,7 @@ fapi2::ReturnCode select_ex_add_core_to_mc_group(
ALL_CHIPLETS_MC_GROUP );
#endif
- select_ex_update_mc_group(i_target_cplt,
+ select_ex_update_mc_group(i_target_cplt.getParent<fapi2::TARGET_TYPE_PERV>(),
ALL_CHIPLETS_MC_GROUP,
ALL_CHIPLETS_MC_REG);
#ifndef __PPE__
@@ -430,7 +428,7 @@ fapi2::ReturnCode select_ex_add_core_to_mc_group(
ALL_CORES_MC_GROUP );
#endif
- select_ex_update_mc_group(i_target_cplt,
+ select_ex_update_mc_group(i_target_cplt.getParent<fapi2::TARGET_TYPE_PERV>(),
ALL_CORES_MC_GROUP,
ALL_CORES_MC_REG);
@@ -440,7 +438,7 @@ fapi2::ReturnCode select_ex_add_core_to_mc_group(
CORE_STOP_MC_GROUP );
#endif
- select_ex_update_mc_group(i_target_cplt,
+ select_ex_update_mc_group(i_target_cplt.getParent<fapi2::TARGET_TYPE_PERV>(),
CORE_STOP_MC_GROUP,
CORE_MC_REG);
@@ -457,7 +455,7 @@ fapi_try_exit:
///
/// @return FAPI2_RC_SUCCESS if success, else error code.
fapi2::ReturnCode select_ex_add_ex_to_mc_groups(
- const fapi2::Target<fapi2::TARGET_TYPE_PERV>& i_target_cplt,
+ const fapi2::Target<fapi2::TARGET_TYPE_EQ>& i_target_cplt,
const uint32_t i_ex_num)
{
FAPI_INF("> select_ex_add_ex_to_mc_groups...");
@@ -475,7 +473,7 @@ fapi2::ReturnCode select_ex_add_ex_to_mc_groups(
i_ex_num,
EX_ODD_STOP_MC_GROUP);
#endif
- select_ex_update_mc_group(i_target_cplt,
+ select_ex_update_mc_group(i_target_cplt.getParent<fapi2::TARGET_TYPE_PERV>(),
EX_ODD_STOP_MC_GROUP,
EX_ODD_MC_REG);
}
@@ -486,7 +484,7 @@ fapi2::ReturnCode select_ex_add_ex_to_mc_groups(
i_ex_num,
EX_EVEN_STOP_MC_GROUP);
#endif
- select_ex_update_mc_group(i_target_cplt,
+ select_ex_update_mc_group(i_target_cplt.getParent<fapi2::TARGET_TYPE_PERV>(),
EX_EVEN_STOP_MC_GROUP,
EX_EVEN_MC_REG);
}
@@ -501,14 +499,14 @@ fapi2::ReturnCode select_ex_add_ex_to_mc_groups(
///
/// @return FAPI2_RC_SUCCESS if success, else error code.
fapi2::ReturnCode select_ex_add_eq_to_mc_group(
- const fapi2::Target<fapi2::TARGET_TYPE_PERV>& i_target_cplt)
+ const fapi2::Target<fapi2::TARGET_TYPE_EQ>& i_target_cplt)
{
FAPI_INF("> select_ex_add_eq_to_mc_group...");
#ifndef __PPE__
uint8_t l_attr_chip_unit_pos = 0;
FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_CHIP_UNIT_POS,
- i_target_cplt,
+ i_target_cplt.getParent<fapi2::TARGET_TYPE_PERV>(),
l_attr_chip_unit_pos));
FAPI_DBG("Adding EQ %d to MC group %d",
@@ -516,7 +514,7 @@ fapi2::ReturnCode select_ex_add_eq_to_mc_group(
ALL_CHIPLETS_MC_GROUP );
#endif
- select_ex_update_mc_group(i_target_cplt,
+ select_ex_update_mc_group(i_target_cplt.getParent<fapi2::TARGET_TYPE_PERV>(),
ALL_CHIPLETS_MC_GROUP,
ALL_CHIPLETS_MC_REG);
@@ -526,7 +524,7 @@ fapi2::ReturnCode select_ex_add_eq_to_mc_group(
EQ_STOP_MC_GROUP );
#endif
- select_ex_update_mc_group(i_target_cplt,
+ select_ex_update_mc_group(i_target_cplt.getParent<fapi2::TARGET_TYPE_PERV>(),
EQ_STOP_MC_GROUP,
EQ_MC_REG);
OpenPOWER on IntegriCloud