Skip to content

Commit b2a1839

Browse files
anusrangop-jenkins
authored andcommitted
p9_pibms_reg_dump, p9_pibmem_dump updates
* Check the valid bit-rate divisor value * Skip pibmem_repair register scoms for Axone * Check mux config and Fence setup before collecting dumps Change-Id: Iff4d33be96136ec7f4daf6b21659694ae1f87d50 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/67533 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Soma Bhanutej <soma.bhanu@in.ibm.com> Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com> Reviewed-by: SRINIVAS V. POLISETTY <srinivan@in.ibm.com> Reviewed-by: PARVATHI RACHAKONDA <prachako@in.ibm.com>
1 parent 363773a commit b2a1839

File tree

2 files changed

+88
-13
lines changed

2 files changed

+88
-13
lines changed

import/chips/p9/procedures/hwp/lib/p9_pibmem_dump.C

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,17 @@
3030
/// *HW Owner : Anay K Desai
3131
/// *FW Owner :
3232
/// *Team : Pervasive
33+
34+
// -------------------------------------Axone Mux configs-------------------------------------------------------------
35+
// FSI2PCB(16) PIB2PCB(18) PCB2PCB(19) cannot access can access
36+
// 1 0 0 PIB EPS - perv
37+
// 0 1 0 PCB PIB, SBE, EPS
38+
// 0 0 1 - PIB, PCB n/w
39+
// -------------------------------------------------------------------------------------------------------------------
40+
3341
#include <fapi2.H>
42+
#include <p9_perv_scom_addresses.H>
43+
#include <p9_perv_scom_addresses_fld.H>
3444
#include <p9_pibmem_dump.H>
3545

3646
const static uint32_t P9n_PIBMEM_START_ARRAY_ADDRESS = 0x00080000;
@@ -59,6 +69,26 @@ fapi2::ReturnCode p9_pibmem_dump(
5969
{
6070
PIBMEM_START_ARRAY_ADDRESS = P9a_PIBMEM_START_ARRAY_ADDRESS;
6171
DEPTH_OF_ARRAY = P9a_DEPTH_OF_ARRAY;
72+
73+
// Checking mux config and fence values for Axone
74+
fapi2::buffer<uint64_t> l_tempdata64;
75+
fapi2::buffer<uint32_t> l_tempdata32;
76+
77+
FAPI_TRY(getCfamRegister(i_target, PERV_ROOT_CTRL0_FSI, l_tempdata32 ));
78+
FAPI_TRY(getScom(i_target, PERV_TP_CPLT_CTRL1, l_tempdata64));
79+
80+
// RC0bits 16,18,19 != 000 && RC0bit16 != 1 && cplt_ctrl[ pib(bit6) sbe(bit9)] != 1
81+
if ( ! ((l_tempdata32.getBit<PERV_ROOT_CTRL0_PIB2PCB_DC>()
82+
|| l_tempdata32.getBit<PERV_ROOT_CTRL0_18_SPARE_MUX_CONTROL>()
83+
|| l_tempdata32.getBit<PERV_ROOT_CTRL0_19_SPARE_MUX_CONTROL>()) &&
84+
!(l_tempdata32.getBit<PERV_ROOT_CTRL0_PIB2PCB_DC>()) &&
85+
!(l_tempdata64.getBit<PERV_1_CPLT_CTRL1_UNUSED_9B>()) &&
86+
!(l_tempdata64.getBit<PERV_1_CPLT_CTRL1_UNUSED_6B>()) ))
87+
{
88+
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",
89+
l_tempdata32, l_tempdata64);
90+
goto fapi_try_exit;
91+
}
6292
}
6393
else
6494
{

import/chips/p9/procedures/hwp/lib/p9_pibms_reg_dump.C

Lines changed: 58 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/* */
66
/* OpenPOWER HCODE Project */
77
/* */
8-
/* COPYRIGHT 2015,2017 */
8+
/* COPYRIGHT 2015,2018 */
99
/* [+] International Business Machines Corp. */
1010
/* */
1111
/* */
@@ -39,6 +39,12 @@
3939
///
4040
///
4141
/// @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+
// -------------------------------------------------------------------------------------------------------------------
4248

4349
// -----------------------------------------------------------------------------
4450
// Includes
@@ -57,8 +63,6 @@
5763
// these are probably in some include file
5864

5965

60-
61-
6266
enum PIBMS_REGS
6367
{
6468
OTP_STATUS = 0X00010002,
@@ -236,13 +240,6 @@ std::vector<PIBMSReg_t> v_pibms_regs =
236240

237241

238242

239-
240-
241-
242-
243-
244-
245-
246243
// -----------------------------------------------------------------------------
247244
// Function definitions
248245
// -----------------------------------------------------------------------------
@@ -259,6 +256,8 @@ fapi2::ReturnCode p9_pibms_reg_dump( const fapi2::Target<fapi2::TARGET_TYPE_PROC
259256

260257

261258
{
259+
fapi2::buffer<uint64_t> INVALID_REGISTER = 0xDEADBEEFDEADBEEF;
260+
fapi2::buffer<uint8_t> l_is_axone;
262261
fapi2::buffer<uint32_t> l_data32_cbs_cs;
263262
fapi2::buffer<uint32_t> l_data32_sb_cs;
264263
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
271270
FAPI_IMP("p9_pibms_reg_dump");
272271
FAPI_INF("Executing p9_pibms_reg_dump " );
273272

274-
275273
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+
276299
FAPI_TRY(fapi2::getCfamRegister(i_target, PERV_CBS_CS_FSI, l_data32_cbs_cs));
277300
FAPI_TRY(fapi2::getCfamRegister(i_target, PERV_SB_CS_FSI, l_data32_sb_cs));
278301

@@ -286,12 +309,23 @@ fapi2::ReturnCode p9_pibms_reg_dump( const fapi2::Target<fapi2::TARGET_TYPE_PROC
286309
{
287310
// ******************************************************************
288311
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+
290323
l_regVal.reg = it;
291324
l_regVal.value = buf;
292325
pibms_reg_set.push_back(l_regVal);
293326
// ******************************************************************
294327
}
328+
295329
}
296330

297331
else
@@ -301,7 +335,17 @@ fapi2::ReturnCode p9_pibms_reg_dump( const fapi2::Target<fapi2::TARGET_TYPE_PROC
301335
{
302336
// ******************************************************************
303337
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+
305349
l_regVal.reg = it;
306350
l_regVal.value = buf;
307351
pibms_reg_set.push_back(l_regVal);
@@ -320,6 +364,7 @@ fapi2::ReturnCode p9_pibms_reg_dump( const fapi2::Target<fapi2::TARGET_TYPE_PROC
320364
}
321365
}
322366

367+
323368
fapi_try_exit:
324369
FAPI_INF("< p9_pibms_reg_dump");
325370
return fapi2::current_err;

0 commit comments

Comments
 (0)