From 5ed2437d9ecf5b33050accdd5e1708d9fc0f5084 Mon Sep 17 00:00:00 2001 From: Prem Shanker Jha Date: Tue, 15 May 2018 11:01:53 -0500 Subject: SplWkup: Fixed issue in FFDC collection in case of special wakeup timeout. Commit fixes corruption of current error in case of special wakeup timeout. Due to use of a FAPI_TRY at the begining of HWP, in FFDC path, due to recurssion, current error get reset. As a result, callback procedures crash. CQ: SW427695 Change-Id: Ic33bea5422f69400a8eb6e825fd359a475bd91b2 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/58844 Tested-by: FSP CI Jenkins Tested-by: Jenkins Server Tested-by: HWSV CI Tested-by: Hostboot CI Reviewed-by: RANGANATHPRASAD G. BRAHMASAMUDRA Reviewed-by: Gregory S. Still Reviewed-by: Richard J. Knight Reviewed-by: Jennifer A. Stofer Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/58853 Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Reviewed-by: Daniel M. Crowell --- .../chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_core.C | 8 +++++++- .../chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_eq.C | 8 +++++++- .../chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_ex.C | 11 +++++++++-- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_core.C b/src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_core.C index 4f365c3d9..155568414 100644 --- a/src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_core.C +++ b/src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_core.C @@ -69,7 +69,6 @@ fapi2::ReturnCode p9_cpu_special_wakeup_core( auto l_exTarget = i_target.getParent(); auto l_eqTarget = i_target.getParent(); auto l_procChip = i_target.getParent(); - FAPI_TRY( getScom( l_procChip, PU_OCB_OCI_OCCFLG_SCOM, l_sgpeActive ) ); FAPI_ATTR_GET( fapi2::ATTR_CHIP_UNIT_POS, i_target, l_corePos ); FAPI_ATTR_GET( fapi2::ATTR_CORE_INSIDE_SPECIAL_WAKEUP, @@ -89,6 +88,13 @@ fapi2::ReturnCode p9_cpu_special_wakeup_core( } p9specialWakeup::blockWakeupRecurssion( l_eqTarget, p9specialWakeup::BLOCK ); + l_rc = getScom( l_procChip, PU_OCB_OCI_OCCFLG_SCOM, l_sgpeActive ); + + if( l_rc ) + { + FAPI_ERR( "Failed To Read OCC Flag Register" ); + return l_rc; + } //Special wakeup request can't be serviced if //SGPE did not boot and auto-special wakeup is not enabled. diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_eq.C b/src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_eq.C index 36d15ba2d..16e13f684 100644 --- a/src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_eq.C +++ b/src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_eq.C @@ -67,7 +67,6 @@ fapi2::ReturnCode p9_cpu_special_wakeup_eq( auto l_procChip = i_target.getParent(); FAPI_ATTR_GET( fapi2::ATTR_CHIP_UNIT_POS, i_target, l_eqPos ); - FAPI_TRY( getScom( l_procChip, PU_OCB_OCI_OCCFLG_SCOM, l_sgpeActive ) ); FAPI_ATTR_GET( fapi2::ATTR_EQ_INSIDE_SPECIAL_WAKEUP, i_target, @@ -85,6 +84,13 @@ fapi2::ReturnCode p9_cpu_special_wakeup_eq( } p9specialWakeup::blockWakeupRecurssion( i_target, p9specialWakeup::BLOCK ); + l_rc = getScom( l_procChip, PU_OCB_OCI_OCCFLG_SCOM, l_sgpeActive ); + + if( l_rc ) + { + FAPI_ERR( "Failed To Read OCC Flag Register" ); + return l_rc; + } //Special wakeup request can't be serviced if //SGPE did not boot. diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_ex.C b/src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_ex.C index bf063ace0..05e870e5b 100644 --- a/src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_ex.C +++ b/src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_ex.C @@ -66,9 +66,8 @@ fapi2::ReturnCode p9_cpu_special_wakeup_ex( uint8_t l_spWakeUpInProg = 0; auto l_eqTarget = i_target.getParent(); auto l_procChip = i_target.getParent(); - FAPI_ATTR_GET( fapi2::ATTR_CHIP_UNIT_POS, i_target, l_exPos ); - FAPI_TRY( getScom( l_procChip, PU_OCB_OCI_OCCFLG_SCOM, l_sgpeActive ) ); + FAPI_ATTR_GET( fapi2::ATTR_CHIP_UNIT_POS, i_target, l_exPos ); FAPI_ATTR_GET( fapi2::ATTR_EX_INSIDE_SPECIAL_WAKEUP, i_target, l_spWakeUpInProg ); @@ -86,6 +85,14 @@ fapi2::ReturnCode p9_cpu_special_wakeup_ex( p9specialWakeup::blockWakeupRecurssion( l_eqTarget, p9specialWakeup::BLOCK ); + l_rc = getScom( l_procChip, PU_OCB_OCI_OCCFLG_SCOM, l_sgpeActive ); + + if( l_rc ) + { + FAPI_ERR( "Failed To Read OCC Flag Register" ); + return l_rc; + } + //Special wakeup request can't be serviced if //SGPE did not boot auto Special wakeup not enabled if( !l_sgpeActive.getBit( SGPE_ACTIVE_BIT ) ) -- cgit v1.2.1