From ab41d473f8b631ba0f9fbdb1d48ffb42421610a3 Mon Sep 17 00:00:00 2001 From: Prem Shanker Jha Date: Wed, 23 Jan 2019 05:20:39 -0600 Subject: PM HWP: Fixed error path bug pertaining to query STOP state. If HWP fails to scom core or cache clock status register, it appropriately initiatlizes the data structs and attributes to correctly reflect the hardware state as known at the point of failure. Key_Cronus_Test=PM_REGRESS Change-Id: I585277fcc475f074a5db45b5aa1f1517e0ca2531 CQ: SW455632 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/70790 Tested-by: FSP CI Jenkins Tested-by: Jenkins Server Tested-by: HWSV CI Tested-by: Cronus HW CI Tested-by: Hostboot CI Reviewed-by: RANGANATHPRASAD G. BRAHMASAMUDRA Reviewed-by: Gregory S. Still Reviewed-by: Jennifer A. Stofer Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/70812 Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Reviewed-by: Daniel M. Crowell --- .../p9/procedures/hwp/pm/p9_query_stop_state.C | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'src/import/chips/p9/procedures/hwp') diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_query_stop_state.C b/src/import/chips/p9/procedures/hwp/pm/p9_query_stop_state.C index 72c4e4ec4..74aeae26d 100755 --- a/src/import/chips/p9/procedures/hwp/pm/p9_query_stop_state.C +++ b/src/import/chips/p9/procedures/hwp/pm/p9_query_stop_state.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016,2018 */ +/* Contributors Listed Below - COPYRIGHT 2016,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -369,12 +369,12 @@ query_stop_state( FAPI_INF( "Failed to read EQ_CLOCK_STAT_SL" ); //We can't determine L2 and L3 clock state. So, let us prevent //read from ex in question to prevent any further error. - l_clk_pfet.l2_hasclocks = 0; - l_clk_pfet.l3_hasclocks = 0; - l_clk_pfet.c_exec_hasclocks[0] = 0; - l_clk_pfet.c_exec_hasclocks[1] = 0; - l_clk_pfet.c_pc_hasclocks[0] = 0; - l_clk_pfet.c_pc_hasclocks[1] = 0; + o_stop_attrs.l2_hasclocks = 0; + o_stop_attrs.l3_hasclocks = 0; + o_stop_attrs.c0_exec_hasclocks = 0; + o_stop_attrs.c1_exec_hasclocks = 0; + o_stop_attrs.c0_pc_hasclocks = 0; + o_stop_attrs.c1_pc_hasclocks = 0; fapi2::current_err = fapi2::RC_QUAD_CLOCK_STATUS_READ_FAIL; goto fapi_try_exit; } @@ -408,9 +408,11 @@ query_stop_state( if( l_tempRc ) { FAPI_INF( "Error reading data from C_CLOCK_STAT_SL" ); - l_clk_pfet.c_exec_hasclocks[l_pos] = 0; - l_clk_pfet.c_pc_hasclocks[l_pos] = 0; - fapi2::current_err = fapi2::RC_CORE_CLOCK_STATUS_READ_FAIL; + o_stop_attrs.c0_exec_hasclocks = 0; + o_stop_attrs.c1_exec_hasclocks = 0; + o_stop_attrs.c0_pc_hasclocks = 0; + o_stop_attrs.c1_pc_hasclocks = 0; + fapi2::current_err = fapi2::RC_CORE_CLOCK_STATUS_READ_FAIL; goto fapi_try_exit; } -- cgit v1.2.1