5
5
/* */
6
6
/* OpenPOWER HCODE Project */
7
7
/* */
8
- /* COPYRIGHT 2015,2017 */
8
+ /* COPYRIGHT 2015,2018 */
9
9
/* [+] International Business Machines Corp. */
10
10
/* */
11
11
/* */
39
39
///
40
40
///
41
41
/// @endverbatim
42
+ // -------------------------------------Axone Mux configs-------------------------------------------------------------
43
+ // FSI2PCB(16) PIB2PCB(18) PCB2PCB(19) cannot access can access
44
+ // 1 0 0 PIB EPS - perv
45
+ // 0 1 0 PCB PIB, SBE, EPS
46
+ // 0 0 1 - PIB, PCB n/w
47
+ // -------------------------------------------------------------------------------------------------------------------
42
48
43
49
// -----------------------------------------------------------------------------
44
50
// Includes
57
63
// these are probably in some include file
58
64
59
65
60
-
61
-
62
66
enum PIBMS_REGS
63
67
{
64
68
OTP_STATUS = 0X00010002 ,
@@ -236,13 +240,6 @@ std::vector<PIBMSReg_t> v_pibms_regs =
236
240
237
241
238
242
239
-
240
-
241
-
242
-
243
-
244
-
245
-
246
243
// -----------------------------------------------------------------------------
247
244
// Function definitions
248
245
// -----------------------------------------------------------------------------
@@ -259,6 +256,8 @@ fapi2::ReturnCode p9_pibms_reg_dump( const fapi2::Target<fapi2::TARGET_TYPE_PROC
259
256
260
257
261
258
{
259
+ fapi2 ::buffer < uint64_t > INVALID_REGISTER = 0xDEADBEEFDEADBEEF ;
260
+ fapi2 ::buffer < uint8_t > l_is_axone ;
262
261
fapi2 ::buffer < uint32_t > l_data32_cbs_cs ;
263
262
fapi2 ::buffer < uint32_t > l_data32_sb_cs ;
264
263
std ::vector < PIBMSRegValue_t > v_pibms_reg_value ;
@@ -271,8 +270,32 @@ fapi2::ReturnCode p9_pibms_reg_dump( const fapi2::Target<fapi2::TARGET_TYPE_PROC
271
270
FAPI_IMP ("p9_pibms_reg_dump" );
272
271
FAPI_INF ("Executing p9_pibms_reg_dump " );
273
272
274
-
275
273
fapi2 ::buffer < uint64_t > buf ;
274
+ FAPI_TRY (FAPI_ATTR_GET (fapi2 ::ATTR_CHIP_EC_FEATURE_P9A_LOGIC_ONLY , i_target , l_is_axone ));
275
+
276
+ if (l_is_axone )
277
+ {
278
+ // Checking mux config and fence values for Axone
279
+ fapi2 ::buffer < uint64_t > l_tempdata64 ;
280
+ fapi2 ::buffer < uint32_t > l_tempdata32 ;
281
+
282
+ FAPI_TRY (getCfamRegister (i_target , PERV_ROOT_CTRL0_FSI , l_tempdata32 ));
283
+ FAPI_TRY (getScom (i_target , PERV_TP_CPLT_CTRL1 , l_tempdata64 ));
284
+
285
+ // RC0bits 16,18,19 != 000 && RC0bit16 != 1 && cplt_ctrl[ pib(bit6) sbe(bit9)] != 1
286
+ if ( ! ((l_tempdata32 .getBit < PERV_ROOT_CTRL0_PIB2PCB_DC > ( )
287
+ || l_tempdata32 .getBit < PERV_ROOT_CTRL0_18_SPARE_MUX_CONTROL > ( )
288
+ || l_tempdata32 .getBit < PERV_ROOT_CTRL0_19_SPARE_MUX_CONTROL > ( )) &&
289
+ !(l_tempdata32 .getBit < PERV_ROOT_CTRL0_PIB2PCB_DC > ( )) &&
290
+ !(l_tempdata64 .getBit < PERV_1_CPLT_CTRL1_UNUSED_9B > ( )) &&
291
+ !(l_tempdata64 .getBit < PERV_1_CPLT_CTRL1_UNUSED_6B > ( )) ))
292
+ {
293
+ FAPI_ERR ("Invalid Mux config(RC0 bits 16,18,19): %#010lX or Fence setup(CPLT_CTRL1 bits 6,9): %#018lX to perform pibmem dump.\n" ,
294
+ l_tempdata32 , l_tempdata64 );
295
+ goto fapi_try_exit ;
296
+ }
297
+ }
298
+
276
299
FAPI_TRY (fapi2 ::getCfamRegister (i_target , PERV_CBS_CS_FSI , l_data32_cbs_cs ));
277
300
FAPI_TRY (fapi2 ::getCfamRegister (i_target , PERV_SB_CS_FSI , l_data32_sb_cs ));
278
301
@@ -286,12 +309,23 @@ fapi2::ReturnCode p9_pibms_reg_dump( const fapi2::Target<fapi2::TARGET_TYPE_PROC
286
309
{
287
310
// ******************************************************************
288
311
address = it .number ;
289
- FAPI_TRY ((getScom (i_target , address , buf )));
312
+
313
+ // No pibmem_registers in Axone. Pibmem_repair done through scan.
314
+ if (l_is_axone && (address == 0x0008800B || address == 0x0008800C || address == 0x0008800D || address == 0x0008800E ) )
315
+ {
316
+ buf = INVALID_REGISTER ;
317
+ }
318
+ else
319
+ {
320
+ FAPI_TRY ((getScom (i_target , address , buf )));
321
+ }
322
+
290
323
l_regVal .reg = it ;
291
324
l_regVal .value = buf ;
292
325
pibms_reg_set .push_back (l_regVal );
293
326
// ******************************************************************
294
327
}
328
+
295
329
}
296
330
297
331
else
@@ -301,7 +335,17 @@ fapi2::ReturnCode p9_pibms_reg_dump( const fapi2::Target<fapi2::TARGET_TYPE_PROC
301
335
{
302
336
// ******************************************************************
303
337
address = it .number ;
304
- FAPI_TRY ((getScom (i_target , address , buf )));
338
+
339
+ // No pibmem_registers in Axone. Pibmem_repair done through scan.
340
+ if (l_is_axone && (address == 0x0008800B || address == 0x0008800C || address == 0x0008800D || address == 0x0008800E ) )
341
+ {
342
+ buf = INVALID_REGISTER ;
343
+ }
344
+ else
345
+ {
346
+ FAPI_TRY ((getScom (i_target , address , buf )));
347
+ }
348
+
305
349
l_regVal .reg = it ;
306
350
l_regVal .value = buf ;
307
351
pibms_reg_set .push_back (l_regVal );
@@ -320,6 +364,7 @@ fapi2::ReturnCode p9_pibms_reg_dump( const fapi2::Target<fapi2::TARGET_TYPE_PROC
320
364
}
321
365
}
322
366
367
+
323
368
fapi_try_exit :
324
369
FAPI_INF ("< p9_pibms_reg_dump" );
325
370
return fapi2 ::current_err ;
0 commit comments