Skip to content

Commit a091f34

Browse files
Sangeetha T Sdcrowell77
authored andcommitted
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>
1 parent 45c9448 commit a091f34

File tree

6 files changed

+79
-81
lines changed

6 files changed

+79
-81
lines changed

src/import/chips/p9/procedures/hwp/pm/p9_pm_firinit.C

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/* */
66
/* OpenPOWER HostBoot Project */
77
/* */
8-
/* Contributors Listed Below - COPYRIGHT 2015,2016 */
8+
/* Contributors Listed Below - COPYRIGHT 2015,2017 */
99
/* [+] International Business Machines Corp. */
1010
/* */
1111
/* */
@@ -37,9 +37,6 @@
3737
/// High-level procedure flow:
3838
///
3939
/// \verbatim
40-
/// - call p9_pm_occ_firinit.C
41-
/// - evaluate RC
42-
///
4340
/// - call p9_pm_pba_firinit.C
4441
/// - evaluate RC
4542
///
@@ -59,7 +56,6 @@
5956
// Includes
6057
// ----------------------------------------------------------------------
6158
#include <p9_pm_firinit.H>
62-
#include <p9_pm_occ_firinit.H>
6359
#include <p9_pm_pba_firinit.H>
6460
#include <p9_pm_ppm_firinit.H>
6561
#include <p9_pm_cme_firinit.H>
@@ -78,16 +74,6 @@ fapi2::ReturnCode p9_pm_firinit(
7874
fapi2::buffer<uint64_t> l_data64;
7975

8076
// CHECKING FOR FIRS BEFORE RESET and INIT
81-
82-
FAPI_DBG("Checking OCC FIRs");
83-
FAPI_TRY(fapi2::getScom(i_target, PERV_TP_OCC_SCOM_OCCLFIR, l_data64),
84-
"ERROR: Failed to fetch OCC FIR");
85-
86-
if(l_data64)
87-
{
88-
FAPI_INF("WARNING: OCC has active errors");
89-
}
90-
9177
FAPI_DBG("Checking PBA FIRs");
9278
FAPI_TRY(fapi2::getScom(i_target, PU_PBAFIR , l_data64),
9379
"ERROR: Failed to fetch PBA FIR");
@@ -97,11 +83,6 @@ fapi2::ReturnCode p9_pm_firinit(
9783
FAPI_INF("WARNING: PBA has active error(s)");
9884
}
9985

100-
// Handle OCC FIRs, Masks and actions
101-
FAPI_DBG("Calling OCC firinit ...");
102-
FAPI_EXEC_HWP(l_rc, p9_pm_occ_firinit, i_target, i_mode);
103-
FAPI_TRY(l_rc);
104-
10586
// Handle PBA FIRs, Masks and actions
10687
FAPI_DBG("Calling PBA firinit ...");
10788
FAPI_EXEC_HWP(l_rc, p9_pm_pba_firinit, i_target, i_mode);

src/import/chips/p9/procedures/hwp/pm/p9_pm_init.C

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,13 @@
4242
/// Initialize Cores and Quads
4343
/// Initialize OCB channels
4444
/// Initialize PSS
45-
/// Initialize PBA
46-
/// Mask CME FIRs and Core-Quad Errors
45+
/// Set the OCC FIR actions
46+
/// Set the CME, PPM and PBA FIR actions
4747
/// Initialize Stop GPE
4848
/// Initialize Pstate GPE
49-
/// Start OCC PPC405
5049
/// Clear off pending Special Wakeup requests on all configured EX chiplets
50+
/// Disable special wakeup of all the EX chiplets
51+
/// Start OCC PPC405
5152
///
5253
/// PM_RESET
5354
/// Invoke "p9_pm_reset()" to reset the PM OCC complex (Cores, Quads, CMEs,
@@ -169,21 +170,20 @@ fapi2::ReturnCode pm_init(
169170
FAPI_TRY(p9_pm_glob_fir_trace(i_target, "After PSS & HWC init"));
170171

171172
// ************************************************************************
172-
// Initializes PBA
173-
// Note: This voids the channel used by the GPEs
173+
// Set the OCC FIR actions
174174
// ************************************************************************
175-
FAPI_DBG("Executing p9_pm_pba_init to initialize PBA");
176-
FAPI_EXEC_HWP(l_rc, p9_pm_pba_init, i_target, p9pm::PM_INIT);
177-
FAPI_TRY(l_rc, "ERROR: Failed to initialize PBA BUS");
178-
FAPI_TRY(p9_pm_glob_fir_trace(i_target, "After PBA bus init"));
175+
FAPI_DBG("Executing p9_pm_occ_firinit to set FIR actions.");
176+
FAPI_EXEC_HWP(l_rc, p9_pm_occ_firinit, i_target, p9pm::PM_INIT);
177+
FAPI_TRY(l_rc, "ERROR: Failed to set OCC FIR actions.");
178+
FAPI_TRY(p9_pm_glob_fir_trace(i_target, "After setting FIRs"));
179179

180180
// ************************************************************************
181-
// Mask the FIRs as errors can occur in what follows
181+
// Set the FIR actions
182182
// ************************************************************************
183-
FAPI_DBG("Executing p9_pm_firinit to mask errors/FIRs");
183+
FAPI_DBG("Executing p9_pm_firinit to set PBA, PPM, CME FIR actions");
184184
FAPI_EXEC_HWP(l_rc, p9_pm_firinit, i_target, p9pm::PM_INIT);
185-
FAPI_TRY(l_rc, "ERROR: Failed to mask OCC,PBA & CME FIRs/Errors.");
186-
FAPI_TRY(p9_pm_glob_fir_trace(i_target, "After masking FIRs and Errors"));
185+
FAPI_TRY(l_rc, "ERROR: Failed to set PPM, PBA & CME FIRs.");
186+
FAPI_TRY(p9_pm_glob_fir_trace(i_target, "After setting FIRs"));
187187

188188
// ************************************************************************
189189
// Initialize the STOP GPE Engine
@@ -193,6 +193,15 @@ fapi2::ReturnCode pm_init(
193193
FAPI_TRY(l_rc, "ERROR: Failed to initialize SGPE");
194194
FAPI_TRY(p9_pm_glob_fir_trace(i_target, "After SGPE initialization"));
195195

196+
// ************************************************************************
197+
// Initialize the PSTATE GPE Engine
198+
// ************************************************************************
199+
/* TODO: RTC 157096: Enable pstate GPE initialization in PM_INIT phase
200+
FAPI_DBG("Executing p9_pm_pstate_gpe_init to initialize PGPE");
201+
FAPI_EXEC_HWP(l_rc, p9_pm_pstate_gpe_init, i_target, p9pm::PM_INIT);
202+
FAPI_TRY(l_rc, "ERROR: Failed to initialize PGPE");
203+
FAPI_TRY(p9_pm_glob_fir_trace(i_target, "After PGPE initialization"));
204+
*/
196205
// ************************************************************************
197206
// Switch off OCC initiated special wakeup on EX to allowSTOP functionality
198207
// ************************************************************************
@@ -210,16 +219,6 @@ fapi2::ReturnCode pm_init(
210219
"ERROR: Failed to remove EX chiplets from special wakeup");
211220
FAPI_TRY(p9_pm_glob_fir_trace(i_target, "After EX out of special wakeup"));
212221

213-
// ************************************************************************
214-
// Initialize the PSTATE GPE Engine
215-
// ************************************************************************
216-
/* TODO: RTC 157096: Enable pstate GPE initialization in PM_INIT phase
217-
FAPI_DBG("Executing p9_pm_pstate_gpe_init to initialize PGPE");
218-
FAPI_EXEC_HWP(l_rc, p9_pm_pstate_gpe_init, i_target, p9pm::PM_INIT);
219-
FAPI_TRY(l_rc, "ERROR: Failed to initialize PGPE");
220-
FAPI_TRY(p9_pm_glob_fir_trace(i_target, "After PGPE initialization"));
221-
*/
222-
223222
// ************************************************************************
224223
// Start OCC PPC405
225224
// ************************************************************************

src/import/chips/p9/procedures/hwp/pm/p9_pm_occ_firinit.C

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/* */
66
/* OpenPOWER HostBoot Project */
77
/* */
8-
/* Contributors Listed Below - COPYRIGHT 2015,2016 */
8+
/* Contributors Listed Below - COPYRIGHT 2015,2017 */
99
/* [+] International Business Machines Corp. */
1010
/* */
1111
/* */
@@ -147,6 +147,27 @@ fapi2::ReturnCode p9_pm_occ_firinit(
147147
{
148148
FAPI_IMP("p9_pm_occ_firinit Enter");
149149

150+
fapi2::buffer<uint64_t> l_data64;
151+
fapi2::buffer<uint64_t> l_mask64;
152+
153+
uint64_t l_fir;
154+
uint64_t l_mask;
155+
uint64_t l_unmaskedErrors;
156+
157+
FAPI_DBG("Checking OCC FIRs");
158+
FAPI_TRY(fapi2::getScom(i_target, PERV_TP_OCC_SCOM_OCCLFIR, l_data64),
159+
"ERROR: Failed to fetch OCC FIR");
160+
FAPI_TRY(fapi2::getScom(i_target, PERV_TP_OCC_SCOM_OCCLFIRMASK, l_mask64),
161+
"ERROR: Failed to fetch OCC FIRMASK");
162+
l_data64.extractToRight<0, 64>(l_fir);
163+
l_mask64.extractToRight<0, 64>(l_mask);
164+
l_unmaskedErrors = l_fir & l_mask;
165+
166+
if(l_unmaskedErrors)
167+
{
168+
FAPI_INF("WARNING: OCC has active errors");
169+
}
170+
150171
if(i_mode == p9pm::PM_RESET)
151172
{
152173
FAPI_TRY(pm_occ_fir_reset(i_target),

src/import/chips/p9/procedures/hwp/pm/p9_pm_reset.C

Lines changed: 29 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,14 @@
3939
///
4040
/// @verbatim
4141
///
42-
/// - Mask the PM FIRs
42+
/// - Mask the OCC FIRs
4343
/// - Halt and then Reset the PPC405
4444
/// - Put all EX chiplets in special wakeup
45-
/// - Reset Stop,Pstate and OCC GPEs
45+
/// - Mask PBA, PPM and CME FIRs
46+
/// - Reset OCC, PSTATE and STOP GPEs
4647
/// - Reset the Cores and Quads
47-
/// - Reset PBA
48-
/// - Reset SRAM Controller
4948
/// - Reset OCB
5049
/// - Reset PSS
51-
/// - Clear special wakeups
5250
///
5351
/// @endverbatim
5452
///
@@ -104,11 +102,11 @@ fapi2::ReturnCode p9_pm_reset(
104102
fapi2::ReturnCode l_rc;
105103

106104
// ************************************************************************
107-
// Mask the FIRs as errors can occur in what follows
105+
// Mask the OCC FIRs as errors can occur in what follows
108106
// ************************************************************************
109-
FAPI_DBG("Executing p9_pm_firinit for masking errors in reset operation.");
110-
FAPI_EXEC_HWP(l_rc, p9_pm_firinit, i_target, p9pm::PM_RESET);
111-
FAPI_TRY(l_rc, "ERROR: Failed to mask OCC,PBA & CME FIRs.");
107+
FAPI_DBG("Executing p9_pm_occ_firinit for masking errors in reset operation.");
108+
FAPI_EXEC_HWP(l_rc, p9_pm_occ_firinit, i_target, p9pm::PM_RESET);
109+
FAPI_TRY(l_rc, "ERROR: Failed to mask OCC FIRs.");
112110
FAPI_TRY(p9_pm_glob_fir_trace(i_target, "After masking FIRs"));
113111

114112
// Clear the OCC's PIB I2C engine locks.
@@ -138,12 +136,24 @@ fapi2::ReturnCode p9_pm_reset(
138136
FAPI_TRY(p9_pm_glob_fir_trace(i_target, "After EX in special wakeup"));
139137

140138
// ************************************************************************
141-
// Reset the STOP GPE (Bring it to HALT)
139+
// Mask the PBA & CME FIRs as errors can occur in what follows
142140
// ************************************************************************
143-
FAPI_DBG("Executing p9_pm_stop_gpe_init to reset SGPE");
144-
FAPI_EXEC_HWP(l_rc, p9_pm_stop_gpe_init, i_target, p9pm::PM_RESET);
145-
FAPI_TRY(l_rc, "ERROR: Failed to reset SGPE");
146-
FAPI_TRY(p9_pm_glob_fir_trace(i_target, "After reset of SGPE"));
141+
FAPI_DBG("Executing p9_pm_firinit for masking errors in reset operation.");
142+
FAPI_EXEC_HWP(l_rc, p9_pm_firinit, i_target, p9pm::PM_RESET);
143+
FAPI_TRY(l_rc, "ERROR: Failed to mask PBA & CME FIRs.");
144+
FAPI_TRY(p9_pm_glob_fir_trace(i_target, "After masking FIRs"));
145+
146+
// ************************************************************************
147+
// Issue reset to OCC GPEs ( GPE0 and GPE1) (Bring them to HALT)
148+
// ************************************************************************
149+
FAPI_DBG("Executing p9_pm_occ_gpe_init to reset OCC GPE");
150+
FAPI_EXEC_HWP(l_rc, p9_pm_occ_gpe_init,
151+
i_target,
152+
p9pm::PM_RESET,
153+
p9occgpe::GPEALL // Apply to both OCC GPEs
154+
);
155+
FAPI_TRY(l_rc, "ERROR: Failed to reset the OCC GPEs");
156+
FAPI_TRY(p9_pm_glob_fir_trace(i_target, "After reset of OCC GPEs"));
147157

148158
// ************************************************************************
149159
// Reset the PSTATE GPE (Bring it to HALT)
@@ -156,16 +166,12 @@ fapi2::ReturnCode p9_pm_reset(
156166
*/
157167

158168
// ************************************************************************
159-
// Issue reset to OCC GPEs ( GPE0 and GPE1) (Bring them to HALT)
169+
// Reset the STOP GPE (Bring it to HALT)
160170
// ************************************************************************
161-
FAPI_DBG("Executing p9_pm_occ_gpe_init to reset OCC GPE");
162-
FAPI_EXEC_HWP(l_rc, p9_pm_occ_gpe_init,
163-
i_target,
164-
p9pm::PM_RESET,
165-
p9occgpe::GPEALL // Apply to both OCC GPEs
166-
);
167-
FAPI_TRY(l_rc, "ERROR: Failed to reset the OCC GPEs");
168-
FAPI_TRY(p9_pm_glob_fir_trace(i_target, "After reset of OCC GPEs"));
171+
FAPI_DBG("Executing p9_pm_stop_gpe_init to reset SGPE");
172+
FAPI_EXEC_HWP(l_rc, p9_pm_stop_gpe_init, i_target, p9pm::PM_RESET);
173+
FAPI_TRY(l_rc, "ERROR: Failed to reset SGPE");
174+
FAPI_TRY(p9_pm_glob_fir_trace(i_target, "After reset of SGPE"));
169175

170176
// ************************************************************************
171177
// Reset Cores and Quads
@@ -181,15 +187,6 @@ fapi2::ReturnCode p9_pm_reset(
181187
FAPI_TRY(l_rc, "ERROR: Failed to reset cores & quads");
182188
FAPI_TRY(p9_pm_glob_fir_trace(i_target, "After reset of core quad"));
183189

184-
// ************************************************************************
185-
// Issue reset to PBA
186-
// Note: this voids the channel used by the GPEs
187-
// ************************************************************************
188-
FAPI_DBG("Executing p9_pm_pba_init to reset PBA");
189-
FAPI_EXEC_HWP(l_rc, p9_pm_pba_init, i_target, p9pm::PM_RESET);
190-
FAPI_TRY(l_rc, "ERROR: Failed to reset PBA BUS");
191-
FAPI_TRY(p9_pm_glob_fir_trace(i_target, "After reset of PBA"));
192-
193190
// ************************************************************************
194191
// Issue reset to OCC-SRAM
195192
// ************************************************************************

src/import/chips/p9/procedures/hwp/pm/p9_pm_reset.H

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/* */
66
/* OpenPOWER HostBoot Project */
77
/* */
8-
/* Contributors Listed Below - COPYRIGHT 2015,2016 */
8+
/* Contributors Listed Below - COPYRIGHT 2015,2017 */
99
/* [+] International Business Machines Corp. */
1010
/* */
1111
/* */
@@ -48,13 +48,12 @@
4848
#include <p9_pm.H>
4949
#include <p9_pm_utils.H>
5050
#include <p9_misc_scom_addresses.H>
51+
#include <p9_pm_occ_firinit.H>
5152
#include <p9_pm_firinit.H>
5253
#include <p9_pm_occ_control.H>
53-
#include <p9_cpu_special_wakeup.H>
5454
#include <p9_pm_stop_gpe_init.H>
5555
#include <p9_pm_occ_gpe_init.H>
5656
#include <p9_pm_corequad_init.H>
57-
#include <p9_pm_pba_init.H>
5857
#include <p9_pm_occ_sram_init.H>
5958
#include <p9_pm_ocb_init.H>
6059
#include <p9_pm_pss_init.H>

src/import/chips/p9/procedures/hwp/pm/p9_pm_reset.mk

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66
# OpenPOWER HostBoot Project
77
#
8-
# Contributors Listed Below - COPYRIGHT 2015,2016
8+
# Contributors Listed Below - COPYRIGHT 2015,2017
99
# [+] International Business Machines Corp.
1010
#
1111
#
@@ -24,7 +24,8 @@
2424
# IBM_PROLOG_END_TAG
2525

2626
PROCEDURE=p9_pm_reset
27-
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
27+
libp9_pm_reset_DEPLIBS += p9_pm_utils p9_pm_occ_firinit p9_pm_firinit p9_pm_occ_control
28+
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
2829
$(call ADD_MODULE_SRCDIR,$(PROCEDURE),$(ROOTPATH)/chips/p9/procedures/hwp/lib)
2930
$(call ADD_MODULE_SRCDIR,$(PROCEDURE),$(ROOTPATH)/chips/p9/common/pmlib/include/registers)
3031
$(call BUILD_PROCEDURE)

0 commit comments

Comments
 (0)