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 5a63a3819..38041baf5 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 +#include +#include #include 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 l_tempdata64; + fapi2::buffer 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() + || l_tempdata32.getBit() + || l_tempdata32.getBit()) && + !(l_tempdata32.getBit()) && + !(l_tempdata64.getBit()) && + !(l_tempdata64.getBit()) )) + { + 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 a42490293..a7e0d5982 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 v_pibms_regs = - - - - - - - // ----------------------------------------------------------------------------- // Function definitions // ----------------------------------------------------------------------------- @@ -259,6 +256,8 @@ fapi2::ReturnCode p9_pibms_reg_dump( const fapi2::Target INVALID_REGISTER = 0xDEADBEEFDEADBEEF; + fapi2::buffer l_is_axone; fapi2::buffer l_data32_cbs_cs; fapi2::buffer l_data32_sb_cs; std::vector v_pibms_reg_value; @@ -271,8 +270,32 @@ fapi2::ReturnCode p9_pibms_reg_dump( const fapi2::Target 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 l_tempdata64; + fapi2::buffer 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() + || l_tempdata32.getBit() + || l_tempdata32.getBit()) && + !(l_tempdata32.getBit()) && + !(l_tempdata64.getBit()) && + !(l_tempdata64.getBit()) )) + { + 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