diff options
author | Brian Vanderpool <vanderp@us.ibm.com> | 2016-05-27 11:19:14 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2016-08-01 11:48:23 -0400 |
commit | 0c53f5659ddcd5192b40fad83a48c72183b78223 (patch) | |
tree | 401aef3949fa52fa99e25ff5c5ef6d5728c6c051 /src/import/chips/p9/procedures/hwp/pm | |
parent | e3a591a323b938e184e35b249f997a68e0fab567 (diff) | |
download | talos-hostboot-0c53f5659ddcd5192b40fad83a48c72183b78223.tar.gz talos-hostboot-0c53f5659ddcd5192b40fad83a48c72183b78223.zip |
L1 Delivery for p9_query_stop_state
Change-Id: I0cf62797d739300ce1a82843f95543c21ce9f625
Original-Change-Id: If722c35ad40eb1979d2d885b129eb3e6ea688385
RTC:154780
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/25125
Tested-by: Jenkins Server
Tested-by: Hostboot CI
Reviewed-by: AMIT J. TENDOLKAR <amit.tendolkar@in.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: NAGENDRA K. GURRAM <nagendra.g@in.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/27572
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Diffstat (limited to 'src/import/chips/p9/procedures/hwp/pm')
3 files changed, 201 insertions, 0 deletions
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 new file mode 100644 index 000000000..2f6bdfbf5 --- /dev/null +++ b/src/import/chips/p9/procedures/hwp/pm/p9_query_stop_state.C @@ -0,0 +1,98 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: chips/p9/procedures/hwp/pm/p9_query_stop_state.C $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* EKB Project */ +/* */ +/* COPYRIGHT 2015,2016 */ +/* [+] International Business Machines Corp. */ +/* */ +/* */ +/* The source code for this program is not published or otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* IBM_PROLOG_END_TAG */ +/// +/// @file p9_query_stop_state.C +/// @brief Determine the state of cores, L2, and L3 of the targeted EX +/// Set ATTRs to know the scommable/scannable state of the logic +/// Further operations in the dump flow will only operate on scommable +/// portions of the targets. FW/Platform is responsible for checking these +/// states before calling HWPs +/// +// *HWP HWP Owner: Brian Vanderpool <vanderp@us.ibm.com> +// *HWP Backup HWP Owner: Greg Still <stillgs@us.ibm.com> +// *HWP FW Owner: Sangeetha T S <sangeet2@in.ibm.com> +// *HWP Team: PM +// *HWP Level: 1 +// *HWP Consumed by: FSP:HS +/// +/// +/// +/// @verbatim +/// High-level procedure flow: +/// - For each EX, check the PPMC stop state history to know the state +/// of the core. Check the PPMQ stop state history to know the state of L2/L3 +/// +/// Set ATTRs to know the scommable/scannable state of the logic +/// L2_IS_SCOMABLE indicates the L2 region has clocks running and scommable +/// L3_IS_SCOMABLE indicates the L3 region has clocks running and scommable +/// C0_EXEC_IS_SCOMABLE indicates the execution units in core 0 have clocks running and scommable +/// C1_EXEC_IS_SCOMABLE indicates the execution units in core 1 have clocks running and scommable +/// C0_PC_IS_SCOMABLE indicates the core pervasive unit in core 0 has clocks running and scommable +/// C1_PC_IS_SCOMABLE indicates the core pervasive unit in core 1 has clocks running and scommable +/// L2_IS_SCANABLE indicates L2 has power and has valid latch state that could be scanned +/// L3_IS_SCANABLE indicates L3 has power and has valid latch state that could be scanned +/// C0_IS_SCANABLE indicates core 0 has power and has valid latch state that could be scanned +/// C1_IS_SCANABLE indicates core 1 has power and has valid latch state that could be scanned +/// @endverbatim +/// +//------------------------------------------------------------------------------ + + +// ---------------------------------------------------------------------- +// Includes +// ---------------------------------------------------------------------- + +#include "p9_query_stop_state.H" + +// ---------------------------------------------------------------------- +// Procedure Function +// ---------------------------------------------------------------------- + +fapi2::ReturnCode +p9_query_stop_state( + const fapi2::Target<fapi2::TARGET_TYPE_EX>& i_ex_target) +{ + + fapi2::buffer<uint8_t> l_data8; + + FAPI_INF("> p9_query_stop_state..."); + + // The list of attributes this procedure will set. + // For level 1 delivery, set them all to 1. + + l_data8 = 1; + + // Is Scomable attributes + FAPI_TRY(FAPI_ATTR_SET(fapi2::ATTR_L2_IS_SCOMABLE, i_ex_target, l_data8)); + FAPI_TRY(FAPI_ATTR_SET(fapi2::ATTR_L3_IS_SCOMABLE, i_ex_target, l_data8)); + FAPI_TRY(FAPI_ATTR_SET(fapi2::ATTR_C0_EXEC_IS_SCOMABLE, i_ex_target, l_data8)); + FAPI_TRY(FAPI_ATTR_SET(fapi2::ATTR_C1_EXEC_IS_SCOMABLE, i_ex_target, l_data8)); + FAPI_TRY(FAPI_ATTR_SET(fapi2::ATTR_C0_PC_IS_SCOMABLE, i_ex_target, l_data8)); + FAPI_TRY(FAPI_ATTR_SET(fapi2::ATTR_C1_PC_IS_SCOMABLE, i_ex_target, l_data8)); + + // Is Scanable attributes + FAPI_TRY(FAPI_ATTR_SET(fapi2::ATTR_L2_IS_SCANABLE, i_ex_target, l_data8)); + FAPI_TRY(FAPI_ATTR_SET(fapi2::ATTR_L3_IS_SCANABLE, i_ex_target, l_data8)); + FAPI_TRY(FAPI_ATTR_SET(fapi2::ATTR_C0_IS_SCANABLE, i_ex_target, l_data8)); + FAPI_TRY(FAPI_ATTR_SET(fapi2::ATTR_C1_IS_SCANABLE, i_ex_target, l_data8)); + +fapi_try_exit: + FAPI_INF("< p9_query_stop_state..."); + return fapi2::current_err; +} diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_query_stop_state.H b/src/import/chips/p9/procedures/hwp/pm/p9_query_stop_state.H new file mode 100644 index 000000000..c69d40567 --- /dev/null +++ b/src/import/chips/p9/procedures/hwp/pm/p9_query_stop_state.H @@ -0,0 +1,83 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: chips/p9/procedures/hwp/pm/p9_query_stop_state.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* EKB Project */ +/* */ +/* COPYRIGHT 2015,2016 */ +/* [+] International Business Machines Corp. */ +/* */ +/* */ +/* The source code for this program is not published or otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* IBM_PROLOG_END_TAG */ + +/// @file p9_query_stop_state.H +/// @brief Determine the state of cores, L2, and L3 of the targeted EX +/// Set ATTRs to know the scommable/scannable state of the logic +/// Further operations in the dump flow will only operate on scommable +/// portions of the targets. FW/Platform is responsible for checking these +/// states before calling HWPs +/// +// *HWP HWP Owner: Brian Vanderpool <vanderp@us.ibm.com> +// *HWP Backup HWP Owner: Greg Still <stillgs@us.ibm.com> +// *HWP FW Owner: Sangeetha T S <sangeet2@in.ibm.com> +// *HWP Team: PM +// *HWP Level: 1 +// *HWP Consumed by: FSP:HS +/// +///----------------------------------------------------------------------------- + +#ifndef _P9_QUERY_STOP_STATE_H_ +#define _P9_QUERY_STOP_STATE_H_ + +//------------------------------------------------------------------------------ +// Includes +//------------------------------------------------------------------------------ + +#include <fapi2.H> + +//------------------------------------------------------------------------------ +// Constant definitions +//------------------------------------------------------------------------------ + +// function pointer typedef definition for HWP call support +typedef fapi2::ReturnCode (*p9_query_stop_state_FP_t) ( + const fapi2::Target<fapi2::TARGET_TYPE_EX>&); + +extern "C" +{ + +//------------------------------------------------------------------------------ +// Function prototype +//------------------------------------------------------------------------------ + +/// @brief Determine the state of cores, L2, and L3 of the targeted EX and set ATTRS +/// +/// @param[in] i_target EX target +/// @attr +/// @attritem ATTR_L2_IS_SCOMABLE - Indicates the L2 region has clocks running and scommable +/// @attritem ATTR_L3_IS_SCOMABLE - Indicates the L3 region has clocks running and scommable +/// @attritem ATTR_C0_EXEC_IS_SCOMABLE - Indicates the execution units in core 0 have clocks running and scommable +/// @attritem ATTR_C1_EXEC_IS_SCOMABLE - Indicates the execution units in core 1 have clocks running and scommable +/// @attritem ATTR_C0_PC_IS_SCOMABLE - Indicates the core pervasive unit in core 0 has clocks running and scommable +/// @attritem ATTR_C1_PC_IS_SCOMABLE - Indicates the core pervasive unit in core 1 has clocks running and scommable +/// @attritem ATTR_L2_IS_SCANABLE - Indicates L2 has power and has valid latch state that could be scanned +/// @attritem ATTR_L3_IS_SCANABLE - Indicates L3 has power and has valid latch state that could be scanned +/// @attritem ATTR_C0_IS_SCANABLE - Indicates core 0 has power and has valid latch state that could be scanned +/// @attritem ATTR_C1_IS_SCANABLE - Indicates core 1 has power and has valid latch state that could be scanned +/// +/// @return FAPI2_RC_SUCCESS if success, else error code. + + fapi2::ReturnCode + p9_query_stop_state( + const fapi2::Target<fapi2::TARGET_TYPE_EX>& i_ex_target); + +} // extern "C" + +#endif // _P9_QUERY_STOP_STATE_H_ diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_query_stop_state.mk b/src/import/chips/p9/procedures/hwp/pm/p9_query_stop_state.mk new file mode 100644 index 000000000..f43c73f6a --- /dev/null +++ b/src/import/chips/p9/procedures/hwp/pm/p9_query_stop_state.mk @@ -0,0 +1,20 @@ +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: chips/p9/procedures/hwp/pm/p9_query_stop_state.mk $ +# +# IBM CONFIDENTIAL +# +# EKB Project +# +# COPYRIGHT 2015,2016 +# [+] International Business Machines Corp. +# +# +# The source code for this program is not published or otherwise +# divested of its trade secrets, irrespective of what has been +# deposited with the U.S. Copyright Office. +# +# IBM_PROLOG_END_TAG +PROCEDURE=p9_query_stop_state +$(call BUILD_PROCEDURE) |