summaryrefslogtreecommitdiffstats
path: root/src/import/chips/p9/procedures/hwp/pm
diff options
context:
space:
mode:
authorChristian Geddes <crgeddes@us.ibm.com>2018-02-13 13:44:26 -0600
committerChristian R. Geddes <crgeddes@us.ibm.com>2018-02-17 16:28:20 -0500
commit18a7e1928bde05a443235092feb799d5e0c36f53 (patch)
tree4d7dbbb949c49f655cfc887ba299e09c4c95a074 /src/import/chips/p9/procedures/hwp/pm
parentcff2ddbb3e9d360588eaa08b22951026105ab2eb (diff)
downloadtalos-hostboot-18a7e1928bde05a443235092feb799d5e0c36f53.tar.gz
talos-hostboot-18a7e1928bde05a443235092feb799d5e0c36f53.zip
Use ATTR_SKIP_WAKEUP to determine what we do for PM reset
- Skip special wakeup based on the attribute check - Removed the LMCR and wakeup nootify clear from spwkup core/ex hwp CQ: SW412666 Change-Id: Ifa955cb399f2437376a3a44d2cf6c8fbc992f3d3 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/53970 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: Gregory S. Still <stillgs@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/53994 Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Diffstat (limited to 'src/import/chips/p9/procedures/hwp/pm')
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_core.C48
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_ex.C53
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_cpu_special_wakeup_lib.H1
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_pm_reset.C46
4 files changed, 29 insertions, 119 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 05a48f6ed..8031ff929 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
@@ -40,8 +40,6 @@
#include <p9_cpu_special_wakeup_lib.H>
#include <p9_ppe_defs.H>
#include <p9_ppe_utils.H>
-#include <p9n2_quad_scom_addresses.H>
-#include <p9n2_quad_scom_addresses_fld.H>
fapi2::ReturnCode collectCoreTimeoutFailInfo( const fapi2::Target < fapi2::TARGET_TYPE_CORE>& i_target,
ProcessingValues_t i_processing_info );
@@ -61,22 +59,10 @@ fapi2::ReturnCode p9_cpu_special_wakeup_core(
{
FAPI_INF(">> p9_cpu_special_wakeup_core");
fapi2::ReturnCode l_rc;
- fapi2::buffer<uint64_t> l_cpmmrRegVal;
- fapi2::buffer<uint64_t> l_lmcrRegVal = 0;
uint8_t l_spWakeUpInProg = 0;
- uint8_t l_corePos = 0;
- uint8_t l_autoSplWkUpBitPos = 12; //EQ_CME_SCOM_LMCR_C0_AUTO_SPECIAL_WAKEUP_DISABLE
- uint8_t l_lmcr_fail_state = 0;
ProcessingValues_t l_processing_info;
auto l_eqTarget = i_target.getParent<fapi2::TARGET_TYPE_EQ>();
- auto l_exTarget = i_target.getParent<fapi2::TARGET_TYPE_EX>();
-
- FAPI_ATTR_GET( fapi2::ATTR_CHIP_UNIT_POS,
- i_target,
- l_corePos );
-
- l_autoSplWkUpBitPos = l_autoSplWkUpBitPos + ( l_corePos & 0x01) ;
FAPI_ATTR_GET( fapi2::ATTR_CORE_INSIDE_SPECIAL_WAKEUP,
i_target,
@@ -95,40 +81,6 @@ fapi2::ReturnCode p9_cpu_special_wakeup_core(
p9specialWakeup::blockWakeupRecurssion( l_eqTarget, p9specialWakeup::BLOCK );
- //Not using FAPI TRY to avoid chances of RC corruption
- l_rc = getScom( i_target, P9N2_C_CPPM_CPMMR_SCOM, l_cpmmrRegVal );
-
- if( l_rc )
- {
- FAPI_ERR("Failed to SCOM CPMMR Reg, Core Pos %d", l_corePos );
- return l_rc;
- }
-
- l_rc = getScom( l_exTarget, EX_CME_SCOM_LMCR_SCOM, l_lmcrRegVal );
-
- // Treating any SCOM error as "offline" for the purposes of determining
- // that auto special wake-up is active.
- if( l_rc )
- {
- l_rc = fapi2::FAPI2_RC_SUCCESS;
- l_lmcr_fail_state = 1;
- }
-
- if( !l_lmcrRegVal.getBit( l_autoSplWkUpBitPos ) &&
- !l_lmcr_fail_state)
- {
- if( l_cpmmrRegVal.getBit( P9N2_EX_CPPM_CPMMR_WKUP_NOTIFY_SELECT ) )
- {
- //If auto special wakeup is enabled and Special wakeup signal is not
- //getting routed towards CME, let us route it towards CME so that
- //CME HW asserts DONE bit without CME Firmware's intervention.
- FAPI_DBG("Enabling Auto Special Wakeup For Core %d", l_corePos );
-
- l_cpmmrRegVal.clearBit( P9N2_EX_CPPM_CPMMR_WKUP_NOTIFY_SELECT );
- putScom( i_target, P9N2_C_CPPM_CPMMR_SCOM, l_cpmmrRegVal );
- }
- }
-
l_rc = _special_wakeup<fapi2::TARGET_TYPE_CORE> (
i_target,
i_operation,
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 8f8ee707b..768c28c3c 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
@@ -40,8 +40,6 @@
#include <p9_cpu_special_wakeup_lib.H>
#include <p9_ppe_defs.H>
#include <p9_ppe_utils.H>
-#include <p9n2_quad_scom_addresses.H>
-#include <p9n2_quad_scom_addresses_fld.H>
fapi2::ReturnCode collectExTimeoutFailInfo( const fapi2::Target < fapi2::TARGET_TYPE_EX>& i_target,
ProcessingValues_t i_processing_info );
@@ -62,13 +60,7 @@ fapi2::ReturnCode p9_cpu_special_wakeup_ex(
fapi2::ReturnCode l_rc;
ProcessingValues_t l_processing_info;
uint8_t l_spWakeUpInProg = 0;
- fapi2::buffer<uint64_t> l_cpmmrRegVal;
- fapi2::buffer<uint64_t> l_lmcrRegVal = 0;
- uint8_t l_autoSplWkUpBitPos = 12; //EQ_CME_SCOM_LMCR_C0_AUTO_SPECIAL_WAKEUP_DISABLE
- uint8_t l_corePos = 0;
auto l_eqTarget = i_target.getParent<fapi2::TARGET_TYPE_EQ>();
- auto l_coreList = i_target.getChildren<fapi2::TARGET_TYPE_CORE>( );
- uint8_t l_lmcr_fail_state = 0;
FAPI_ATTR_GET( fapi2::ATTR_EX_INSIDE_SPECIAL_WAKEUP,
i_target,
@@ -87,51 +79,6 @@ fapi2::ReturnCode p9_cpu_special_wakeup_ex(
p9specialWakeup::blockWakeupRecurssion( l_eqTarget, p9specialWakeup::BLOCK );
- //Not using FAPI TRY to avoid chances of RC corruption
- l_rc = getScom( i_target, EX_CME_SCOM_LMCR_SCOM, l_lmcrRegVal );
-
- // Treating any SCOM error as "offline" for the purposes of determining
- // that auto special wake-up is active.
- if( l_rc )
- {
- l_rc = fapi2::FAPI2_RC_SUCCESS;
- l_lmcr_fail_state = 1;
- }
-
- if (!l_lmcr_fail_state)
- {
- for( auto l_core : l_coreList )
- {
- FAPI_ATTR_GET( fapi2::ATTR_CHIP_UNIT_POS,
- l_core,
- l_corePos );
-
- l_autoSplWkUpBitPos = l_autoSplWkUpBitPos + ( l_corePos & 0x01) ;
-
- l_rc = getScom( l_core, P9N2_C_CPPM_CPMMR_SCOM, l_cpmmrRegVal );
-
- if( l_rc )
- {
- FAPI_ERR("Failed to SCOM CPMMR Reg, Core Pos %d", l_corePos );
- return l_rc;
- }
-
- if( !l_lmcrRegVal.getBit( l_autoSplWkUpBitPos ) )
- {
- if( l_cpmmrRegVal.getBit( P9N2_EX_CPPM_CPMMR_WKUP_NOTIFY_SELECT ) )
- {
- //If auto special wakeup is enabled and Special wakeup signal is not
- //getting routed towards CME, let us route it towards CME so that
- //CME HW asserts DONE bit without CME Firmware's intervention.
-
- FAPI_DBG("Enabling Auto Special Wakeup For Core %d", l_corePos );
- l_cpmmrRegVal.clearBit( P9N2_EX_CPPM_CPMMR_WKUP_NOTIFY_SELECT );
- putScom( l_core, P9N2_C_CPPM_CPMMR_SCOM, l_cpmmrRegVal );
- }
- }
- }
- }
-
l_rc = _special_wakeup( i_target,
i_operation,
i_entity,
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 3ee14e267..595ceea23 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
@@ -45,7 +45,6 @@
static const uint32_t NUM_CHIPLET_TYPES = 2;
static const uint32_t NUM_ENTITIES = 4;
-#define PIB_CHIPLET_OFFLINE_ERR 0x2
/**
diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_reset.C b/src/import/chips/p9/procedures/hwp/pm/p9_pm_reset.C
index 95c8d9767..c0a443399 100644
--- a/src/import/chips/p9/procedures/hwp/pm/p9_pm_reset.C
+++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_reset.C
@@ -109,6 +109,9 @@ fapi2::ReturnCode p9_pm_reset(
fapi2::buffer<uint64_t> l_data64;
fapi2::ReturnCode l_rc;
+ fapi2::ATTR_SKIP_WAKEUP_Type l_skip_wakeup;
+ FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_SKIP_WAKEUP, FAPI_SYSTEM, l_skip_wakeup),
+ "fapiGetAttribute of ATTR_SKIP_WAKEUP failed");
// ************************************************************************
// Put a mark on the wall that we are in the Reset Flow
@@ -166,33 +169,42 @@ fapi2::ReturnCode p9_pm_reset(
FAPI_TRY(l_rc, "ERROR: Failed to reset OCC PPC405");
FAPI_TRY(p9_pm_glob_fir_trace(i_target, "After safe reset of OCC PPC405"));
- if (l_malfAlert == false)
+ //Call special wake up if ATTR_SKIP_WAKEUP is not set.
+ if (!l_skip_wakeup)
{
+ if (l_malfAlert == false)
+ {
+ // ************************************************************************
+ // Put all EX chiplets in special wakeup
+ // ************************************************************************
+ FAPI_DBG("Enable special wakeup for all functional EX targets.");
+ l_phase = PM_RESET_SPL_WKUP_EX_ALL;
+ FAPI_TRY (FAPI_ATTR_SET (fapi2::ATTR_PM_RESET_PHASE, i_target, l_phase));
+ FAPI_TRY(special_wakeup_all(i_target,
+ true),//Enable splwkup
+ "ERROR: Failed to remove EX chiplets from special wakeup");
+ FAPI_TRY(p9_pm_glob_fir_trace(i_target, "After EX in special wakeup"));
+ }
+ else
+ {
+ FAPI_TRY(p9_pm_glob_fir_trace(i_target, "Skip special wakeup in malf alert path"));
+ }
+
// ************************************************************************
- // Put all EX chiplets in special wakeup
+ // Set Auto Special Wake-up Mode to all EXs ECs if spl. wkup done is asserted
// ************************************************************************
- FAPI_DBG("Enable special wakeup for all functional EX targets.");
- l_phase = PM_RESET_SPL_WKUP_EX_ALL;
+ FAPI_DBG("Set auto special wakeup for all functional EX targets.");
+ l_phase = PM_RESET_SET_AUTO_SPL_WKUP;
FAPI_TRY (FAPI_ATTR_SET (fapi2::ATTR_PM_RESET_PHASE, i_target, l_phase));
- FAPI_TRY(special_wakeup_all(i_target,
- true),//Enable splwkup
- "ERROR: Failed to remove EX chiplets from special wakeup");
- FAPI_TRY(p9_pm_glob_fir_trace(i_target, "After EX in special wakeup"));
+ FAPI_TRY(p9_pm_set_auto_spwkup(i_target));
}
else
{
- FAPI_TRY(p9_pm_glob_fir_trace(i_target, "Skip special wakeup in malf alert path"));
+ FAPI_INF("Skipping enabling special wakup and setting"
+ "auto-special wakeup because SKIP_WAKEUP attribute is set");
}
// ************************************************************************
- // Set Auto Special Wake-up Mode to all EXs ECs if spl. wkup done is asserted
- // ************************************************************************
- FAPI_DBG("Set auto special wakeup for all functional EX targets.");
- l_phase = PM_RESET_SET_AUTO_SPL_WKUP;
- FAPI_TRY (FAPI_ATTR_SET (fapi2::ATTR_PM_RESET_PHASE, i_target, l_phase));
- FAPI_TRY(p9_pm_set_auto_spwkup(i_target));
-
- // ************************************************************************
// Mask the PBA & CME FIRs as errors can occur in what follows
// ************************************************************************
FAPI_DBG("Executing p9_pm_firinit for masking errors in reset operation.");
OpenPOWER on IntegriCloud