Skip to content

Commit

Permalink
Add configuration error checking before starting SGPE
Browse files Browse the repository at this point in the history
Change-Id: I4cfa93c8854e971d7f391a37071c699402c550f4
RTC: 173585
CQ: SW386570
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/40770
Reviewed-by: Gregory S. Still <stillgs@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Juan R. Medina <jrmedina@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/40778
Reviewed-by: Hostboot Team <hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
  • Loading branch information
vanderp authored and dcrowell77 committed May 25, 2017
1 parent 8461f51 commit 788c469
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 0 deletions.
43 changes: 43 additions & 0 deletions src/import/chips/p9/procedures/hwp/pm/p9_pm_stop_gpe_init.C
Expand Up @@ -131,6 +131,49 @@ fapi2::ReturnCode p9_pm_stop_gpe_init(
fusedModeState),
"Error from FAPI_ATTR_GET for attribute ATTR_FUSED_CORE_MODE");

// Check each core has a functional EX and EQ
auto l_functional_core_vector =
i_target.getChildren<fapi2::TARGET_TYPE_CORE>
(fapi2::TARGET_STATE_FUNCTIONAL);

for(auto l_core_trgt : l_functional_core_vector)
{
auto l_ex_trgt = l_core_trgt.getParent<fapi2::TARGET_TYPE_EX>();
FAPI_ASSERT(l_ex_trgt.isFunctional() == true,
fapi2::STOP_GPE_INVALID_CORE_EX_CONFIG()
.set_CORE(l_core_trgt)
.set_EX(l_ex_trgt)
.set_CHIP(i_target),
"Invalid Config - good core without functional EX");

auto l_eq_trgt = l_core_trgt.getParent<fapi2::TARGET_TYPE_EQ>();
FAPI_ASSERT(l_eq_trgt.isFunctional() == true,
fapi2::STOP_GPE_INVALID_CORE_EQ_CONFIG()
.set_CORE(l_core_trgt)
.set_EQ(l_eq_trgt)
.set_CHIP(i_target),
"Invalid Config - good core without functional EQ");
}

// Check each functional EX has at least one functional core
auto l_functional_ex_vector =
i_target.getChildren<fapi2::TARGET_TYPE_EX>
(fapi2::TARGET_STATE_FUNCTIONAL);

for(auto l_ex_trgt : l_functional_ex_vector)
{
auto l_functional_core_vector = l_ex_trgt.getChildren<fapi2::TARGET_TYPE_CORE>
(fapi2::TARGET_STATE_FUNCTIONAL);
FAPI_ASSERT(l_functional_core_vector.empty() == false,
fapi2::STOP_GPE_INVALID_EX_CORE_CONFIG()
.set_EX(l_ex_trgt)
.set_CHIP(i_target),
"Invalid Config - good EX without any functional cores");
}




//Additional settings for fused mode
if (fusedModeState == 1)
{
Expand Down
Expand Up @@ -107,4 +107,43 @@
</collectRegisterFfdc>
</hwpError>
<!-- ******************************************************************** -->
<hwpError>
<rc>RC_STOP_GPE_INVALID_CORE_EX_CONFIG</rc>
<description> Invalid configuration of good core and bad EX detected
</description>
<ffdc>CORE</ffdc>
<ffdc>EX</ffdc>
<collectRegisterFfdc>
<id>SGPE_FFDC_REGISTERS</id>
<target>CHIP</target>
<targetType>TARGET_TYPE_PROC_CHIP</targetType>
</collectRegisterFfdc>
</hwpError>
<!-- ******************************************************************** -->
<hwpError>
<rc>RC_STOP_GPE_INVALID_CORE_EQ_CONFIG</rc>
<description> Invalid configuration of good core and bad EQ detected
</description>
<ffdc>CORE</ffdc>
<ffdc>EQ</ffdc>
<collectRegisterFfdc>
<id>SGPE_FFDC_REGISTERS</id>
<target>CHIP</target>
<targetType>TARGET_TYPE_PROC_CHIP</targetType>
</collectRegisterFfdc>
</hwpError>
<!-- ******************************************************************** -->
<hwpError>
<rc>RC_STOP_GPE_INVALID_EX_CORE_CONFIG</rc>
<description> Invalid configuration of good EX and no functional cores detected
</description>
<ffdc>EX</ffdc>
<collectRegisterFfdc>
<id>SGPE_FFDC_REGISTERS</id>
<target>CHIP</target>
<targetType>TARGET_TYPE_PROC_CHIP</targetType>
</collectRegisterFfdc>
</hwpError>
<!-- ******************************************************************** -->

</hwpErrors>

0 comments on commit 788c469

Please sign in to comment.