summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_core.C30
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_eq.C19
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_ex.C34
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_lib.H1
-rw-r--r--src/import/chips/p9/procedures/xml/error_info/p9_cpu_special_wakeup_errors.xml21
5 files changed, 99 insertions, 6 deletions
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 e3cc00849..4f365c3d9 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
@@ -60,14 +60,23 @@ fapi2::ReturnCode p9_cpu_special_wakeup_core(
FAPI_INF(">> p9_cpu_special_wakeup_core");
fapi2::ReturnCode l_rc;
uint8_t l_spWakeUpInProg = 0;
+ uint8_t l_corePos = 0;
+ uint8_t l_autoSpWkUpEn = 0;
ProcessingValues_t l_processing_info;
+ fapi2::buffer<uint64_t> l_autoSpWkUp;
+ fapi2::buffer<uint64_t> l_sgpeActive;
+ auto l_exTarget = i_target.getParent<fapi2::TARGET_TYPE_EX>();
auto l_eqTarget = i_target.getParent<fapi2::TARGET_TYPE_EQ>();
+ auto l_procChip = i_target.getParent<fapi2::TARGET_TYPE_PROC_CHIP>();
+ FAPI_TRY( getScom( l_procChip, PU_OCB_OCI_OCCFLG_SCOM, l_sgpeActive ) );
+ FAPI_ATTR_GET( fapi2::ATTR_CHIP_UNIT_POS, i_target, l_corePos );
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
@@ -81,6 +90,24 @@ fapi2::ReturnCode p9_cpu_special_wakeup_core(
p9specialWakeup::blockWakeupRecurssion( l_eqTarget, p9specialWakeup::BLOCK );
+ //Special wakeup request can't be serviced if
+ //SGPE did not boot and auto-special wakeup is not enabled.
+ if( !l_sgpeActive.getBit( SGPE_ACTIVE_BIT ) )
+ {
+ l_rc = getScom( l_exTarget, EQ_CME_SCOM_LMCR_SCOM, l_autoSpWkUp );
+
+ if( !l_rc )
+ {
+ l_autoSpWkUpEn =
+ l_autoSpWkUp.getBit( AUTO_SPWKUP_DIS_POS + ((l_corePos >> 1) & 0x01) ) ? 0 : 1;
+ }
+
+ FAPI_ASSERT( (!l_rc && l_autoSpWkUpEn ),
+ fapi2::CORE_SPECIAL_WAKEUP_NOT_FEASIBLE()
+ .set_CORE_POS( l_corePos ),
+ "Special Wakeup Request Cannot Be Serviced on This Core" );
+ }
+
l_rc = _special_wakeup<fapi2::TARGET_TYPE_CORE> (
i_target,
i_operation,
@@ -92,8 +119,9 @@ fapi2::ReturnCode p9_cpu_special_wakeup_core(
collectCoreTimeoutFailInfo( i_target, l_processing_info );
}
- p9specialWakeup::blockWakeupRecurssion( l_eqTarget, p9specialWakeup::UNBLOCK );
+fapi_try_exit:
+ p9specialWakeup::blockWakeupRecurssion( l_eqTarget, p9specialWakeup::UNBLOCK );
FAPI_INF("<< p9_cpu_special_wakeup_core" );
return fapi2::current_err;
}
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 7e23c7587..36d15ba2d 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
@@ -61,7 +61,13 @@ fapi2::ReturnCode p9_cpu_special_wakeup_eq(
uint8_t l_spWakeUpInProg = 0;
ProcessingValues_t l_processing_info;
+ fapi2::buffer<uint64_t> l_sgpeActive;
fapi2::ReturnCode l_rc;
+ uint8_t l_eqPos = 0;
+ auto l_procChip = i_target.getParent<fapi2::TARGET_TYPE_PROC_CHIP>();
+
+ FAPI_ATTR_GET( fapi2::ATTR_CHIP_UNIT_POS, i_target, l_eqPos );
+ FAPI_TRY( getScom( l_procChip, PU_OCB_OCI_OCCFLG_SCOM, l_sgpeActive ) );
FAPI_ATTR_GET( fapi2::ATTR_EQ_INSIDE_SPECIAL_WAKEUP,
i_target,
@@ -80,6 +86,16 @@ fapi2::ReturnCode p9_cpu_special_wakeup_eq(
p9specialWakeup::blockWakeupRecurssion( i_target, p9specialWakeup::BLOCK );
+ //Special wakeup request can't be serviced if
+ //SGPE did not boot.
+ if( !l_sgpeActive.getBit( SGPE_ACTIVE_BIT ) )
+ {
+ FAPI_ASSERT( false,
+ fapi2::QUAD_SPECIAL_WAKEUP_NOT_FEASIBLE()
+ .set_QUAD_POS( l_eqPos ),
+ "Special Wakeup Request Cannot Be Serviced on This Quad" );
+ }
+
l_rc = _special_wakeup( i_target,
i_operation,
i_entity,
@@ -91,9 +107,10 @@ fapi2::ReturnCode p9_cpu_special_wakeup_eq(
collectEqTimeoutFailInfo( i_target, l_processing_info );
}
- p9specialWakeup::blockWakeupRecurssion( i_target, p9specialWakeup::UNBLOCK );
+fapi_try_exit:
FAPI_INF("<< p9_cpu_special_wakeup_eq" );
+ p9specialWakeup::blockWakeupRecurssion( i_target, p9specialWakeup::UNBLOCK );
return fapi2::current_err;
}
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 1fbb683ab..381bc65ab 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
@@ -59,14 +59,21 @@ fapi2::ReturnCode 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>();
+ fapi2::buffer<uint64_t> l_autoSpWkUp;
+ fapi2::buffer<uint64_t> l_sgpeActive;
+ uint8_t l_exPos = 0;
+ uint8_t l_autoSpWkUpEn = 0;
+ uint8_t l_spWakeUpInProg = 0;
+ auto l_eqTarget = i_target.getParent<fapi2::TARGET_TYPE_EQ>();
+ auto l_procChip = i_target.getParent<fapi2::TARGET_TYPE_PROC_CHIP>();
+ FAPI_ATTR_GET( fapi2::ATTR_CHIP_UNIT_POS, i_target, l_exPos );
+ FAPI_TRY( getScom( l_procChip, PU_OCB_OCI_OCCFLG_SCOM, l_sgpeActive ) );
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
+ // 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.
@@ -79,6 +86,24 @@ fapi2::ReturnCode p9_cpu_special_wakeup_ex(
p9specialWakeup::blockWakeupRecurssion( l_eqTarget, p9specialWakeup::BLOCK );
+ //Special wakeup request can't be serviced if
+ //SGPE did not boot auto Special wakeup not enabled
+ if( !l_sgpeActive.getBit( SGPE_ACTIVE_BIT ) )
+ {
+ l_rc = getScom( i_target, EQ_CME_SCOM_LMCR_SCOM, l_autoSpWkUp );
+
+ if( !l_rc )
+ {
+ l_autoSpWkUpEn =
+ l_autoSpWkUp.getBit( AUTO_SPWKUP_DIS_POS + (l_exPos & 0x01) ) ? 0 : 1;
+
+ FAPI_ASSERT( (!l_rc && l_autoSpWkUpEn ),
+ fapi2::EX_SPECIAL_WAKEUP_NOT_FEASIBLE()
+ .set_EX_POS( l_exPos ),
+ "Special Wakeup Request Cannot Be Serviced on This Ex" );
+ }
+ }
+
l_rc = _special_wakeup( i_target,
i_operation,
i_entity,
@@ -89,9 +114,10 @@ fapi2::ReturnCode p9_cpu_special_wakeup_ex(
collectExTimeoutFailInfo( i_target, l_processing_info );
}
- p9specialWakeup::blockWakeupRecurssion( l_eqTarget, p9specialWakeup::UNBLOCK );
+fapi_try_exit:
FAPI_INF("<< p9_cpu_special_wakeup_ex" );
+ p9specialWakeup::blockWakeupRecurssion( l_eqTarget, p9specialWakeup::UNBLOCK );
return fapi2::current_err;
}
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 595ceea23..4909586bb 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
@@ -87,6 +87,7 @@ 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;
+static const uint64_t AUTO_SPWKUP_DIS_POS = 12;
namespace p9specialWakeup
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 6898fed0a..6ed6572f6 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
@@ -265,4 +265,25 @@
</description>
</hwpError>
<!-- *********************************************************************** -->
+ <hwpError>
+ <rc>RC_EX_SPECIAL_WAKEUP_NOT_FEASIBLE</rc>
+ <description>Special Wakeup can't be serviced for given ex.
+ </description>
+ <ffdc>EX_POS</ffdc>
+ </hwpError>
+ <!-- *********************************************************************** -->
+ <hwpError>
+ <rc>RC_CORE_SPECIAL_WAKEUP_NOT_FEASIBLE</rc>
+ <description>Special Wakeup can't be serviced for given core.
+ </description>
+ <ffdc>CORE_POS</ffdc>
+ </hwpError>
+ <!-- *********************************************************************** -->
+ <hwpError>
+ <rc>RC_QUAD_SPECIAL_WAKEUP_NOT_FEASIBLE</rc>
+ <description>Special Wakeup can't be serviced for given quad.
+ </description>
+ <ffdc>QUAD_POS</ffdc>
+ </hwpError>
+ <!-- *********************************************************************** -->
</hwpErrors>
OpenPOWER on IntegriCloud