Skip to content

Commit

Permalink
Initf procedure updates for Cumulus
Browse files Browse the repository at this point in the history
Change-Id: Ieba2a677f48c9632e41020b9a48be7375c6eb31a
CQ: SW437518
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/62384
Reviewed-by: Joseph J. McGill <jmcgill@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: SRINIVAS V. POLISETTY <srinivan@in.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/62400
Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
  • Loading branch information
anusrang authored and sgupta2m committed Jul 27, 2018
1 parent a8ae4fa commit aee8470
Show file tree
Hide file tree
Showing 2 changed files with 121 additions and 4 deletions.
66 changes: 63 additions & 3 deletions src/import/chips/p9/procedures/hwp/perv/p9_sbe_gptr_time_initf.C
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER sbe Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2016,2017 */
/* Contributors Listed Below - COPYRIGHT 2016,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -81,6 +81,7 @@ fapi2::ReturnCode p9_sbe_gptr_time_initf(const

}

// mcbist - Nimbus
for (auto& l_chplt_trgt : i_target_chip.getChildren<fapi2::TARGET_TYPE_MCBIST>
(fapi2::TARGET_STATE_FUNCTIONAL))
{
Expand All @@ -96,7 +97,7 @@ fapi2::ReturnCode p9_sbe_gptr_time_initf(const
"Error from putRing (mc_time)");
}

// mcbist0
// mcbist0 - Nimbus
for (auto& l_chplt_trgt : i_target_chip.getChildren<fapi2::TARGET_TYPE_MCBIST>
(fapi2::TARGET_FILTER_MC_WEST, fapi2::TARGET_STATE_FUNCTIONAL))
{
Expand All @@ -115,7 +116,7 @@ fapi2::ReturnCode p9_sbe_gptr_time_initf(const
}
}

// mcbist1
// mcbist1 - Nimbus
for (auto& l_chplt_trgt : i_target_chip.getChildren<fapi2::TARGET_TYPE_MCBIST>
(fapi2::TARGET_FILTER_MC_EAST, fapi2::TARGET_STATE_FUNCTIONAL))
{
Expand All @@ -134,6 +135,65 @@ fapi2::ReturnCode p9_sbe_gptr_time_initf(const
}
}

// mc - Cumulus
for (auto& l_chplt_trgt : i_target_chip.getChildren<fapi2::TARGET_TYPE_MC>
(fapi2::TARGET_STATE_FUNCTIONAL))
{
FAPI_DBG("Scan mc_gptr ring");
FAPI_TRY(fapi2::putRing(l_chplt_trgt, mc_gptr),
"Error from putRing (mc_gptr)");

FAPI_DBG("Scan mc_pll_gptr ring");
FAPI_TRY(fapi2::putRing(l_chplt_trgt, mc_pll_gptr),
"Error from putRing (mc_pll_gptr)");
FAPI_DBG("Scan mc_time ring");
FAPI_TRY(fapi2::putRing(l_chplt_trgt, mc_time),
"Error from putRing (mc_time)");
}

// mc - Cumulus
for (auto& l_chplt_trgt : i_target_chip.getChildren<fapi2::TARGET_TYPE_MC>
(fapi2::TARGET_FILTER_MC_WEST, fapi2::TARGET_STATE_FUNCTIONAL))
{
if ( mc01_iom01)
{
FAPI_DBG("Scan mc_iom01_gptr ring");
FAPI_TRY(fapi2::putRing(l_chplt_trgt, mc_iom01_gptr),
"Error from putRing (mc_iom01_gptr)");
}

if( mc01_iom23 )
{
FAPI_DBG("Scan mc_iom23_gptr ring");
FAPI_TRY(fapi2::putRing(l_chplt_trgt, mc_iom23_gptr),
"Error from putRing (mc_iom23_gptr)");
FAPI_DBG("Scan mc_iom23_time ring");
FAPI_TRY(fapi2::putRing(l_chplt_trgt, mc_iom23_time),
"Error from putRing (mc_iom23_time)");
}
}

// mc - Cumulus
for (auto& l_chplt_trgt : i_target_chip.getChildren<fapi2::TARGET_TYPE_MC>
(fapi2::TARGET_FILTER_MC_EAST, fapi2::TARGET_STATE_FUNCTIONAL))
{
if ( mc23_iom01 )
{
FAPI_DBG("Scan mc_iom01_gptr ring");
FAPI_TRY(fapi2::putRing(l_chplt_trgt, mc_iom01_gptr),
"Error from putRing (mc_iom01_gptr)");
}

if( mc23_iom23 )
{
FAPI_DBG("Scan mc_iom23_gptr ring");
FAPI_TRY(fapi2::putRing(l_chplt_trgt, mc_iom23_gptr),
"Error from putRing (mc_iom23_gptr)");
FAPI_DBG("Scan mc_iom23_time ring");
FAPI_TRY(fapi2::putRing(l_chplt_trgt, mc_iom23_time),
"Error from putRing (mc_iom23_time)");
}
}

for( auto& l_chplt_trgt : i_target_chip.getChildren<fapi2::TARGET_TYPE_PERV>
( fapi2::TARGET_STATE_FUNCTIONAL))
Expand Down
59 changes: 58 additions & 1 deletion src/import/chips/p9/procedures/hwp/perv/p9_sbe_repr_initf.C
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER sbe Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2016,2017 */
/* Contributors Listed Below - COPYRIGHT 2016,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -46,14 +46,71 @@ fapi2::ReturnCode p9_sbe_repr_initf(const
{
uint8_t l_attr_chip_unit_pos = 0;
fapi2::buffer<uint16_t> l_read_attr_pg;
bool mc01_iom23 = false;
bool mc23_iom23 = false;
uint8_t l_read_attr_cumulus_only;

FAPI_INF("p9_sbe_repr_initf: Entering ...");

FAPI_DBG("Reading ATTR_CHIP_EC_FEATURE_P9C_LOGIC_ONLY\n");
FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_CHIP_EC_FEATURE_P9C_LOGIC_ONLY, i_target_chip, l_read_attr_cumulus_only));

for( auto& l_chplt_trgt : i_target_chip.getChildren<fapi2::TARGET_TYPE_PERV>
( fapi2::TARGET_STATE_FUNCTIONAL))
{
FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_CHIP_UNIT_POS, l_chplt_trgt, l_attr_chip_unit_pos));
FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_PG, l_chplt_trgt, l_read_attr_pg));

if((l_attr_chip_unit_pos == MC01_CHIPLET_ID) && (!l_read_attr_pg.getBit<7>()))
{
mc01_iom23 = true;
}

if((l_attr_chip_unit_pos == MC23_CHIPLET_ID) && (!l_read_attr_pg.getBit<7>()))
{
mc23_iom23 = true;
}

}

// mcbist - Nimbus
for (auto& l_chplt_trgt : i_target_chip.getChildren<fapi2::TARGET_TYPE_MCBIST>(fapi2::TARGET_STATE_FUNCTIONAL))
{
FAPI_TRY(fapi2::putRing(l_chplt_trgt, mc_repr));
}

// mc - Cumulus
for (auto& l_chplt_trgt : i_target_chip.getChildren<fapi2::TARGET_TYPE_MC>(fapi2::TARGET_STATE_FUNCTIONAL))
{
FAPI_TRY(fapi2::putRing(l_chplt_trgt, mc_repr));
}

// mc - Cumulus
for (auto& l_chplt_trgt : i_target_chip.getChildren<fapi2::TARGET_TYPE_MC>
(fapi2::TARGET_FILTER_MC_WEST, fapi2::TARGET_STATE_FUNCTIONAL))
{

if( mc01_iom23 && l_read_attr_cumulus_only )
{
FAPI_DBG("Scan mc_iom23_repr ring");
FAPI_TRY(fapi2::putRing(l_chplt_trgt, mc_iom23_repr),
"Error from putRing (mc_iom23_repr)");
}
}

// mc - Cumulus
for (auto& l_chplt_trgt : i_target_chip.getChildren<fapi2::TARGET_TYPE_MC>
(fapi2::TARGET_FILTER_MC_EAST, fapi2::TARGET_STATE_FUNCTIONAL))
{

if( mc23_iom23 && l_read_attr_cumulus_only )
{
FAPI_DBG("Scan mc_iom23_repr ring");
FAPI_TRY(fapi2::putRing(l_chplt_trgt, mc_iom23_repr),
"Error from putRing (mc_iom23_repr)");
}
}

for (auto& l_chplt_trgt : i_target_chip.getChildren<fapi2::TARGET_TYPE_PERV>(fapi2::TARGET_STATE_FUNCTIONAL))
{
FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_CHIP_UNIT_POS, l_chplt_trgt, l_attr_chip_unit_pos));
Expand Down

0 comments on commit aee8470

Please sign in to comment.