summaryrefslogtreecommitdiffstats
path: root/src/import/chips/p9/procedures/hwp/pm/p9_query_stop_state.H
diff options
context:
space:
mode:
authorPeng Fei GOU <shgoupf@cn.ibm.com>2017-05-12 22:44:25 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-06-11 14:38:58 -0400
commit075b200958f391fab88a229d77f2566c8aa2e8e1 (patch)
treee684d0e74f8aadc60ce1e411bf143f88afb4d0ff /src/import/chips/p9/procedures/hwp/pm/p9_query_stop_state.H
parent46f5876f0858b26b9d041e3abea740d6273a1797 (diff)
downloadtalos-hostboot-075b200958f391fab88a229d77f2566c8aa2e8e1.tar.gz
talos-hostboot-075b200958f391fab88a229d77f2566c8aa2e8e1.zip
fircheck -- Leverage p9_query_stop_state for core PPM status
1) Leverage the Attributes dumped by p9_query_stop_state. 2) Make fir_hierarchy an independent object file. 3) Only use -O0 on fir_hierarchy object. 4) Split p9_query_stop_state to a subroutine which only uses stop_attrs_t as the output, so that fircheck can call it directly wihtout accessing attributes. Change-Id: I0ff59d0add7d97c6b114ff4e2b2e959d6560c9d4 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/40478 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Kevin F. Reick <reick@us.ibm.com> Reviewed-by: Joseph J. McGill <jmcgill@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/40679 Reviewed-by: Hostboot Team <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>
Diffstat (limited to 'src/import/chips/p9/procedures/hwp/pm/p9_query_stop_state.H')
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_query_stop_state.H42
1 files changed, 37 insertions, 5 deletions
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
index 4743a771f..ff25de6df 100644
--- 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
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2016 */
+/* Contributors Listed Below - COPYRIGHT 2016,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -55,17 +55,49 @@
// 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>&);
+// ----------------------------------------------------------------------
+// Data Structure Definitions
+// ----------------------------------------------------------------------
-extern "C"
+typedef struct
{
+ uint8_t l2_hasclocks;
+ uint8_t l3_hasclocks;
+ uint8_t c0_exec_hasclocks; // these could be put in an array, but is broken out since attributes are separate
+ uint8_t c1_exec_hasclocks;
+ uint8_t c0_pc_hasclocks;
+ uint8_t c1_pc_hasclocks;
+
+ uint8_t l2_haspower;
+ uint8_t l3_haspower;
+ uint8_t c0_haspower;
+ uint8_t c1_haspower;
+} stop_attrs_t;
//------------------------------------------------------------------------------
// Function prototype
//------------------------------------------------------------------------------
+/// @brief Determine the state of cores, L2, and L3 of the targeted EX, and
+/// put the results into data structure stop_attrs_t.
+///
+/// @param[in] i_target EX target
+/// @param[out] o_stop_attrs Output data structure to hold the state value.
+///
+/// @return FAPI2_RC_SUCCESS if success, else error code.
+
+fapi2::ReturnCode
+query_stop_state(
+ const fapi2::Target<fapi2::TARGET_TYPE_EX>& i_ex_target,
+ stop_attrs_t& o_stop_attrs);
+
+// 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"
+{
+
/// @brief Determine the state of cores, L2, and L3 of the targeted EX and set ATTRS if powered up and clocking
///
/// @param[in] i_target EX target
OpenPOWER on IntegriCloud