summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSangeetha T S <sangeet2@in.ibm.com>2016-11-23 01:16:51 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-03-13 12:33:48 -0400
commita091f34a867b34e8e1e8df6f403333de44bfce4c (patch)
treebe1b1af81e5c9093e2434ca35053fe0f4d84444f /src
parent45c9448022b54ef2703219248c3f1570c6b1d210 (diff)
downloadtalos-hostboot-a091f34a867b34e8e1e8df6f403333de44bfce4c.tar.gz
talos-hostboot-a091f34a867b34e8e1e8df6f403333de44bfce4c.zip
Modifications to reset/init procedures
- Reset procedure to work in lieu with the speaical wakeup in CRONUS - Remove additional calls to PBA init in reset-init flow Change-Id: I7bbc2916c9ecd3d4a67f5f785cde822e444c6596 RTC: 168887 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/32942 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: RANGANATHPRASAD G. BRAHMASAMUDRA <prasadbgr@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/32943 Reviewed-by: Hostboot Team <hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+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')
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_pm_firinit.C21
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_pm_init.C45
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_pm_occ_firinit.C23
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_pm_reset.C61
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_pm_reset.H5
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_pm_reset.mk5
6 files changed, 79 insertions, 81 deletions
diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_firinit.C b/src/import/chips/p9/procedures/hwp/pm/p9_pm_firinit.C
index 26ff9f9e9..c340742cd 100644
--- a/src/import/chips/p9/procedures/hwp/pm/p9_pm_firinit.C
+++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_firinit.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2015,2016 */
+/* Contributors Listed Below - COPYRIGHT 2015,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -37,9 +37,6 @@
/// High-level procedure flow:
///
/// \verbatim
-/// - call p9_pm_occ_firinit.C
-/// - evaluate RC
-///
/// - call p9_pm_pba_firinit.C
/// - evaluate RC
///
@@ -59,7 +56,6 @@
// Includes
// ----------------------------------------------------------------------
#include <p9_pm_firinit.H>
-#include <p9_pm_occ_firinit.H>
#include <p9_pm_pba_firinit.H>
#include <p9_pm_ppm_firinit.H>
#include <p9_pm_cme_firinit.H>
@@ -78,16 +74,6 @@ fapi2::ReturnCode p9_pm_firinit(
fapi2::buffer<uint64_t> l_data64;
// CHECKING FOR FIRS BEFORE RESET and INIT
-
- FAPI_DBG("Checking OCC FIRs");
- FAPI_TRY(fapi2::getScom(i_target, PERV_TP_OCC_SCOM_OCCLFIR, l_data64),
- "ERROR: Failed to fetch OCC FIR");
-
- if(l_data64)
- {
- FAPI_INF("WARNING: OCC has active errors");
- }
-
FAPI_DBG("Checking PBA FIRs");
FAPI_TRY(fapi2::getScom(i_target, PU_PBAFIR , l_data64),
"ERROR: Failed to fetch PBA FIR");
@@ -97,11 +83,6 @@ fapi2::ReturnCode p9_pm_firinit(
FAPI_INF("WARNING: PBA has active error(s)");
}
- // Handle OCC FIRs, Masks and actions
- FAPI_DBG("Calling OCC firinit ...");
- FAPI_EXEC_HWP(l_rc, p9_pm_occ_firinit, i_target, i_mode);
- FAPI_TRY(l_rc);
-
// Handle PBA FIRs, Masks and actions
FAPI_DBG("Calling PBA firinit ...");
FAPI_EXEC_HWP(l_rc, p9_pm_pba_firinit, i_target, i_mode);
diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_init.C b/src/import/chips/p9/procedures/hwp/pm/p9_pm_init.C
index dbdaec044..4263a58f6 100644
--- a/src/import/chips/p9/procedures/hwp/pm/p9_pm_init.C
+++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_init.C
@@ -42,12 +42,13 @@
/// Initialize Cores and Quads
/// Initialize OCB channels
/// Initialize PSS
-/// Initialize PBA
-/// Mask CME FIRs and Core-Quad Errors
+/// Set the OCC FIR actions
+/// Set the CME, PPM and PBA FIR actions
/// Initialize Stop GPE
/// Initialize Pstate GPE
-/// Start OCC PPC405
/// Clear off pending Special Wakeup requests on all configured EX chiplets
+/// Disable special wakeup of all the EX chiplets
+/// Start OCC PPC405
///
/// PM_RESET
/// Invoke "p9_pm_reset()" to reset the PM OCC complex (Cores, Quads, CMEs,
@@ -169,21 +170,20 @@ fapi2::ReturnCode pm_init(
FAPI_TRY(p9_pm_glob_fir_trace(i_target, "After PSS & HWC init"));
// ************************************************************************
- // Initializes PBA
- // Note: This voids the channel used by the GPEs
+ // Set the OCC FIR actions
// ************************************************************************
- FAPI_DBG("Executing p9_pm_pba_init to initialize PBA");
- FAPI_EXEC_HWP(l_rc, p9_pm_pba_init, i_target, p9pm::PM_INIT);
- FAPI_TRY(l_rc, "ERROR: Failed to initialize PBA BUS");
- FAPI_TRY(p9_pm_glob_fir_trace(i_target, "After PBA bus init"));
+ FAPI_DBG("Executing p9_pm_occ_firinit to set FIR actions.");
+ FAPI_EXEC_HWP(l_rc, p9_pm_occ_firinit, i_target, p9pm::PM_INIT);
+ FAPI_TRY(l_rc, "ERROR: Failed to set OCC FIR actions.");
+ FAPI_TRY(p9_pm_glob_fir_trace(i_target, "After setting FIRs"));
// ************************************************************************
- // Mask the FIRs as errors can occur in what follows
+ // Set the FIR actions
// ************************************************************************
- FAPI_DBG("Executing p9_pm_firinit to mask errors/FIRs");
+ FAPI_DBG("Executing p9_pm_firinit to set PBA, PPM, CME FIR actions");
FAPI_EXEC_HWP(l_rc, p9_pm_firinit, i_target, p9pm::PM_INIT);
- FAPI_TRY(l_rc, "ERROR: Failed to mask OCC,PBA & CME FIRs/Errors.");
- FAPI_TRY(p9_pm_glob_fir_trace(i_target, "After masking FIRs and Errors"));
+ FAPI_TRY(l_rc, "ERROR: Failed to set PPM, PBA & CME FIRs.");
+ FAPI_TRY(p9_pm_glob_fir_trace(i_target, "After setting FIRs"));
// ************************************************************************
// Initialize the STOP GPE Engine
@@ -193,6 +193,15 @@ fapi2::ReturnCode pm_init(
FAPI_TRY(l_rc, "ERROR: Failed to initialize SGPE");
FAPI_TRY(p9_pm_glob_fir_trace(i_target, "After SGPE initialization"));
+ // ************************************************************************
+ // Initialize the PSTATE GPE Engine
+ // ************************************************************************
+ /* TODO: RTC 157096: Enable pstate GPE initialization in PM_INIT phase
+ FAPI_DBG("Executing p9_pm_pstate_gpe_init to initialize PGPE");
+ FAPI_EXEC_HWP(l_rc, p9_pm_pstate_gpe_init, i_target, p9pm::PM_INIT);
+ FAPI_TRY(l_rc, "ERROR: Failed to initialize PGPE");
+ FAPI_TRY(p9_pm_glob_fir_trace(i_target, "After PGPE initialization"));
+ */
// ************************************************************************
// Switch off OCC initiated special wakeup on EX to allowSTOP functionality
// ************************************************************************
@@ -211,16 +220,6 @@ fapi2::ReturnCode pm_init(
FAPI_TRY(p9_pm_glob_fir_trace(i_target, "After EX out of special wakeup"));
// ************************************************************************
- // Initialize the PSTATE GPE Engine
- // ************************************************************************
- /* TODO: RTC 157096: Enable pstate GPE initialization in PM_INIT phase
- FAPI_DBG("Executing p9_pm_pstate_gpe_init to initialize PGPE");
- FAPI_EXEC_HWP(l_rc, p9_pm_pstate_gpe_init, i_target, p9pm::PM_INIT);
- FAPI_TRY(l_rc, "ERROR: Failed to initialize PGPE");
- FAPI_TRY(p9_pm_glob_fir_trace(i_target, "After PGPE initialization"));
- */
-
- // ************************************************************************
// Start OCC PPC405
// ************************************************************************
FAPI_DBG("Executing p9_pm_occ_control to start OCC PPC405");
diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_occ_firinit.C b/src/import/chips/p9/procedures/hwp/pm/p9_pm_occ_firinit.C
index a811008b8..f4f427715 100644
--- a/src/import/chips/p9/procedures/hwp/pm/p9_pm_occ_firinit.C
+++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_occ_firinit.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2015,2016 */
+/* Contributors Listed Below - COPYRIGHT 2015,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -147,6 +147,27 @@ fapi2::ReturnCode p9_pm_occ_firinit(
{
FAPI_IMP("p9_pm_occ_firinit Enter");
+ fapi2::buffer<uint64_t> l_data64;
+ fapi2::buffer<uint64_t> l_mask64;
+
+ uint64_t l_fir;
+ uint64_t l_mask;
+ uint64_t l_unmaskedErrors;
+
+ FAPI_DBG("Checking OCC FIRs");
+ FAPI_TRY(fapi2::getScom(i_target, PERV_TP_OCC_SCOM_OCCLFIR, l_data64),
+ "ERROR: Failed to fetch OCC FIR");
+ FAPI_TRY(fapi2::getScom(i_target, PERV_TP_OCC_SCOM_OCCLFIRMASK, l_mask64),
+ "ERROR: Failed to fetch OCC FIRMASK");
+ l_data64.extractToRight<0, 64>(l_fir);
+ l_mask64.extractToRight<0, 64>(l_mask);
+ l_unmaskedErrors = l_fir & l_mask;
+
+ if(l_unmaskedErrors)
+ {
+ FAPI_INF("WARNING: OCC has active errors");
+ }
+
if(i_mode == p9pm::PM_RESET)
{
FAPI_TRY(pm_occ_fir_reset(i_target),
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 9217cedf4..cd53f0fa7 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
@@ -39,16 +39,14 @@
///
/// @verbatim
///
-/// - Mask the PM FIRs
+/// - Mask the OCC FIRs
/// - Halt and then Reset the PPC405
/// - Put all EX chiplets in special wakeup
-/// - Reset Stop,Pstate and OCC GPEs
+/// - Mask PBA, PPM and CME FIRs
+/// - Reset OCC, PSTATE and STOP GPEs
/// - Reset the Cores and Quads
-/// - Reset PBA
-/// - Reset SRAM Controller
/// - Reset OCB
/// - Reset PSS
-/// - Clear special wakeups
///
/// @endverbatim
///
@@ -104,11 +102,11 @@ fapi2::ReturnCode p9_pm_reset(
fapi2::ReturnCode l_rc;
// ************************************************************************
- // Mask the FIRs as errors can occur in what follows
+ // Mask the OCC FIRs as errors can occur in what follows
// ************************************************************************
- FAPI_DBG("Executing p9_pm_firinit for masking errors in reset operation.");
- FAPI_EXEC_HWP(l_rc, p9_pm_firinit, i_target, p9pm::PM_RESET);
- FAPI_TRY(l_rc, "ERROR: Failed to mask OCC,PBA & CME FIRs.");
+ FAPI_DBG("Executing p9_pm_occ_firinit for masking errors in reset operation.");
+ FAPI_EXEC_HWP(l_rc, p9_pm_occ_firinit, i_target, p9pm::PM_RESET);
+ FAPI_TRY(l_rc, "ERROR: Failed to mask OCC FIRs.");
FAPI_TRY(p9_pm_glob_fir_trace(i_target, "After masking FIRs"));
// Clear the OCC's PIB I2C engine locks.
@@ -138,12 +136,24 @@ fapi2::ReturnCode p9_pm_reset(
FAPI_TRY(p9_pm_glob_fir_trace(i_target, "After EX in special wakeup"));
// ************************************************************************
- // Reset the STOP GPE (Bring it to HALT)
+ // Mask the PBA & CME FIRs as errors can occur in what follows
// ************************************************************************
- FAPI_DBG("Executing p9_pm_stop_gpe_init to reset SGPE");
- FAPI_EXEC_HWP(l_rc, p9_pm_stop_gpe_init, i_target, p9pm::PM_RESET);
- FAPI_TRY(l_rc, "ERROR: Failed to reset SGPE");
- FAPI_TRY(p9_pm_glob_fir_trace(i_target, "After reset of SGPE"));
+ FAPI_DBG("Executing p9_pm_firinit for masking errors in reset operation.");
+ FAPI_EXEC_HWP(l_rc, p9_pm_firinit, i_target, p9pm::PM_RESET);
+ FAPI_TRY(l_rc, "ERROR: Failed to mask PBA & CME FIRs.");
+ FAPI_TRY(p9_pm_glob_fir_trace(i_target, "After masking FIRs"));
+
+ // ************************************************************************
+ // Issue reset to OCC GPEs ( GPE0 and GPE1) (Bring them to HALT)
+ // ************************************************************************
+ FAPI_DBG("Executing p9_pm_occ_gpe_init to reset OCC GPE");
+ FAPI_EXEC_HWP(l_rc, p9_pm_occ_gpe_init,
+ i_target,
+ p9pm::PM_RESET,
+ p9occgpe::GPEALL // Apply to both OCC GPEs
+ );
+ FAPI_TRY(l_rc, "ERROR: Failed to reset the OCC GPEs");
+ FAPI_TRY(p9_pm_glob_fir_trace(i_target, "After reset of OCC GPEs"));
// ************************************************************************
// Reset the PSTATE GPE (Bring it to HALT)
@@ -156,16 +166,12 @@ fapi2::ReturnCode p9_pm_reset(
*/
// ************************************************************************
- // Issue reset to OCC GPEs ( GPE0 and GPE1) (Bring them to HALT)
+ // Reset the STOP GPE (Bring it to HALT)
// ************************************************************************
- FAPI_DBG("Executing p9_pm_occ_gpe_init to reset OCC GPE");
- FAPI_EXEC_HWP(l_rc, p9_pm_occ_gpe_init,
- i_target,
- p9pm::PM_RESET,
- p9occgpe::GPEALL // Apply to both OCC GPEs
- );
- FAPI_TRY(l_rc, "ERROR: Failed to reset the OCC GPEs");
- FAPI_TRY(p9_pm_glob_fir_trace(i_target, "After reset of OCC GPEs"));
+ FAPI_DBG("Executing p9_pm_stop_gpe_init to reset SGPE");
+ FAPI_EXEC_HWP(l_rc, p9_pm_stop_gpe_init, i_target, p9pm::PM_RESET);
+ FAPI_TRY(l_rc, "ERROR: Failed to reset SGPE");
+ FAPI_TRY(p9_pm_glob_fir_trace(i_target, "After reset of SGPE"));
// ************************************************************************
// Reset Cores and Quads
@@ -182,15 +188,6 @@ fapi2::ReturnCode p9_pm_reset(
FAPI_TRY(p9_pm_glob_fir_trace(i_target, "After reset of core quad"));
// ************************************************************************
- // Issue reset to PBA
- // Note: this voids the channel used by the GPEs
- // ************************************************************************
- FAPI_DBG("Executing p9_pm_pba_init to reset PBA");
- FAPI_EXEC_HWP(l_rc, p9_pm_pba_init, i_target, p9pm::PM_RESET);
- FAPI_TRY(l_rc, "ERROR: Failed to reset PBA BUS");
- FAPI_TRY(p9_pm_glob_fir_trace(i_target, "After reset of PBA"));
-
- // ************************************************************************
// Issue reset to OCC-SRAM
// ************************************************************************
FAPI_DBG("Executing p8_occ_sram_init to reset OCC-SRAM");
diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_reset.H b/src/import/chips/p9/procedures/hwp/pm/p9_pm_reset.H
index 7d876c20f..bf3890e48 100644
--- a/src/import/chips/p9/procedures/hwp/pm/p9_pm_reset.H
+++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_reset.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2015,2016 */
+/* Contributors Listed Below - COPYRIGHT 2015,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -48,13 +48,12 @@
#include <p9_pm.H>
#include <p9_pm_utils.H>
#include <p9_misc_scom_addresses.H>
+#include <p9_pm_occ_firinit.H>
#include <p9_pm_firinit.H>
#include <p9_pm_occ_control.H>
-#include <p9_cpu_special_wakeup.H>
#include <p9_pm_stop_gpe_init.H>
#include <p9_pm_occ_gpe_init.H>
#include <p9_pm_corequad_init.H>
-#include <p9_pm_pba_init.H>
#include <p9_pm_occ_sram_init.H>
#include <p9_pm_ocb_init.H>
#include <p9_pm_pss_init.H>
diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_reset.mk b/src/import/chips/p9/procedures/hwp/pm/p9_pm_reset.mk
index a1408bcb1..0e2b3307a 100644
--- a/src/import/chips/p9/procedures/hwp/pm/p9_pm_reset.mk
+++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_reset.mk
@@ -5,7 +5,7 @@
#
# OpenPOWER HostBoot Project
#
-# Contributors Listed Below - COPYRIGHT 2015,2016
+# Contributors Listed Below - COPYRIGHT 2015,2017
# [+] International Business Machines Corp.
#
#
@@ -24,7 +24,8 @@
# IBM_PROLOG_END_TAG
PROCEDURE=p9_pm_reset
-libp9_pm_reset_DEPLIBS += p9_pm_utils p9_pm_firinit p9_pm_occ_control p9_cpu_special_wakeup_ex p9_pm_stop_gpe_init p9_pm_occ_gpe_init p9_pm_corequad_init p9_pm_pba_init p9_pm_occ_sram_init p9_pm_ocb_init p9_pm_pss_init
+libp9_pm_reset_DEPLIBS += p9_pm_utils p9_pm_occ_firinit p9_pm_firinit p9_pm_occ_control
+libp9_pm_reset_DEPLIBS += p9_pm_stop_gpe_init p9_pm_occ_gpe_init p9_pm_corequad_init p9_pm_occ_sram_init p9_pm_ocb_init p9_pm_pss_init
$(call ADD_MODULE_SRCDIR,$(PROCEDURE),$(ROOTPATH)/chips/p9/procedures/hwp/lib)
$(call ADD_MODULE_SRCDIR,$(PROCEDURE),$(ROOTPATH)/chips/p9/common/pmlib/include/registers)
$(call BUILD_PROCEDURE)
OpenPOWER on IntegriCloud