summaryrefslogtreecommitdiffstats
path: root/src/import
diff options
context:
space:
mode:
authorPrem Shanker Jha <premjha2@in.ibm.com>2017-05-18 05:28:05 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-08-18 10:19:30 -0400
commit8709c1f2823e69ae8315967d5bc2f34646e90354 (patch)
treedccd2474eb56b1e4004fd220e5142dd3a7b798ea /src/import
parent1f8706f0f7ad7c0db7113e3f68b594244804ab0f (diff)
downloadtalos-hostboot-8709c1f2823e69ae8315967d5bc2f34646e90354.tar.gz
talos-hostboot-8709c1f2823e69ae8315967d5bc2f34646e90354.zip
PM: Level3 Special Wakeup Hardware Procedure
- Separate RC for Core, EQ and Ex Special Wakeup timeout. - Preventing special wakeup recurssion in FFDC collection path. - Update of documentation and error xml. - Added support of mode in p9_collect_ppe_state HWP. Change-Id: If4885cde4bf3501052e0b4b036a4a27e5561f1dc RTC: 172628 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/40693 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: AMIT J. TENDOLKAR <amit.tendolkar@in.ibm.com> Reviewed-by: Gregory S. Still <stillgs@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/42268 Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Tested-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/import')
-rw-r--r--src/import/chips/p9/procedures/hwp/ffdc/p9_collect_ppe_state.C4
-rw-r--r--src/import/chips/p9/procedures/hwp/ffdc/p9_collect_ppe_state.H3
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup.mk3
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_core.C122
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_core.mk2
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_eq.C130
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_eq.mk2
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_ex.C158
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_ex.mk2
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_lib.C33
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_lib.H98
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_lib.mk4
-rw-r--r--src/import/chips/p9/procedures/xml/attribute_info/pm_hwp_attributes.xml45
-rw-r--r--src/import/chips/p9/procedures/xml/error_info/p9_collect_ppe_state_sample.xml3
-rw-r--r--src/import/chips/p9/procedures/xml/error_info/p9_cpu_special_wakeup_errors.xml139
-rw-r--r--src/import/chips/p9/procedures/xml/error_info/p9_pm_registers.xml1
-rw-r--r--src/import/hwpf/fapi2/xml/attribute_info/hb_temp_defaults.xml18
17 files changed, 683 insertions, 84 deletions
diff --git a/src/import/chips/p9/procedures/hwp/ffdc/p9_collect_ppe_state.C b/src/import/chips/p9/procedures/hwp/ffdc/p9_collect_ppe_state.C
index 194e00d34..fde990ae2 100644
--- a/src/import/chips/p9/procedures/hwp/ffdc/p9_collect_ppe_state.C
+++ b/src/import/chips/p9/procedures/hwp/ffdc/p9_collect_ppe_state.C
@@ -44,6 +44,7 @@ extern "C"
{
fapi2::ReturnCode
p9_collect_ppe_state ( const fapi2::ffdc_t& i_target,
+ const fapi2::ffdc_t& i_mode,
const fapi2::ffdc_t& i_v_ppe_addresses,
fapi2::ReturnCode& o_rc )
{
@@ -61,8 +62,7 @@ extern "C"
*(reinterpret_cast<const std::vector<uint64_t>*>
(i_v_ppe_addresses.ptr()));
-
- PPE_DUMP_MODE l_mode = SNAPSHOT; // halt & restart PPE engine, if needed
+ const PPE_DUMP_MODE l_mode = *(reinterpret_cast<const PPE_DUMP_MODE*>(i_mode.ptr()));
std::vector<PPERegValue_t> l_v_sprs;
std::vector<PPERegValue_t> l_v_xirs;
diff --git a/src/import/chips/p9/procedures/hwp/ffdc/p9_collect_ppe_state.H b/src/import/chips/p9/procedures/hwp/ffdc/p9_collect_ppe_state.H
index 109d3929f..c0fe41b34 100644
--- a/src/import/chips/p9/procedures/hwp/ffdc/p9_collect_ppe_state.H
+++ b/src/import/chips/p9/procedures/hwp/ffdc/p9_collect_ppe_state.H
@@ -48,6 +48,7 @@
typedef fapi2::ReturnCode (*p9_collect_ppe_state_FP_t) (
const fapi2::ffdc_t&,
const fapi2::ffdc_t&,
+ const fapi2::ffdc_t&,
fapi2::ReturnCode&
);
@@ -60,12 +61,14 @@ extern "C"
/// @brief HWP to collect PPE internal register (SPRs, XIRs and GPRs) state as
/// FFDC associated to the input ReturnCode object
/// @param [in] i_target TARGET_TYPE_PROC_CHIP
+/// @param [in] i_dumpMode refer to PPE_DUMP_MODE in p9_ppe_utils.H
/// @param [in] i_v_ppe_addresses Vector of addresses of PPEs, whose states
/// are to be collected. See p9_ppe_defs.H
/// @param[out] io_rc Return code to add FFDC data to
/// @return FAPI2_RC_SUCCESS Always succeeds
fapi2::ReturnCode
p9_collect_ppe_state ( const fapi2::ffdc_t& i_target,
+ const fapi2::ffdc_t& i_mode,
const fapi2::ffdc_t& i_v_ppe_addresses,
fapi2::ReturnCode& io_rc );
diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup.mk b/src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup.mk
index 29b549333..111aa666d 100644
--- a/src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup.mk
+++ b/src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup.mk
@@ -5,7 +5,7 @@
#
# OpenPOWER HostBoot Project
#
-# Contributors Listed Below - COPYRIGHT 2016
+# Contributors Listed Below - COPYRIGHT 2016,2017
# [+] International Business Machines Corp.
#
#
@@ -23,4 +23,5 @@
#
# IBM_PROLOG_END_TAG
PROCEDURE=p9_cpu_special_wakeup
+WAKEUP_UTIL+=$(ROOTPATH)/
$(call BUILD_PROCEDURE)
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 bdaade361..80fd89287 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
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2016 */
+/* Contributors Listed Below - COPYRIGHT 2016,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -30,7 +30,7 @@
// *HWP HW Owner : Greg Still <stillgs@us.ibm.com>
// *HWP FW Owner : Prem S Jha <premjha2@in.ibm.com>
// *HWP Team : PM
-// *HWP Level : 2
+// *HWP Level : 3
// *HWP Consumed by : OCC:FSP:HOST:CRO
// -----------------------------------------------------------------------------
@@ -38,29 +38,121 @@
// -----------------------------------------------------------------------------
#include <p9_cpu_special_wakeup.H>
#include <p9_cpu_special_wakeup_lib.H>
+#include <p9_ppe_defs.H>
+#include <p9_ppe_utils.H>
+
+fapi2::ReturnCode collectCoreTimeoutFailInfo( const fapi2::Target < fapi2::TARGET_TYPE_CORE>& i_target,
+ ProcessingValues_t i_processing_info );
/// ----------------------------------------------------------------------------
///
-/// @brief Sets a normal core chiplet into special wakeup state.
+/// @brief Sets a normal core chiplet into special wakeup state.
+/// @param[in] i_target core target
+/// @param[in] i_operation Special Wakeup Operation i.e. assert or deassert
+/// @param[in] i_entity entity to be considered for special wakeup.
+/// @return fapi2 return code.
///
fapi2::ReturnCode p9_cpu_special_wakeup_core(
const fapi2::Target < fapi2::TARGET_TYPE_CORE>& i_target,
const p9specialWakeup::PROC_SPCWKUP_OPS i_operation,
const p9specialWakeup::PROC_SPCWKUP_ENTITY i_entity )
{
- FAPI_DBG("> p9_cpu_special_wakeup_core");
- FAPI_TRY(_special_wakeup<fapi2::TARGET_TYPE_CORE> (
- i_target,
- i_operation,
- i_entity ));
-
-fapi_try_exit:
- FAPI_INF("< p9_cpu_special_wakeup_core" );
+ FAPI_INF(">> p9_cpu_special_wakeup_core");
+ fapi2::ReturnCode l_rc;
+ uint8_t l_spWakeUpInProg = 0;
+ ProcessingValues_t l_processing_info;
+ auto l_eqTarget = i_target.getParent<fapi2::TARGET_TYPE_EQ>();
+
+ FAPI_ATTR_GET( fapi2::ATTR_CORE_INSIDE_SPECIAL_WAKEUP,
+ i_target,
+ l_spWakeUpInProg );
+
+ // A special wakeup is already in progress. In all likelyhood, a special
+ // wakeup has timed out and we are in FFDC collection path. During this
+ // FFDC collection, we SCOMed a register which itself needs a special
+ // wakeup.
+
+ if( l_spWakeUpInProg )
+ {
+ FAPI_INF("exiting core recurssion");
+ return fapi2::FAPI2_RC_SUCCESS;
+ }
+
+ p9specialWakeup::blockWakeupRecurssion( l_eqTarget, p9specialWakeup::BLOCK );
+
+ l_rc = _special_wakeup<fapi2::TARGET_TYPE_CORE> (
+ i_target,
+ i_operation,
+ i_entity,
+ l_processing_info );
+
+ if( l_rc == (uint32_t)fapi2::RC_INTERNAL_SPCWKUP_TIMEOUT )
+ {
+ collectCoreTimeoutFailInfo( i_target, l_processing_info );
+ }
+
+ p9specialWakeup::blockWakeupRecurssion( l_eqTarget, p9specialWakeup::UNBLOCK );
+
+ FAPI_INF("<< p9_cpu_special_wakeup_core" );
return fapi2::current_err;
}
// -----------------------------------------------------------------------------
+///
+/// @brief Collect FFDC for EQ Special Wakeup timeout
+/// @param[in] i_target core target
+/// @param[in] i_operation info pertaining to special wakeup
+/// @return fapi2 return code.
+///
+fapi2::ReturnCode collectCoreTimeoutFailInfo( const fapi2::Target < fapi2::TARGET_TYPE_CORE>& i_target,
+ ProcessingValues_t i_processing_info )
+{
+ FAPI_INF(">> collectCoreTimeoutFailInfo" );
+ fapi2::buffer<uint64_t> l_CPMMR;
+ fapi2::buffer<uint64_t> l_GPMMR;
+ fapi2::buffer<uint64_t> l_spWakeupRegVal;
+ fapi2::buffer<uint64_t> l_histRegVal;
+
+ fapi2::getScom( i_target, C_CPPM_CPMMR, l_CPMMR );
+ fapi2::getScom( i_target, C_PPM_GPMMR_SCOM, l_GPMMR );
+ fapi2::getScom( i_target, i_processing_info.spwkup_address[0], l_spWakeupRegVal );
+ fapi2::getScom( i_target, i_processing_info.history_address[0], l_histRegVal );
+ fapi2::Target < fapi2::TARGET_TYPE_EX> parentExTgt = i_target.getParent <fapi2::TARGET_TYPE_EX>();
+ uint8_t l_exPos = 0;
+ FAPI_ATTR_GET( fapi2::ATTR_CHIP_UNIT_POS, parentExTgt, l_exPos );
+
+ std::vector<uint64_t> l_cmeBaseAddress;
+ std::vector<uint64_t> l_sgpeBaseAddress;
+ l_sgpeBaseAddress.push_back( SGPE_BASE_ADDRESS );
+ l_cmeBaseAddress.push_back( getCmeBaseAddress( l_exPos ) );
+
+ FAPI_ASSERT( false ,
+ fapi2::SPCWKUP_CORE_TIMEOUT().
+ set_POLLCOUNT( i_processing_info.poll_count ).
+ set_SP_WKUP_REG_VALUE( l_spWakeupRegVal ).
+ set_HISTORY_VALUE( l_histRegVal ).
+ set_ENTITY( i_processing_info.entity ).
+ set_CPMMR( l_CPMMR ).
+ set_GPMMR( l_GPMMR ).
+ set_EQ_TARGET( i_target.getParent <fapi2::TARGET_TYPE_EQ>() ).
+ set_EX_TARGET( parentExTgt ).
+ set_CORE_TARGET( i_target ).
+ set_PROC_CHIP_TARGET( i_processing_info.procTgt ).
+ set_CME_BASE_ADDRESS( l_cmeBaseAddress ).
+ set_SGPE_BASE_ADDRESS( l_sgpeBaseAddress ).
+ set_CME_STATE_MODE( SNAPSHOT ).
+ set_SGPE_STATE_MODE( XIRS ),
+ "Timed Out In Setting Core Special Wakeup");
+fapi_try_exit:
+ FAPI_INF("<< collectCoreTimeoutFailInfo" );
+ return fapi2::current_err;
+}
+// -----------------------------------------------------------------------------
+/// @param[in] i_chipletTarget core target
+/// @param[in] i_processing_info struct storing processing info
+/// @param[in] i_msgId Id pertaining to debug message string.
+/// @return fapi2 return code.
fapi2::ReturnCode spwkup_deassert( const fapi2::Target<fapi2::TARGET_TYPE_CORE>& i_chipletTarget,
const ProcessingValues_t i_processing_info,
p9specialWakeup::SpecialWakeUpMsg i_msgId )
@@ -78,13 +170,17 @@ fapi_try_exit:
// -----------------------------------------------------------------------------
///
/// @brief Set addresses for a core target type
+/// @param[in] i_target core target
+/// @param[in] i_structure struct storing processing info
+/// @param[in] i_entity entity to be considered for special wakeup.
+/// @return fapi2 return code.
///
template<>
fapi2::ReturnCode set_addresses(const fapi2::Target<fapi2::TARGET_TYPE_CORE>& i_target,
ProcessingValues_t& i_structure,
const uint32_t i_entity )
{
- FAPI_INF("> set_addresses for Core");
+ FAPI_INF(">> set_addresses for Core");
uint8_t l_core_num = 0;
@@ -113,6 +209,6 @@ fapi2::ReturnCode set_addresses(const fapi2::Target<fapi2::TARGET_TYPE_CORE>& i_
0, i_structure.gpmmr_address[0]);
fapi_try_exit:
- FAPI_INF("< set_addresses for Core");
+ FAPI_INF("<< set_addresses for Core");
return fapi2::current_err;
}
diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_core.mk b/src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_core.mk
index 48c364008..609eb6ab4 100644
--- a/src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_core.mk
+++ b/src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_core.mk
@@ -23,5 +23,7 @@
#
# IBM_PROLOG_END_TAG
PROCEDURE=p9_cpu_special_wakeup_core
+WAKEUP_UTIL=$(ROOTPATH)/chips/p9/procedures/hwp/lib
lib$(PROCEDURE)_DEPLIBS+=p9_cpu_special_wakeup_lib
+$(call ADD_MODULE_INCDIR,$(PROCEDURE),$(WAKEUP_UTIL))
$(call BUILD_PROCEDURE)
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 f7e87fca6..b0d200455 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
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2016 */
+/* Contributors Listed Below - COPYRIGHT 2016,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -25,12 +25,12 @@
///
/// @file : p9_cpu_special_wakeup_eq.C
-/// @brief : HWP to perform special wakeup of a core
+/// @brief : HWP to perform special wakeup of an eq
// *HWP HW Owner : Greg Still <stillgs@us.ibm.com>
// *HWP FW Owner : Prem S Jha <premjha2@in.ibm.com>
// *HWP Team : PM
-// *HWP Level : 2
+// *HWP Level : 3
// *HWP Consumed by : OCC:FSP:HOST:CRO
// -----------------------------------------------------------------------------
@@ -38,32 +38,131 @@
// -----------------------------------------------------------------------------
#include <p9_cpu_special_wakeup.H>
#include <p9_cpu_special_wakeup_lib.H>
+#include <p9_ppe_defs.H>
+#include <p9_ppe_utils.H>
+
+fapi2::ReturnCode collectEqTimeoutFailInfo( const fapi2::Target < fapi2::TARGET_TYPE_EQ>& i_target,
+ ProcessingValues_t i_processing_info );
/// ----------------------------------------------------------------------------
///
-/// @brief Sets a normal core chiplet into special wakeup state.
+/// @brief Sets a normal eq chiplet into special wakeup state.
+/// @param[in] i_target eq target
+/// @param[in] i_operation Special Wakeup Operation i.e. assert or deassert
+/// @param[in] i_entity entity to be considered for special wakeup.
+/// @return fapi2 return code.
///
fapi2::ReturnCode p9_cpu_special_wakeup_eq(
const fapi2::Target < fapi2::TARGET_TYPE_EQ>& i_target,
const p9specialWakeup::PROC_SPCWKUP_OPS i_operation,
const p9specialWakeup::PROC_SPCWKUP_ENTITY i_entity )
{
- FAPI_DBG("> p9_cpu_special_wakeup_eq");
- FAPI_TRY(_special_wakeup<fapi2::TARGET_TYPE_EQ> (
- i_target,
- i_operation,
- i_entity ));
+ FAPI_INF(">> p9_cpu_special_wakeup_eq");
-fapi_try_exit:
- FAPI_INF("< p9_cpu_special_wakeup_eq" );
+ uint8_t l_spWakeUpInProg = 0;
+ ProcessingValues_t l_processing_info;
+ fapi2::ReturnCode l_rc;
+
+ FAPI_ATTR_GET( fapi2::ATTR_EQ_INSIDE_SPECIAL_WAKEUP,
+ i_target,
+ l_spWakeUpInProg );
+
+ //A special wakeup is already in progress. In all likelyhood, a special
+ // wakeup has timed out and we are in FFDC collection path. During this
+ // FFDC collection, we SCOMed a register which itself needs a special
+ // wakeup.
+
+ if( l_spWakeUpInProg )
+ {
+ FAPI_INF("exiting eq recurssion");
+ return fapi2::FAPI2_RC_SUCCESS;
+ }
+
+ p9specialWakeup::blockWakeupRecurssion( i_target, p9specialWakeup::BLOCK );
+
+ l_rc = _special_wakeup( i_target,
+ i_operation,
+ i_entity,
+ l_processing_info );
+
+ // Collect Register data
+ if( l_rc == (uint32_t) fapi2::RC_INTERNAL_SPCWKUP_TIMEOUT )
+ {
+ collectEqTimeoutFailInfo( i_target, l_processing_info );
+ }
+
+ p9specialWakeup::blockWakeupRecurssion( i_target, p9specialWakeup::UNBLOCK );
+
+ FAPI_INF("<< p9_cpu_special_wakeup_eq" );
return fapi2::current_err;
}
/// ----------------------------------------------------------------------------
+///
+/// @brief Collect FFDC for EQ Special Wakeup timeout
+/// @param[in] i_target eq target
+/// @param[in] i_operation info pertaining to special wakeup
+/// @return fapi2 return code.
+///
+fapi2::ReturnCode collectEqTimeoutFailInfo( const fapi2::Target < fapi2::TARGET_TYPE_EQ>& i_target,
+ ProcessingValues_t i_processing_info )
+{
+ FAPI_INF(">> collectEqTimeoutFailInfo" );
+
+ fapi2::buffer<uint64_t> l_GPMMR;
+ fapi2::buffer<uint64_t> l_spWakeupRegVal;
+ fapi2::buffer<uint64_t> l_histRegVal;
+ fapi2::buffer<uint64_t> l_netCtrlVal;
+ std::vector<uint64_t> l_ppeBaseAddressList;
+ l_ppeBaseAddressList.push_back( SGPE_BASE_ADDRESS );
+
+ uint8_t l_exPos = 0;
+ auto l_ex_vector =
+ i_target.getChildren<fapi2::TARGET_TYPE_EX>();
+
+ for ( auto it : l_ex_vector )
+ {
+ FAPI_ATTR_GET( fapi2::ATTR_CHIP_UNIT_POS, it, l_exPos );
+ l_ppeBaseAddressList.push_back( getCmeBaseAddress( l_exPos ) );
+ }
+
+
+ fapi2::getScom( i_target, i_processing_info.history_address[0], l_histRegVal);
+ fapi2::getScom( i_target, EQ_PPM_GPMMR_SCOM, l_GPMMR );
+ fapi2::getScom( i_target, i_processing_info.spwkup_address[0], l_spWakeupRegVal );
+ fapi2::getScom( i_target, i_processing_info.netctrl_address[0], l_netCtrlVal );
+
+ FAPI_ASSERT( false ,
+ fapi2::SPCWKUP_EQ_TIMEOUT().
+ set_POLLCOUNT( i_processing_info.poll_count ).
+ set_QUAD_NETCTRL( l_netCtrlVal ).
+ set_SP_WKUP_REG_VALUE( l_spWakeupRegVal ).
+ set_QUAD_HISTORY_VALUE( l_histRegVal ).
+ set_ENTITY( i_processing_info.entity ).
+ set_GPMMR( l_GPMMR ).
+ set_EQ_TARGET( i_target ).
+ set_EX0_TARGET( l_ex_vector[0] ). //ignoring case of no functional ex
+ set_EX1_TARGET((( l_ex_vector.size() > 1 ) ? l_ex_vector[1] : l_ex_vector[0] )).
+ set_NUM_FUNC_EX( l_ex_vector.size() ).
+ set_PROC_CHIP_TARGET( i_processing_info.procTgt ).
+ set_PPE_BASE_ADDRESS_LIST( l_ppeBaseAddressList ).
+ set_PPE_STATE_MODE( SNAPSHOT ),
+ "Timed Out In Setting The EQ Special Wakeup" );
+
+fapi_try_exit:
+ FAPI_INF("<< collectEqTimeoutFailInfo" );
+ return fapi2::current_err;
+}
+/// ----------------------------------------------------------------------------
+/// @brief deasserts special wakeup state on a given chiplet
+/// @param[in] i_chipletTarget eq target
+/// @param[in] i_processing_info struct storing processing info
+/// @param[in] i_msgId Id pertaining to debug message string.
+/// @return fapi2 return code.
fapi2::ReturnCode spwkup_deassert( const fapi2::Target<fapi2::TARGET_TYPE_EQ>& i_chipletTarget,
const ProcessingValues_t i_processing_info,
- p9specialWakeup::SpecialWakeUpMsg i_msgId)
+ p9specialWakeup::SpecialWakeUpMsg i_msgId )
{
FAPI_INF("> spwkup_deassert EQ" );
@@ -77,6 +176,13 @@ fapi_try_exit:
/// ----------------------------------------------------------------------------
+///
+/// @brief Set address for an eq target type
+/// @param[in] i_target eq target
+/// @param[in] i_structure struct storing processing info
+/// @param[in] i_entity entity to be considered for special wakeup.
+/// @return fapi2 return code.
+///
template<>
fapi2::ReturnCode set_addresses(const fapi2::Target<fapi2::TARGET_TYPE_EQ>& i_target,
ProcessingValues_t& i_structure,
diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_eq.mk b/src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_eq.mk
index 79dcf3f12..dbbebc44e 100644
--- a/src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_eq.mk
+++ b/src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_eq.mk
@@ -23,5 +23,7 @@
#
# IBM_PROLOG_END_TAG
PROCEDURE=p9_cpu_special_wakeup_eq
+WAKEUP_UTIL=$(ROOTPATH)/chips/p9/procedures/hwp/lib
lib$(PROCEDURE)_DEPLIBS+=p9_cpu_special_wakeup_lib
+$(call ADD_MODULE_INCDIR,$(PROCEDURE),$(WAKEUP_UTIL))
$(call BUILD_PROCEDURE)
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 33ca069f8..e7fc24617 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
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2016 */
+/* Contributors Listed Below - COPYRIGHT 2016,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -30,7 +30,7 @@
// *HWP HW Owner : Greg Still <stillgs@us.ibm.com>
// *HWP FW Owner : Prem S Jha <premjha2@in.ibm.com>
// *HWP Team : PM
-// *HWP Level : 2
+// *HWP Level : 3
// *HWP Consumed by : OCC:FSP:HOST:CRO
// -----------------------------------------------------------------------------
@@ -38,33 +38,163 @@
// -----------------------------------------------------------------------------
#include <p9_cpu_special_wakeup.H>
#include <p9_cpu_special_wakeup_lib.H>
+#include <p9_ppe_defs.H>
+#include <p9_ppe_utils.H>
+fapi2::ReturnCode collectExTimeoutFailInfo( const fapi2::Target < fapi2::TARGET_TYPE_EX>& i_target,
+ ProcessingValues_t i_processing_info );
/// ----------------------------------------------------------------------------
-///
-/// @brief Sets an EX "chiplet" into special wakeup state.
+/// @brief Sets a normal eq chiplet into special wakeup state.
+/// @param[in] i_target eq target
+/// @param[in] i_operation Special Wakeup Operation i.e. assert or deassert
+/// @param[in] i_entity entity to be considered for special wakeup.
+/// @return fapi2 return code.
///
fapi2::ReturnCode p9_cpu_special_wakeup_ex(
const fapi2::Target < fapi2::TARGET_TYPE_EX>& i_target,
const p9specialWakeup::PROC_SPCWKUP_OPS i_operation,
const p9specialWakeup::PROC_SPCWKUP_ENTITY i_entity )
{
- FAPI_DBG("> p9_cpu_special_wakeup_ex");
- FAPI_TRY(_special_wakeup<fapi2::TARGET_TYPE_EX> (
- i_target,
- i_operation,
- i_entity ));
+ FAPI_INF(">> p9_cpu_special_wakeup_ex");
-fapi_try_exit:
- FAPI_INF("< p9_cpu_special_wakeup_ex" );
+ fapi2::ReturnCode l_rc;
+ ProcessingValues_t l_processing_info;
+ uint8_t l_spWakeUpInProg = 0;
+ auto l_eqTarget = i_target.getParent<fapi2::TARGET_TYPE_EQ>();
+
+ FAPI_ATTR_GET( fapi2::ATTR_EX_INSIDE_SPECIAL_WAKEUP,
+ i_target,
+ l_spWakeUpInProg );
+
+ //A special wakeup is already in progress. In all likelyhood, a special
+ // wakeup has timed out and we are in FFDC collection path. During this
+ // FFDC collection, we SCOMed a register which itself needs a special
+ // wakeup.
+
+ if( l_spWakeUpInProg )
+ {
+ FAPI_INF("exiting ex recurssion");
+ return fapi2::FAPI2_RC_SUCCESS;
+ }
+
+ p9specialWakeup::blockWakeupRecurssion( l_eqTarget, p9specialWakeup::BLOCK );
+
+ l_rc = _special_wakeup( i_target,
+ i_operation,
+ i_entity,
+ l_processing_info );
+
+ if ( l_rc == (uint32_t)fapi2::RC_INTERNAL_SPCWKUP_TIMEOUT )
+ {
+ collectExTimeoutFailInfo( i_target, l_processing_info );
+ }
+
+ p9specialWakeup::blockWakeupRecurssion( l_eqTarget, p9specialWakeup::UNBLOCK );
+
+ FAPI_INF("<< p9_cpu_special_wakeup_ex" );
return fapi2::current_err;
+}
+
+/// ----------------------------------------------------------------------------
+
+///
+/// @brief Collect FFDC for EQ Special Wakeup timeout
+/// @param[in] i_target ex target
+/// @param[in] i_operation info pertaining to special wakeup
+/// @return fapi2 return code.
+///
+fapi2::ReturnCode collectExTimeoutFailInfo( const fapi2::Target < fapi2::TARGET_TYPE_EX>& i_target,
+ ProcessingValues_t i_processing_info )
+{
+
+ FAPI_INF(">> collectExTimeoutFailInfo" );
+
+ fapi2::buffer<uint64_t> l_CPMMR[CORES_PER_EX];
+ fapi2::buffer<uint64_t> l_GPMMR[CORES_PER_EX];
+ fapi2::buffer<uint64_t> l_spWakeupRegVal[CORES_PER_EX];
+ fapi2::buffer<uint64_t> l_histRegVal[CORES_PER_EX];
+ fapi2::buffer<uint64_t> l_netCtrlVal[CORES_PER_EX];
+ uint32_t l_coreId = 0;
+
+ auto l_core_vector =
+ i_target.getChildren<fapi2::TARGET_TYPE_CORE>( fapi2::TARGET_STATE_PRESENT );
+
+ for( uint8_t i = 0; i < CORES_PER_EX; i++ )
+ {
+ l_CPMMR[i].insert( INIT_REG_PATT, 0, 64 );
+ l_GPMMR[i].insert( INIT_REG_PATT, 0, 64 );
+ l_spWakeupRegVal[i].insert( INIT_REG_PATT, 0, 64 );
+ l_histRegVal[i].insert( INIT_REG_PATT, 0, 64 );
+ }
+
+ for ( auto it : l_core_vector )
+ {
+ if( it.isFunctional() )
+ {
+ fapi2::getScom( it, C_CPPM_CPMMR, l_CPMMR[l_coreId] );
+ fapi2::getScom( it, C_PPM_GPMMR_SCOM, l_GPMMR[l_coreId] );
+ fapi2::getScom( it, i_processing_info.spwkup_address[l_coreId], l_spWakeupRegVal[l_coreId] );
+ fapi2::getScom( it, i_processing_info.history_address[l_coreId], l_histRegVal[l_coreId] );
+ fapi2::getScom( it, i_processing_info.netctrl_address[l_coreId], l_netCtrlVal[l_coreId] );
+ }
+ l_coreId++;
+ }
+
+ uint8_t l_exPos = 0;
+ FAPI_ATTR_GET( fapi2::ATTR_CHIP_UNIT_POS, i_target, l_exPos );
+
+ //For Special Wakeup of EX, in case of timeout, SGPE can't be halted.
+ //Hence, only XIRs will be collected for it. Whereas for CME, full PPE
+ //state dump is permissible. As a result, collect PPE State is getting called
+ //separately for CME and SGPE. Otherwise , collect PPE state expects a
+ //vector of base addresses.
+
+ std::vector<uint64_t> l_cmeBaseAddress;
+ std::vector<uint64_t> l_sgpeBaseAddress;
+ l_sgpeBaseAddress.push_back( SGPE_BASE_ADDRESS );
+ l_cmeBaseAddress.push_back( getCmeBaseAddress( l_exPos ) );
+
+ //From this point onwards, any usage of FAPI TRY in physical or
+ //logical path can be a serious problem. Hence, should not be used.
+
+ FAPI_ASSERT( false ,
+ fapi2::SPCWKUP_EX_TIMEOUT().
+ set_POLLCOUNT( i_processing_info.poll_count ).
+ set_C0_NETCTRL( l_netCtrlVal[0] ).
+ set_C1_NETCTRL( l_netCtrlVal[1] ).
+ set_C0_SP_WKUP_REG_VALUE( l_spWakeupRegVal[0] ).
+ set_C1_SP_WKUP_REG_VALUE( l_spWakeupRegVal[1] ).
+ set_C0_HISTORY_VALUE( l_histRegVal[0] ).
+ set_C1_HISTORY_VALUE( l_histRegVal[1] ).
+ set_ENTITY( i_processing_info.entity ).
+ set_C0_CPMMR( l_CPMMR[0] ).
+ set_C1_CPMMR( l_CPMMR[1] ).
+ set_C0_GPMMR( l_GPMMR[0] ).
+ set_C1_GPMMR( l_GPMMR[1] ).
+ set_EQ_TARGET( i_target.getParent<fapi2::TARGET_TYPE_EQ>() ).
+ set_EX_TARGET( i_target ).
+ set_PROC_CHIP_TARGET( i_processing_info.procTgt ).
+ set_CME_BASE_ADDRESS( l_cmeBaseAddress ).
+ set_SGPE_BASE_ADDRESS( l_sgpeBaseAddress ).
+ set_CME_STATE_MODE( SNAPSHOT ).
+ set_SGPE_STATE_MODE( XIRS ),
+ "Timed Out In Setting The EX Special Wakeup" );
+
+fapi_try_exit:
+ FAPI_INF("<< collectExTimeoutFailInfo" );
+ return fapi2::current_err;
}
/// ----------------------------------------------------------------------------
+/// @param[in] i_chipletTarget ex target
+/// @param[in] i_processing_info struct storing processing info
+/// @param[in] i_msgId Id pertaining to debug message string.
+/// @return fapi2 return code.
fapi2::ReturnCode spwkup_deassert( const fapi2::Target<fapi2::TARGET_TYPE_EX>& i_chipletTarget,
const ProcessingValues_t i_processing_info,
- p9specialWakeup::SpecialWakeUpMsg i_msgId)
+ p9specialWakeup::SpecialWakeUpMsg i_msgId )
{
FAPI_INF("> spwkup_deassert core EX" );
@@ -83,6 +213,10 @@ fapi_try_exit:
/// ----------------------------------------------------------------------------
+/// @param[in] i_chipletTarget ex target
+/// @param[in] i_processing_info struct storing processing info
+/// @param[in] i_entity .
+/// @return fapi2 return code.
template<>
fapi2::ReturnCode set_addresses(const fapi2::Target<fapi2::TARGET_TYPE_EX>& i_target,
ProcessingValues_t& i_structure,
diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_ex.mk b/src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_ex.mk
index 09e9882a4..82200a746 100644
--- a/src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_ex.mk
+++ b/src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_ex.mk
@@ -23,5 +23,7 @@
#
# IBM_PROLOG_END_TAG
PROCEDURE=p9_cpu_special_wakeup_ex
+WAKEUP_UTIL=$(ROOTPATH)/chips/p9/procedures/hwp/lib
lib$(PROCEDURE)_DEPLIBS+=p9_cpu_special_wakeup_lib
+$(call ADD_MODULE_INCDIR,$(PROCEDURE),$(WAKEUP_UTIL))
$(call BUILD_PROCEDURE)
diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_lib.C b/src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_lib.C
index 301cecd3e..e12bf0e3b 100644
--- a/src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_lib.C
+++ b/src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_lib.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2016 */
+/* Contributors Listed Below - COPYRIGHT 2016,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -57,6 +57,37 @@ const char* PROC_SPCWKUP_ENTITY_NAMES[] =
"SPW_ALL"
};
+void blockWakeupRecurssion( const fapi2::Target <fapi2::TARGET_TYPE_EQ>& i_quadTarget,
+ RecurssionOp i_spWakeUpInProg )
+{
+ FAPI_INF(">> blockWakeupRecurssion" );
+ uint8_t attrVal = i_spWakeUpInProg;
+
+ auto l_func_ex_vector =
+ i_quadTarget.getChildren<fapi2::TARGET_TYPE_EX>( fapi2::TARGET_STATE_FUNCTIONAL );
+
+ FAPI_ATTR_SET( fapi2::ATTR_EQ_INSIDE_SPECIAL_WAKEUP,
+ i_quadTarget,
+ attrVal );
+
+ for( auto itEx : l_func_ex_vector )
+ {
+ auto l_func_core_vector =
+ itEx.getChildren<fapi2::TARGET_TYPE_CORE>( fapi2::TARGET_STATE_FUNCTIONAL );
+
+ FAPI_ATTR_SET( fapi2::ATTR_EX_INSIDE_SPECIAL_WAKEUP,
+ itEx,
+ attrVal );
+
+ for( auto itCore : l_func_core_vector )
+ {
+ FAPI_ATTR_SET( fapi2::ATTR_CORE_INSIDE_SPECIAL_WAKEUP,
+ itCore,
+ attrVal );
+ }
+ }
+}
+
}
diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_lib.H b/src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_lib.H
index 08fc4b73a..3283c73bf 100644
--- a/src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_lib.H
+++ b/src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_lib.H
@@ -31,7 +31,7 @@
// *HWP HW Owner : Greg Still <stillgs@us.ibm.com>
// *HWP FW Owner : Prem S Jha <premjha2@in.ibm.com>
// *HWP Team : PM
-// *HWP Level : 2
+// *HWP Level : 3
// *HWP Consumed by : OCC:FSP:HOST:CRO
// -----------------------------------------------------------------------------
@@ -85,11 +85,19 @@ static const uint32_t GPMMR_SPWKUP_DONE_BIT = 0;
static const uint32_t HIST_SPWKUP_DONE_BIT = 1;
static const uint32_t SGPE_ACTIVE_BIT = 8;
static const uint32_t CORES_PER_EX = 2;
+static const uint32_t CORES_PER_EQ = 4;
+static const uint64_t INIT_REG_PATT = 0xDEADDEADDEADDEADll;
+
namespace p9specialWakeup
{
extern const char* SPWK_MSG_LIST[];
extern const char* PROC_SPCWKUP_ENTITY_NAMES[];
+enum RecurssionOp
+{
+ UNBLOCK = 0,
+ BLOCK = 1,
+};
}
@@ -107,6 +115,8 @@ struct ProcessingValues_t
uint64_t gpmmr_address[CORES_PER_EX];
uint64_t history_address[CORES_PER_EX];
uint64_t netctrl_address[CORES_PER_EX];
+ uint32_t poll_count;
+ fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP> procTgt;
};
// -----------------------------------------------------------------------------
@@ -175,6 +185,10 @@ inline fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP> get_chip_target( const fapi2:
/// ----------------------------------------------------------------------------
///
/// @brief Set addresses based on the target type (Template)
+/// @param[in] i_target target for special wakeup
+/// @param[in] i_structure temp struct storing processing info
+/// @param[in] i_entity entity to be considered for special wakeup.
+/// @return fapi2 return code.
///
template< fapi2::TargetType K >
fapi2::ReturnCode set_addresses(const fapi2::Target<K>& i_target,
@@ -183,6 +197,10 @@ fapi2::ReturnCode set_addresses(const fapi2::Target<K>& i_target,
///
/// @brief Set addresses for a core target type
+/// @param[in] i_target core target
+/// @param[in] i_structure struct storing processing info
+/// @param[in] i_entity entity to be considered for special wakeup.
+/// @return fapi2 return code.
///
template<>
fapi2::ReturnCode set_addresses(const fapi2::Target<fapi2::TARGET_TYPE_CORE>& i_target,
@@ -190,6 +208,10 @@ fapi2::ReturnCode set_addresses(const fapi2::Target<fapi2::TARGET_TYPE_CORE>& i_
const uint32_t i_entity );
///
/// @brief Set addresses for an EQ target type
+/// @param[in] i_target eq target
+/// @param[in] i_structure struct storing processing info
+/// @param[in] i_entity entity to be considered for special wakeup.
+/// @return fapi2 return code.
///
template<>
fapi2::ReturnCode set_addresses(const fapi2::Target<fapi2::TARGET_TYPE_EQ>& i_target,
@@ -197,12 +219,29 @@ fapi2::ReturnCode set_addresses(const fapi2::Target<fapi2::TARGET_TYPE_EQ>& i_ta
const uint32_t i_entity );
///
/// @brief Set addresses for an EX
+/// @param[in] i_target ex target
+/// @param[in] i_structure struct storing processing info
+/// @param[in] i_entity entity to be considered for special wakeup.
+/// @return fapi2 return code.
///
template<>
fapi2::ReturnCode set_addresses(const fapi2::Target<fapi2::TARGET_TYPE_EX>& i_target,
ProcessingValues_t& i_structure,
const uint32_t i_entity );
+namespace p9specialWakeup
+{
+
+///
+/// @brief enables or disables the recursive call of Special Wakeup HWP
+/// @param[in] i_quadTarget fapi2 target for quad
+/// @param[in] i_recurOp enables/disables recurssion
+///
+void blockWakeupRecurssion( const fapi2::Target <fapi2::TARGET_TYPE_EQ>& i_quadTarget,
+ RecurssionOp i_recurOp );
+
+} //namespace p9specialWakeup ends
+
// -----------------------------------------------------------------------------
// Function Implementations
// -----------------------------------------------------------------------------
@@ -213,6 +252,7 @@ fapi2::ReturnCode set_addresses(const fapi2::Target<fapi2::TARGET_TYPE_EX>& i_ta
/// @param[in] i_chipletTarget fapi2 target
/// @param[in] i_entity Entity to perform special wakeup upon.
/// @param[in] i_processing_info Structure containing processing information
+/// @return fapi2 return code.
///
template <fapi2::TargetType K>
fapi2::ReturnCode spwkup_setup_entity( const fapi2::Target<K>& i_chipletTarget,
@@ -227,6 +267,7 @@ fapi2::ReturnCode spwkup_setup_entity( const fapi2::Target<K>& i_chipletTarget,
fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP> l_parentTarget;
// Get the parent chip to deal with chip level accesses
l_parentTarget = get_chip_target<K> (i_chipletTarget);
+ i_processing_info.procTgt = l_parentTarget;
i_processing_info.entity = i_entity;
i_processing_info.b_ex_flag = ( l_chiplet_type == fapi2::TARGET_TYPE_EX ? true : false );
@@ -267,6 +308,7 @@ fapi_try_exit:
/// @brief Check for checkstop and set flags
/// @param[in] i_chipletTarget fapi2 target
/// @param[in] i_processing_info Structure containing processing information
+/// @return fapi2 return code.
///
template <fapi2::TargetType K>
fapi2::ReturnCode spwkup_check_xstop( const fapi2::Target<K>& i_chipletTarget,
@@ -313,12 +355,14 @@ fapi_try_exit:
return fapi2::current_err;
}
+
/// ----------------------------------------------------------------------------
///
/// @brief Assert special wake-up and poll for done
/// @param[in] i_chipletTarget fapi2 target
/// @param[in] i_processing_info Structure containing processing information
/// @param[in] i_msgId String to prepend to trace outputs
+/// @return fapi2 return code.
///
template <fapi2::TargetType K>
fapi2::ReturnCode spwkup_assert(const fapi2::Target<K>& i_chipletTarget,
@@ -330,7 +374,7 @@ fapi2::ReturnCode spwkup_assert(const fapi2::Target<K>& i_chipletTarget,
fapi2::buffer<uint64_t> l_gpmmr[2];
fapi2::buffer<uint64_t> l_netctrl[2];
fapi2::buffer<uint64_t> l_spwkup[2];
-
+ fapi2::ReturnCode l_rc;
uint32_t l_pollcount = 0;
bool b_poll_during_xstop_flag;
uint8_t l_attr_ppm_reg_collision_hw389511 = 0;
@@ -339,6 +383,7 @@ fapi2::ReturnCode spwkup_assert(const fapi2::Target<K>& i_chipletTarget,
fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP> l_parentTarget;
l_parentTarget = get_chip_target<K> (i_chipletTarget);
+
uint32_t l_special_wakeup_poll_interval_ns = SPECIAL_WAKE_UP_POLL_INTERVAL_NS;
/// Calculate the maximum number of polls until a timeout is thrown
uint32_t l_special_wakeup_max_polls = (SPECIAL_WAKEUP_TIMEOUT_NS / l_special_wakeup_poll_interval_ns);
@@ -463,16 +508,13 @@ fapi2::ReturnCode spwkup_assert(const fapi2::Target<K>& i_chipletTarget,
FAPI_TRY(spwkup_deassert(i_chipletTarget, i_processing_info, p9specialWakeup::SPWK_MSG_CLEAN_UP_DEASSERT));
}
- FAPI_ASSERT(false,
- fapi2::SPCWKUP_TIMEOUT()
- .set_POLLCOUNT(l_pollcount)
- .set_NETCTRL(l_netctrl[i])
- .set_SP_WKUP_REG_ADDRESS(i_processing_info.spwkup_address[i])
- .set_SP_WKUP_REG_VALUE(l_spwkup[i])
- .set_SP_WKUP_REG_ADDRESS(i_processing_info.history_address[i])
- .set_SP_WKUP_REG_VALUE(l_stop_hist_state[i])
- .set_ENTITY(i_processing_info.entity),
- "Timed out in setting the CPU in Special wakeup");
+ i_processing_info.poll_count = l_pollcount;
+
+ //This RC will not be reported to caller. It is meant for
+ //use within the HWP.
+ fapi2::current_err = fapi2::RC_INTERNAL_SPCWKUP_TIMEOUT;
+ goto fapi_try_exit;
+
}
} // Done checking
else
@@ -486,7 +528,7 @@ fapi2::ReturnCode spwkup_assert(const fapi2::Target<K>& i_chipletTarget,
} // num_addresses
fapi_try_exit:
- FAPI_INF("< spwkup_check_xstop" );
+ FAPI_INF("<< spwkup_check_xstop" );
return fapi2::current_err;
}
@@ -496,13 +538,14 @@ fapi_try_exit:
/// @param[in] i_chipletTarget fapi2 target
/// @param[in] i_processing_info Structure containing processing information
/// @param[in] i_msgId String to prepend to trace outputs
+/// @return fapi2 return code.
///
template <fapi2::TargetType K>
fapi2::ReturnCode _spwkup_deassert( const fapi2::Target<K>& i_chipletTarget,
uint64_t i_address,
p9specialWakeup::SpecialWakeUpMsg i_msgId)
{
- FAPI_INF("> spwkup_deassert" );
+ FAPI_INF(">> spwkup_deassert" );
fapi2::buffer<uint64_t> l_data64 = 0;
uint8_t l_attr_ppm_reg_collision_hw389511 = 0;
@@ -556,7 +599,7 @@ fapi2::ReturnCode _spwkup_deassert( const fapi2::Target<K>& i_chipletTarget,
l_data64);
fapi_try_exit:
- FAPI_INF("< spwkup_deassert" );
+ FAPI_INF("<< spwkup_deassert" );
return fapi2::current_err;
}
@@ -565,6 +608,7 @@ fapi_try_exit:
/// @param[in] i_chipletTarget fapi2 target
/// @param[in] i_processing_info Structure containing processing information
/// @param[in] i_msgId Id of the string to prepend to trace outputs
+/// @return fapi2 return code.
///
template <fapi2::TargetType K>
fapi2::ReturnCode spwkup_deassert( const fapi2::Target<K>& i_chipletTarget,
@@ -596,20 +640,22 @@ fapi2::ReturnCode spwkup_deassert( const fapi2::Target<fapi2::TARGET_TYPE_CORE>
/// ----------------------------------------------------------------------------
///
/// @brief Templated helper to assert/deassert the entity bit as targeted.
-/// @param[in] i_chipletTarget fapi2 target
-/// @param[in] i_operation special wakeup operations to be used.
-/// @param[in] i_entity entity to perform special wake-up upon
+/// @param[in] i_chipletTarget fapi2 target
+/// @param[in] i_operation Special Wakeup Operation i.e. assert or deassert
+/// @param[in] i_entity entity to perform special wake-up upon
+/// @param[in] io_processing_values structure containing processing info
+/// @return fapi2 return code.
///
template <fapi2::TargetType K>
fapi2::ReturnCode _special_wakeup(const fapi2::Target<K>& i_chipletTarget,
const p9specialWakeup::PROC_SPCWKUP_OPS i_operation,
- const p9specialWakeup::PROC_SPCWKUP_ENTITY i_entity )
+ const p9specialWakeup::PROC_SPCWKUP_ENTITY i_entity,
+ ProcessingValues_t& io_processing_values )
{
FAPI_DBG(">> _special_wakeup");
fapi2::ReturnCode l_rc;
fapi2::buffer<uint64_t> occFlagReg;
- ProcessingValues_t processing_info;
char l_targetStr[fapi2::MAX_ECMD_STRING_LEN];
fapi2::toString(i_chipletTarget, l_targetStr, fapi2::MAX_ECMD_STRING_LEN);
@@ -639,7 +685,7 @@ fapi2::ReturnCode _special_wakeup(const fapi2::Target<K>& i_chipletTarget,
}
// Select the addresses to use based on the entity
- FAPI_TRY(spwkup_setup_entity(i_chipletTarget, i_entity, processing_info),
+ FAPI_TRY(spwkup_setup_entity(i_chipletTarget, i_entity, io_processing_values),
"Error: spwkup_setup_entity failed");
// Determine if xstop checking should be ignored based on a caller
@@ -649,12 +695,12 @@ fapi2::ReturnCode _special_wakeup(const fapi2::Target<K>& i_chipletTarget,
// will eventually clear the xstop condition. However, to do so
// needs the xstop check to not keep the special wake-up operation
// from happening.
- FAPI_TRY(spwkup_check_xstop(i_chipletTarget, processing_info));
+ FAPI_TRY(spwkup_check_xstop(i_chipletTarget, io_processing_values));
// Proceed
FAPI_INF("Setting Special Wake-up ...") ;
- FAPI_TRY(spwkup_assert(i_chipletTarget, processing_info, p9specialWakeup::SPWK_MSG_ASSERT ));
+ FAPI_TRY(spwkup_assert(i_chipletTarget, io_processing_values, p9specialWakeup::SPWK_MSG_ASSERT ));
break;
@@ -662,10 +708,10 @@ fapi2::ReturnCode _special_wakeup(const fapi2::Target<K>& i_chipletTarget,
FAPI_INF("Clearing Special Wake-up...");
// Select the addresses to use based on the entity
- FAPI_TRY(spwkup_setup_entity(i_chipletTarget, i_entity, processing_info),
+ FAPI_TRY(spwkup_setup_entity(i_chipletTarget, i_entity, io_processing_values),
"Error: spwkup_setup_entity failed");
- FAPI_TRY(spwkup_deassert(i_chipletTarget, processing_info, p9specialWakeup::SPWK_MSG_DEASSERT ));
+ FAPI_TRY(spwkup_deassert(i_chipletTarget, io_processing_values, p9specialWakeup::SPWK_MSG_DEASSERT ));
break;
@@ -677,6 +723,6 @@ fapi2::ReturnCode _special_wakeup(const fapi2::Target<K>& i_chipletTarget,
while(0);
fapi_try_exit:
- FAPI_INF("< p9_cpu_special_wakeup" );
+ FAPI_INF("<< p9_cpu_special_wakeup" );
return fapi2::current_err;
}
diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_lib.mk b/src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_lib.mk
index ca966e02e..6f18f69be 100644
--- a/src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_lib.mk
+++ b/src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_lib.mk
@@ -5,7 +5,7 @@
#
# OpenPOWER HostBoot Project
#
-# Contributors Listed Below - COPYRIGHT 2016
+# Contributors Listed Below - COPYRIGHT 2016,2017
# [+] International Business Machines Corp.
#
#
@@ -23,4 +23,6 @@
#
# IBM_PROLOG_END_TAG
PROCEDURE=p9_cpu_special_wakeup_lib
+WAKEUP_UTIL=$(ROOT_PATH)chips/p9/procedures/hwp/lib
+$(call ADD_MODULE_INCDIR,$(PROCEDURE),$(WAKEUP_UTIL))
$(call BUILD_PROCEDURE)
diff --git a/src/import/chips/p9/procedures/xml/attribute_info/pm_hwp_attributes.xml b/src/import/chips/p9/procedures/xml/attribute_info/pm_hwp_attributes.xml
index f9f826777..5d06c2637 100644
--- a/src/import/chips/p9/procedures/xml/attribute_info/pm_hwp_attributes.xml
+++ b/src/import/chips/p9/procedures/xml/attribute_info/pm_hwp_attributes.xml
@@ -417,4 +417,49 @@
<initToZero/>
</attribute>
<!-- ********************************************************************* -->
+ <attribute>
+ <id>ATTR_CORE_INSIDE_SPECIAL_WAKEUP</id>
+ <targetType>TARGET_TYPE_CORE</targetType>
+ <description>Indicates that a special wakeup is in progress for a core.
+
+ Producer: p9_cpu_special_wakeup_core.C
+
+ Consumers: p9_cpu_special_wakeup_core.C
+ </description>
+ <valueType>uint8</valueType>
+ <enum>FALSE=0, TRUE=1</enum>
+ <writeable/>
+ <initToZero/>
+ </attribute>
+ <!-- ********************************************************************* -->
+ <attribute>
+ <id>ATTR_EX_INSIDE_SPECIAL_WAKEUP</id>
+ <targetType>TARGET_TYPE_EX</targetType>
+ <description>Indicates that a special wakeup is in progress for an EX.
+
+ Producer: p9_cpu_special_wakeup_ex.C
+
+ Consumers: p9_cpu_special_wakeup_ex.C
+ </description>
+ <valueType>uint8</valueType>
+ <enum>FALSE=0, TRUE=1</enum>
+ <writeable/>
+ <initToZero/>
+ </attribute>
+ <!-- ********************************************************************* -->
+ <attribute>
+ <id>ATTR_EQ_INSIDE_SPECIAL_WAKEUP</id>
+ <targetType>TARGET_TYPE_EQ</targetType>
+ <description>Indicates that a special wakeup is in progress for an EQ
+
+ Producer: p9_cpu_special_wakeup_eq.C
+
+ Consumers: p9_cpu_special_wakeup_eq.C
+ </description>
+ <valueType>uint8</valueType>
+ <enum>FALSE=0, TRUE=1</enum>
+ <writeable/>
+ <initToZero/>
+ </attribute>
+ <!-- ********************************************************************* -->
</attributes>
diff --git a/src/import/chips/p9/procedures/xml/error_info/p9_collect_ppe_state_sample.xml b/src/import/chips/p9/procedures/xml/error_info/p9_collect_ppe_state_sample.xml
index f0da35186..c752c2b21 100644
--- a/src/import/chips/p9/procedures/xml/error_info/p9_collect_ppe_state_sample.xml
+++ b/src/import/chips/p9/procedures/xml/error_info/p9_collect_ppe_state_sample.xml
@@ -29,7 +29,8 @@
Collect PPE internal state as additional FFDC - test only
</description>
<ffdc>PROC_CHIP_TARGET</ffdc>
+ <ffdc>MODE</ffdc>
<ffdc>PPE_BASE_ADDRESSES</ffdc>
- <collectFfdc>p9_collect_ppe_state, PROC_CHIP_TARGET, PPE_BASE_ADDRESSES</collectFfdc>
+ <collectFfdc>p9_collect_ppe_state, PROC_CHIP_TARGET, MODE, PPE_BASE_ADDRESSES</collectFfdc>
</hwpError>
</hwpErrors>
diff --git a/src/import/chips/p9/procedures/xml/error_info/p9_cpu_special_wakeup_errors.xml b/src/import/chips/p9/procedures/xml/error_info/p9_cpu_special_wakeup_errors.xml
index eab4948bf..f498732a6 100644
--- a/src/import/chips/p9/procedures/xml/error_info/p9_cpu_special_wakeup_errors.xml
+++ b/src/import/chips/p9/procedures/xml/error_info/p9_cpu_special_wakeup_errors.xml
@@ -5,7 +5,7 @@
<!-- -->
<!-- OpenPOWER HostBoot Project -->
<!-- -->
-<!-- Contributors Listed Below - COPYRIGHT 2016 -->
+<!-- Contributors Listed Below - COPYRIGHT 2016,2017 -->
<!-- [+] International Business Machines Corp. -->
<!-- -->
<!-- -->
@@ -26,32 +26,135 @@
<hwpErrors>
<!-- *********************************************************************** -->
<hwpError>
- <rc>RC_SPCWKUP_TIMEOUT</rc>
- <description>Special wakeup to targeted chiplet timed out.</description>
+ <rc>RC_SPCWKUP_EQ_TIMEOUT</rc>
+ <description>Special wakeup to EQ chiplet timed out.</description>
+ <ffdc>POLLCOUNT</ffdc>
+ <ffdc>QUAD_NETCTRL</ffdc>
+ <ffdc>SP_WKUP_REG_VALUE</ffdc>
+ <ffdc>QUAD_HISTORY_VALUE</ffdc>
+ <ffdc>ENTITY</ffdc>
+ <ffdc>GPMMR</ffdc>
+ <ffdc>EQ_TARGET</ffdc>
+ <ffdc>EX0_TARGET</ffdc>
+ <ffdc>EX1_TARGET</ffdc>
+ <ffdc>NUM_FUNC_EX</ffdc>
+ <ffdc>PROC_CHIP_TARGET</ffdc>
+ <ffdc>PPE_STATE_MODE</ffdc>
+ <ffdc>PPE_BASE_ADDRESS_LIST</ffdc>
+
+ <collectFfdc>p9_eq_clear_atomic_lock, EQ_TARGET</collectFfdc>
+ <collectFfdc>p9_collect_ppe_state, PROC_CHIP_TARGET, PPE_STATE_MODE, PPE_BASE_ADDRESS_LIST</collectFfdc>
+
+ <collectRegisterFfdc>
+ <id>CME_FFDC_REGISTERS</id>
+ <target>EX0_TARGET</target>
+ <targetType>TARGET_TYPE_EX</targetType>
+ </collectRegisterFfdc>
+
+ <collectRegisterFfdc>
+ <id>CME_FFDC_REGISTERS</id>
+ <target>EX1_TARGET</target>
+ <targetType>TARGET_TYPE_EX</targetType>
+ </collectRegisterFfdc>
+
+ <collectRegisterFfdc>
+ <id>SGPE_FFDC_REGISTERS</id>
+ <target>PROC_CHIP_TARGET</target>
+ <targetType>TARGET_TYPE_PROC_CHIP</targetType>
+ </collectRegisterFfdc>
+
+ <callout>
+ <target>EQ_TARGET</target>
+ <priority>HIGH</priority>
+ </callout>
+ </hwpError>
+ <!-- *********************************************************************** -->
+ <hwpError>
+ <rc>RC_SPCWKUP_EX_TIMEOUT</rc>
+ <description>Special wakeup to EX chiplet timed out.</description>
+ <ffdc>POLLCOUNT</ffdc>
+ <ffdc>C0_NETCTRL</ffdc>
+ <ffdc>C1_NETCTRL</ffdc>
+ <ffdc>C0_SP_WKUP_REG_VALUE</ffdc>
+ <ffdc>C1_SP_WKUP_REG_VALUE</ffdc>
+ <ffdc>C0_HISTORY_VALUE</ffdc>
+ <ffdc>C1_HISTORY_VALUE</ffdc>
+ <ffdc>ENTITY</ffdc>
+ <ffdc>C0_CPMMR</ffdc>
+ <ffdc>C1_CPMMR</ffdc>
+ <ffdc>C0_GPMMR</ffdc>
+ <ffdc>C1_GPMMR</ffdc>
+ <ffdc>EQ_TARGET</ffdc>
+ <ffdc>EX_TARGET</ffdc>
+ <ffdc>PROC_CHIP_TARGET</ffdc>
+ <ffdc>CME_STATE_MODE</ffdc>
+ <ffdc>SGPE_STATE_MODE</ffdc>
+
+ <collectFfdc>p9_eq_clear_atomic_lock, EQ_TARGET</collectFfdc>
+ <collectFfdc>p9_collect_ppe_state, PROC_CHIP_TARGET, CME_STATE_MODE, CME_BASE_ADDRESS</collectFfdc>
+ <collectFfdc>p9_collect_ppe_state, PROC_CHIP_TARGET, SGPE_STATE_MODE, SGPE_BASE_ADDRESS</collectFfdc>
+
+ <collectRegisterFfdc>
+ <id>CME_FFDC_REGISTERS</id>
+ <target>EX_TARGET</target>
+ <targetType>TARGET_TYPE_EX</targetType>
+ </collectRegisterFfdc>
+
+ <collectRegisterFfdc>
+ <id>SGPE_FFDC_REGISTERS</id>
+ <target>PROC_CHIP_TARGET</target>
+ <targetType>TARGET_TYPE_PROC_CHIP</targetType>
+ </collectRegisterFfdc>
+
+ <callout>
+ <target>EX_TARGET</target>
+ <priority>HIGH</priority>
+ </callout>
+ </hwpError>
+ <!-- *********************************************************************** -->
+ <hwpError>
+ <rc>RC_SPCWKUP_CORE_TIMEOUT</rc>
+ <description>Special wakeup to core chiplet timed out.</description>
<ffdc>POLLCOUNT</ffdc>
<ffdc>NETCTRL</ffdc>
- <ffdc>SP_WKUP_REG_ADDRESS</ffdc>
<ffdc>SP_WKUP_REG_VALUE</ffdc>
- <ffdc>HISTORY_ADDRESS</ffdc>
<ffdc>HISTORY_VALUE</ffdc>
<ffdc>ENTITY</ffdc>
- <!--
+ <ffdc>CPMMR</ffdc>
+ <ffdc>GPMMR</ffdc>
+ <ffdc>EQ_TARGET</ffdc>
+ <ffdc>CORE_TARGET</ffdc>
+ <ffdc>PROC_CHIP_TARGET</ffdc>
+ <ffdc>CME_STATE_MODE</ffdc>
+ <ffdc>SGPE_STATE_MODE</ffdc>
+ <collectFfdc>p9_eq_clear_atomic_lock, EQ_TARGET</collectFfdc>
+
+ <collectFfdc>p9_collect_ppe_state, PROC_CHIP_TARGET, CME_STATE_MODE, CME_BASE_ADDRESS</collectFfdc>
+ <collectFfdc>p9_collect_ppe_state, PROC_CHIP_TARGET, SGPE_STATE_MODE, SGPE_BASE_ADDRESS</collectFfdc>
+
<collectRegisterFfdc>
- <id>REG_FFDC_PROC_SLW_PCBS_REGISTERS</id>
- <target>EX_IN_ERROR</target>
+ <id>CME_FFDC_REGISTERS</id>
+ <target>EX_TARGET</target>
+ <targetType>TARGET_TYPE_EX</targetType>
</collectRegisterFfdc>
+
<collectRegisterFfdc>
- <id>REG_FFDC_PROC_SLW_REGISTERS</id>
- <id>REG_FFDC_PROC_SLW_FIR_REGISTERS</id>
- <id>REG_FFDC_PROC_SLW_PMC_REGISTERS</id>
- <id>REG_FFDC_PROC_SLW_PBA_REGISTERS</id>
- <target>CHIP</target>
+ <id>SGPE_FFDC_REGISTERS</id>
+ <target>PROC_CHIP_TARGET</target>
+ <targetType>TARGET_TYPE_PROC_CHIP</targetType>
</collectRegisterFfdc>
+
<callout>
- <target>EX_IN_ERROR</target>
+ <target>CORE_TARGET</target>
<priority>HIGH</priority>
</callout>
- -->
+ </hwpError>
+ <!-- *********************************************************************** -->
+ <hwpError>
+ <rc>RC_INTERNAL_SPCWKUP_TIMEOUT</rc>
+ <description>Special wakeup for targeted chiplet timed out. It is an
+ internal return code and will not show up in platform error log.
+ </description>
</hwpError>
<!-- *********************************************************************** -->
<hwpError>
@@ -160,4 +263,10 @@
</description>
</hwpError>
<!-- *********************************************************************** -->
+ <hwpError>
+ <rc>RC_INTERNAL_SPCWKUP_IN_PROGRESS</rc>
+ <description>Special wakeup is already in progress. Ignoring current request.
+ </description>
+ </hwpError>
+ <!-- *********************************************************************** -->
</hwpErrors>
diff --git a/src/import/chips/p9/procedures/xml/error_info/p9_pm_registers.xml b/src/import/chips/p9/procedures/xml/error_info/p9_pm_registers.xml
index 8eda96e2a..ce6cec022 100644
--- a/src/import/chips/p9/procedures/xml/error_info/p9_pm_registers.xml
+++ b/src/import/chips/p9/procedures/xml/error_info/p9_pm_registers.xml
@@ -238,4 +238,5 @@
<scomRegister>PU_JTG_PIB_OJTDO</scomRegister>
<scomRegister>PU_JTG_PIB_OJCFG</scomRegister>
</registerFfdc>
+ <!-- ******************************************************************** -->
</hwpErrors>
diff --git a/src/import/hwpf/fapi2/xml/attribute_info/hb_temp_defaults.xml b/src/import/hwpf/fapi2/xml/attribute_info/hb_temp_defaults.xml
index 1b37198ba..423016c74 100644
--- a/src/import/hwpf/fapi2/xml/attribute_info/hb_temp_defaults.xml
+++ b/src/import/hwpf/fapi2/xml/attribute_info/hb_temp_defaults.xml
@@ -311,6 +311,7 @@
<id>ATTR_IO_O_MFG_MIN_EYE_WIDTH</id>
<default>0x00</default>
</attribute>
+
<attribute>
<id>ATTR_START_CBS_FIFO_RESET_SKIP</id>
<default>0x00</default>
@@ -319,15 +320,32 @@
<id>ATTR_SYSTEM_CORECACHE_SKEWADJ_DISABLE</id>
<default>0x0</default>
</attribute>
+
<attribute>
<id>ATTR_SYSTEM_CORECACHE_DCADJ_DISABLE</id>
<default>0x0</default>
</attribute>
+
<attribute>
<id>ATTR_MC_PLL_BUCKET</id>
<default>0x05</default>
</attribute>
+ <attribute>
+ <id>ATTR_EQ_INSIDE_SPECIAL_WAKEUP</id>
+ <default>0x00</default>
+ </attribute>
+
+ <attribute>
+ <id>ATTR_CORE_INSIDE_SPECIAL_WAKEUP</id>
+ <default>0x00</default>
+ </attribute>
+
+ <attribute>
+ <id>ATTR_EX_INSIDE_SPECIAL_WAKEUP</id>
+ <default>0x00</default>
+ </attribute>
+
<!-- =====================================================================
End of temporary definitions
================================================================= -->
OpenPOWER on IntegriCloud