diff options
| author | Anusha Reddy Rangareddygari <anusrang@in.ibm.com> | 2018-10-16 03:06:18 -0400 |
|---|---|---|
| committer | hostboot <hostboot@us.ibm.com> | 2018-11-29 10:39:47 -0600 |
| commit | b2a1839e628af11d3cc12ad413039707ea290be1 (patch) | |
| tree | 96a21bfba28395505fd03ddc643b2b2f8bd93f58 | |
| parent | 363773a7314224285b2d366f290dc1d00da74006 (diff) | |
| download | talos-hcode-b2a1839e628af11d3cc12ad413039707ea290be1.tar.gz talos-hcode-b2a1839e628af11d3cc12ad413039707ea290be1.zip | |
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>
| -rw-r--r-- | import/chips/p9/procedures/hwp/lib/p9_pibmem_dump.C | 30 | ||||
| -rw-r--r-- | import/chips/p9/procedures/hwp/lib/p9_pibms_reg_dump.C | 71 |
2 files changed, 88 insertions, 13 deletions
diff --git a/import/chips/p9/procedures/hwp/lib/p9_pibmem_dump.C b/import/chips/p9/procedures/hwp/lib/p9_pibmem_dump.C index 5a63a381..38041baf 100644 --- a/import/chips/p9/procedures/hwp/lib/p9_pibmem_dump.C +++ b/import/chips/p9/procedures/hwp/lib/p9_pibmem_dump.C @@ -30,7 +30,17 @@ /// *HW Owner : Anay K Desai /// *FW Owner : /// *Team : Pervasive + +// -------------------------------------Axone Mux configs------------------------------------------------------------- +// FSI2PCB(16) PIB2PCB(18) PCB2PCB(19) cannot access can access +// 1 0 0 PIB EPS - perv +// 0 1 0 PCB PIB, SBE, EPS +// 0 0 1 - PIB, PCB n/w +// ------------------------------------------------------------------------------------------------------------------- + #include <fapi2.H> +#include <p9_perv_scom_addresses.H> +#include <p9_perv_scom_addresses_fld.H> #include <p9_pibmem_dump.H> const static uint32_t P9n_PIBMEM_START_ARRAY_ADDRESS = 0x00080000; @@ -59,6 +69,26 @@ fapi2::ReturnCode p9_pibmem_dump( { PIBMEM_START_ARRAY_ADDRESS = P9a_PIBMEM_START_ARRAY_ADDRESS; DEPTH_OF_ARRAY = P9a_DEPTH_OF_ARRAY; + + // Checking mux config and fence values for Axone + fapi2::buffer<uint64_t> l_tempdata64; + fapi2::buffer<uint32_t> l_tempdata32; + + FAPI_TRY(getCfamRegister(i_target, PERV_ROOT_CTRL0_FSI, l_tempdata32 )); + FAPI_TRY(getScom(i_target, PERV_TP_CPLT_CTRL1, l_tempdata64)); + + // RC0bits 16,18,19 != 000 && RC0bit16 != 1 && cplt_ctrl[ pib(bit6) sbe(bit9)] != 1 + if ( ! ((l_tempdata32.getBit<PERV_ROOT_CTRL0_PIB2PCB_DC>() + || l_tempdata32.getBit<PERV_ROOT_CTRL0_18_SPARE_MUX_CONTROL>() + || l_tempdata32.getBit<PERV_ROOT_CTRL0_19_SPARE_MUX_CONTROL>()) && + !(l_tempdata32.getBit<PERV_ROOT_CTRL0_PIB2PCB_DC>()) && + !(l_tempdata64.getBit<PERV_1_CPLT_CTRL1_UNUSED_9B>()) && + !(l_tempdata64.getBit<PERV_1_CPLT_CTRL1_UNUSED_6B>()) )) + { + 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", + l_tempdata32, l_tempdata64); + goto fapi_try_exit; + } } else { diff --git a/import/chips/p9/procedures/hwp/lib/p9_pibms_reg_dump.C b/import/chips/p9/procedures/hwp/lib/p9_pibms_reg_dump.C index a4249029..a7e0d598 100644 --- a/import/chips/p9/procedures/hwp/lib/p9_pibms_reg_dump.C +++ b/import/chips/p9/procedures/hwp/lib/p9_pibms_reg_dump.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HCODE Project */ /* */ -/* COPYRIGHT 2015,2017 */ +/* COPYRIGHT 2015,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -39,6 +39,12 @@ /// /// /// @endverbatim +// -------------------------------------Axone Mux configs------------------------------------------------------------- +// FSI2PCB(16) PIB2PCB(18) PCB2PCB(19) cannot access can access +// 1 0 0 PIB EPS - perv +// 0 1 0 PCB PIB, SBE, EPS +// 0 0 1 - PIB, PCB n/w +// ------------------------------------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------- // Includes @@ -57,8 +63,6 @@ // these are probably in some include file - - enum PIBMS_REGS { OTP_STATUS = 0X00010002, @@ -236,13 +240,6 @@ std::vector<PIBMSReg_t> v_pibms_regs = - - - - - - - // ----------------------------------------------------------------------------- // Function definitions // ----------------------------------------------------------------------------- @@ -259,6 +256,8 @@ fapi2::ReturnCode p9_pibms_reg_dump( const fapi2::Target<fapi2::TARGET_TYPE_PROC { + fapi2::buffer<uint64_t> INVALID_REGISTER = 0xDEADBEEFDEADBEEF; + fapi2::buffer<uint8_t> l_is_axone; fapi2::buffer<uint32_t> l_data32_cbs_cs; fapi2::buffer<uint32_t> l_data32_sb_cs; 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 FAPI_IMP("p9_pibms_reg_dump"); FAPI_INF("Executing p9_pibms_reg_dump " ); - fapi2::buffer<uint64_t> buf; + FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_CHIP_EC_FEATURE_P9A_LOGIC_ONLY, i_target, l_is_axone)); + + if (l_is_axone) + { + // Checking mux config and fence values for Axone + fapi2::buffer<uint64_t> l_tempdata64; + fapi2::buffer<uint32_t> l_tempdata32; + + FAPI_TRY(getCfamRegister(i_target, PERV_ROOT_CTRL0_FSI, l_tempdata32 )); + FAPI_TRY(getScom(i_target, PERV_TP_CPLT_CTRL1, l_tempdata64)); + + // RC0bits 16,18,19 != 000 && RC0bit16 != 1 && cplt_ctrl[ pib(bit6) sbe(bit9)] != 1 + if ( ! ((l_tempdata32.getBit<PERV_ROOT_CTRL0_PIB2PCB_DC>() + || l_tempdata32.getBit<PERV_ROOT_CTRL0_18_SPARE_MUX_CONTROL>() + || l_tempdata32.getBit<PERV_ROOT_CTRL0_19_SPARE_MUX_CONTROL>()) && + !(l_tempdata32.getBit<PERV_ROOT_CTRL0_PIB2PCB_DC>()) && + !(l_tempdata64.getBit<PERV_1_CPLT_CTRL1_UNUSED_9B>()) && + !(l_tempdata64.getBit<PERV_1_CPLT_CTRL1_UNUSED_6B>()) )) + { + 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", + l_tempdata32, l_tempdata64); + goto fapi_try_exit; + } + } + FAPI_TRY(fapi2::getCfamRegister(i_target, PERV_CBS_CS_FSI, l_data32_cbs_cs)); FAPI_TRY(fapi2::getCfamRegister(i_target, PERV_SB_CS_FSI, l_data32_sb_cs)); @@ -286,12 +309,23 @@ fapi2::ReturnCode p9_pibms_reg_dump( const fapi2::Target<fapi2::TARGET_TYPE_PROC { // ****************************************************************** address = it.number ; - FAPI_TRY((getScom(i_target , address , buf ))); + + // No pibmem_registers in Axone. Pibmem_repair done through scan. + if (l_is_axone && (address == 0x0008800B || address == 0x0008800C || address == 0x0008800D || address == 0x0008800E) ) + { + buf = INVALID_REGISTER; + } + else + { + FAPI_TRY((getScom(i_target , address , buf ))); + } + l_regVal.reg = it; l_regVal.value = buf; pibms_reg_set.push_back(l_regVal); // ****************************************************************** } + } else @@ -301,7 +335,17 @@ fapi2::ReturnCode p9_pibms_reg_dump( const fapi2::Target<fapi2::TARGET_TYPE_PROC { // ****************************************************************** address = it.number ; - FAPI_TRY((getScom(i_target , address , buf ))); + + // No pibmem_registers in Axone. Pibmem_repair done through scan. + if (l_is_axone && (address == 0x0008800B || address == 0x0008800C || address == 0x0008800D || address == 0x0008800E) ) + { + buf = INVALID_REGISTER; + } + else + { + FAPI_TRY((getScom(i_target , address , buf ))); + } + l_regVal.reg = it; l_regVal.value = buf; pibms_reg_set.push_back(l_regVal); @@ -320,6 +364,7 @@ fapi2::ReturnCode p9_pibms_reg_dump( const fapi2::Target<fapi2::TARGET_TYPE_PROC } } + fapi_try_exit: FAPI_INF("< p9_pibms_reg_dump"); return fapi2::current_err; |

