1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
|
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
/* $Source: src/usr/hwpf/hwp/include/mss_unmask_errors.H $ */
/* */
/* IBM CONFIDENTIAL */
/* */
/* COPYRIGHT International Business Machines Corp. 2012,2014 */
/* */
/* p1 */
/* */
/* Object Code Only (OCO) source materials */
/* Licensed Internal Code Source Materials */
/* IBM HostBoot Licensed Internal Code */
/* */
/* The source code for this program is not published or otherwise */
/* divested of its trade secrets, irrespective of what has been */
/* deposited with the U.S. Copyright Office. */
/* */
/* Origin: 30 */
/* */
/* IBM_PROLOG_END_TAG */
// $Id: mss_unmask_errors.H,v 1.2 2014/04/09 19:49:26 gollub Exp $
//------------------------------------------------------------------------------
// Don't forget to create CVS comments when you check in your changes!
//------------------------------------------------------------------------------
// CHANGE HISTORY:
//------------------------------------------------------------------------------
// Version:| Date: | Author: | Comment:
//---------|----------|---------|-----------------------------------------------
// 1.1 | 09/05/12 | gollub | Created
// 1.2 |07-APR-14 | gollub | Added mss_unmask_pervasive_errors
// | | | Version was set back from 1.2 to 1.1 when I moved from procedures/ipl/fapi to procedures/
// 1.2 |09-APR-14 | gollub | Checked in a second time just to get version to 1.2
#ifndef _MSS_UNMASK_ERRORS_H
#define _MSS_UNMASK_ERRORS_H
/** @file mss_unmask_errors.H
* @brief Utility functions to set action regs and unmask FIR bits
* at the end of various mss IPL procedures.
*/
//------------------------------------------------------------------------------
// Includes
//------------------------------------------------------------------------------
#include <fapi.H>
#include <ecmdDataBufferBase.H>
//------------------------------------------------------------------------------
// Constants and enums
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// mss_unmask_pervasive_errors
//------------------------------------------------------------------------------
/**
* @brief To be called at the end of cen_mem_startclocks.C
* Sets action regs and mask settings for pervasive errors to their
* runtime settings.
*
* @param i_target Centaur target
* @param i_bad_rc If cen_mem_startclocks.C already has a bad rc
* before it calls this function, we pass it in as
* i_bad_rc. If this function gets it's own bad local
* l_rc, i_bad_rc will be commited, and l_rc will be
* passed back as return value. Else if no l_rc,
* i_bad_rc will be passed back as return value.
* @return Non-SUCCESS if i_bad_rc Non_SUCCESS, or if internal function fails,
* SUCCESS otherwise.
*/
fapi::ReturnCode mss_unmask_pervasive_errors( const fapi::Target & i_target,
fapi::ReturnCode i_bad_rc );
//------------------------------------------------------------------------------
// mss_unmask_inband_errors
//------------------------------------------------------------------------------
/**
* @brief To be called at the end of proc_cen_framelock.C
* Sets action regs and mask settings for inband errors to their
* runtime settings.
*
* @param i_target Centaur target
* @param i_bad_rc If proc_cen_framelock.C already has a bad rc
* before it calls this function, we pass it in as
* i_bad_rc. If this function gets it's own bad local
* l_rc, i_bad_rc will be commited, and l_rc will be
* passed back as return value. Else if no l_rc,
* i_bad_rc will be be passed back as return value.
* @return Non-SUCCESS if i_bad_rc Non_SUCCESS, or if internal function fails,
* SUCCESS otherwise.
*/
fapi::ReturnCode mss_unmask_inband_errors( const fapi::Target & i_target,
fapi::ReturnCode i_bad_rc );
//------------------------------------------------------------------------------
// mss_unmask_ddrphy_errors
//------------------------------------------------------------------------------
/**
* @brief To be called at the end of mss_ddr_phy_reset.C.
* Sets action regs and mask settings for ddr phy errors to their
* runtime settings.
*
* @param i_target MBA target
* @param i_bad_rc If mss_ddr_phy_reset.C already has a bad rc
* before it calls this function, we pass it in as
* i_bad_rc. If this function gets it's own bad local
* l_rc, i_bad_rc will be commited, and l_rc will be
* passed back as return value. Else if no l_rc,
* i_bad_rc will be be passed back as return value.
* @return Non-SUCCESS if i_bad_rc Non_SUCCESS, or if internal function fails,
* SUCCESS otherwise.
*/
fapi::ReturnCode mss_unmask_ddrphy_errors( const fapi::Target & i_target,
fapi::ReturnCode i_bad_rc );
//------------------------------------------------------------------------------
// mss_unmask_draminit_errors
//------------------------------------------------------------------------------
/**
* @brief To be called at the end of mss_draminit.C.
* Sets MBACALFIR action regs to their runtime settings, and unmasks
* errors that are valid for PRD to handle after mss_draminit procedure.
*
* @param i_target MBA target
* @param i_bad_rc If mss_draminit.C already has a bad rc
* before it calls this function, we pass it in as
* i_bad_rc. If this function gets it's own bad local
* l_rc, i_bad_rc will be commited, and l_rc will be
* passed back as return value. Else if no l_rc,
* i_bad_rc will be be passed back as return value.
* @return Non-SUCCESS if i_bad_rc Non_SUCCESS, or if internal function fails,
* SUCCESS otherwise.
*/
fapi::ReturnCode mss_unmask_draminit_errors( const fapi::Target & i_target,
fapi::ReturnCode i_bad_rc );
//------------------------------------------------------------------------------
// mss_unmask_draminit_training_errors
//------------------------------------------------------------------------------
/**
* @brief To be called at the end of mss_draminit_training.C.
* Unmasks MBACALFIR errors that are valid for PRD to handle after
* mss_draminit_training procedure.
*
* @param i_target MBA target
* @param i_bad_rc If mss_draminit_training.C already has a bad rc
* before it calls this function, we pass it in as
* i_bad_rc. If this function gets it's own bad local
* l_rc, i_bad_rc will be commited, and l_rc will be
* passed back as return value. Else if no l_rc,
* i_bad_rc will be be passed back as return value.
* @return Non-SUCCESS if i_bad_rc Non_SUCCESS, or if internal function fails,
* SUCCESS otherwise.
*/
fapi::ReturnCode mss_unmask_draminit_training_errors(
const fapi::Target & i_target,
fapi::ReturnCode i_bad_rc );
//------------------------------------------------------------------------------
// mss_unmask_draminit_training_advanced_errors
//------------------------------------------------------------------------------
/**
* @brief To be called at the end of mss_draminit_training_advanced.C.
* Unmasks MBACALFIR errors that are valid for PRD to handle after
* mss_draminit_training_advanced procedure.
*
* @param i_target MBA target
* @param i_bad_rc If mss_draminit_training_advanced.C already has a
* bad rc before it calls this function, we pass it in
* as i_bad_rc. If this function gets it's own bad
* local l_rc, i_bad_rc will be commited, and l_rc will
* be passed back as return value. Else if no l_rc,
* i_bad_rc will be be passed back as return value.
* @return Non-SUCCESS if i_bad_rc Non_SUCCESS, or if internal function fails,
* SUCCESS otherwise.
*/
fapi::ReturnCode mss_unmask_draminit_training_advanced_errors(
const fapi::Target & i_target,
fapi::ReturnCode i_bad_rc );
//------------------------------------------------------------------------------
// mss_unmask_maint_errors
//------------------------------------------------------------------------------
/**
* @brief To be called at the end of mss_draminit_mc.C.
* Sets action regs and unmasks maint errors prior to the maint logic
* being used in memdiags so that PRD will be able to handle them
* if they happen during memdiags.
*
* @param i_target MBA target
* @param i_bad_rc If mss_draminit_mc already has a
* bad rc before it calls this function, we pass it in
* as i_bad_rc. If this function gets it's own bad
* local l_rc, i_bad_rc will be commited, and l_rc will
* be passed back as return value. Else if no l_rc,
* i_bad_rc will be be passed back as return value.
* @return Non-SUCCESS if i_bad_rc Non_SUCCESS, or if internal function fails,
* SUCCESS otherwise.
*/
fapi::ReturnCode mss_unmask_maint_errors(const fapi::Target & i_target,
fapi::ReturnCode i_bad_rc );
//------------------------------------------------------------------------------
// mss_unmask_fetch_errors
//------------------------------------------------------------------------------
/**
* @brief To be called at the end of mss_thermal_init.C.
* Sets action regs and unmasks fetch errors prior to the start of
* mainline traffic.
*
* @param i_target Centaur target
* @param i_bad_rc If mss_thermal_init already has a
* bad rc before it calls this function, we pass it in
* as i_bad_rc. If this function gets it's own bad
* local l_rc, i_bad_rc will be commited, and l_rc will
* be passed back as return value. Else if no l_rc,
* i_bad_rc will be be passed back as return value.
* @return Non-SUCCESS if i_bad_rc Non_SUCCESS, or if internal function fails,
* SUCCESS otherwise.
*/
fapi::ReturnCode mss_unmask_fetch_errors(const fapi::Target & i_target,
fapi::ReturnCode i_bad_rc );
//------------------------------------------------------------------------------
// fapiGetScom_w_retry
//------------------------------------------------------------------------------
/**
* @brief Reads a SCOM register from a Chip and retries once if SCOM fails.
* Retry is done with assumption that hostboot will switch from
* inband SCOM to FSI, so if inband failed due to channel fail,
* FSI may still work.
* @param[in] i_target Target to operate on
* @param[in] i_address Scom address to read from
* @param[out] o_data ecmdDataBufferBase object that holds data read from
* address
* @return ReturnCode. Zero on success, else platform specified error
*/
fapi::ReturnCode fapiGetScom_w_retry(const fapi::Target& i_target,
const uint64_t i_address,
ecmdDataBufferBase & o_data);
//------------------------------------------------------------------------------
// fapiPutScom_w_retry
//------------------------------------------------------------------------------
/**
* @brief Writes a SCOM register on a Chip and retries once if SCOM fails.
* Retry is done with assumption that hostboot will switch from
* inband SCOM to FSI, so if inband failed due to channel fail,
* FSI may still work.
* @param[in] i_target Target to operate on
* @param[in] i_address Scom address to write to
* @param[in] i_data ecmdDataBufferBase object that holds data to write into
* address
* @return ReturnCode. Zero on success, else platform specified error
*/
fapi::ReturnCode fapiPutScom_w_retry(const fapi::Target& i_target,
const uint64_t i_address,
ecmdDataBufferBase & i_data);
#endif /* _MSS_UNMASK_ERRORS_H */
|