From b0ebbd785a2357f2be093178c92bc9b59cd3530b Mon Sep 17 00:00:00 2001 From: crgeddes Date: Wed, 24 May 2017 13:24:59 -0500 Subject: Reapply "Use query_cache_access_state to verify EQ scomable in.." In corequad_init we cannot rely on hwas states because targets are not always scommable even though they are functional. This adds a check to ensure a ex is scommable before we attempt to scom it. This had to be removed because we were incorrectly querying the core EQ state. That issue is now resolved Change-Id: I4a3c516b5063e1a898f2ebe7f0da68cfb965b737 CQ: SW388687 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/40927 Tested-by: Jenkins Server Tested-by: Hostboot CI Reviewed-by: Martin Gloff Reviewed-by: Gregory S. Still Reviewed-by: Jennifer A. Stofer Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/40934 Reviewed-by: Hostboot Team Reviewed-by: Christian R. Geddes Tested-by: Christian R. Geddes --- .../p9/procedures/hwp/pm/p9_pm_corequad_init.C | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src') diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_corequad_init.C b/src/import/chips/p9/procedures/hwp/pm/p9_pm_corequad_init.C index d80ed81ea..afe7e3544 100644 --- a/src/import/chips/p9/procedures/hwp/pm/p9_pm_corequad_init.C +++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_corequad_init.C @@ -74,6 +74,7 @@ // Includes // ----------------------------------------------------------------------------- #include +#include // ----------------------------------------------------------------------------- // Constant definitions @@ -339,11 +340,16 @@ fapi2::ReturnCode pm_corequad_reset( FAPI_IMP("Entering pm_corequad_reset..."); fapi2::buffer l_data64; + fapi2::ReturnCode l_rc; uint8_t l_chpltNumber = 0; uint64_t l_address = 0; uint32_t l_errMask = 0; uint32_t l_firMask = 0; uint32_t l_pollCount = 20; + bool l_l2_is_scanable = false; + bool l_l3_is_scanable = false; + bool l_l2_is_scomable = false; + bool l_l3_is_scomable = false; auto l_eqChiplets = i_target.getChildren (fapi2::TARGET_STATE_FUNCTIONAL); @@ -392,6 +398,21 @@ fapi2::ReturnCode pm_corequad_reset( FAPI_TRY(fapi2::putScom(l_quad_chplt, l_address, l_data64), "ERROR: Failed to clear QUAD PPM ERROR"); + //Cannot always rely on HWAS state, during MPIPL attr are not + //accurate, must use query_cache_access state prior to scomming + //ex targets + FAPI_EXEC_HWP(l_rc, p9_query_cache_access_state, l_quad_chplt, + l_l2_is_scomable, l_l2_is_scanable, + l_l3_is_scomable, l_l3_is_scanable); + FAPI_TRY(l_rc, "ERROR: failed to query cache access state for EQ %d", + l_chpltNumber); + + if(!l_l3_is_scomable) + { + //Skip all of the scoms for this EQ if its not scommable + continue; + } + auto l_exChiplets = l_quad_chplt.getChildren (fapi2::TARGET_STATE_FUNCTIONAL); -- cgit v1.2.3