From 3a992958a6d431a58a0cc72f6c5554ef0ed2f617 Mon Sep 17 00:00:00 2001 From: Louis Stermole Date: Fri, 12 Oct 2018 08:58:56 -0500 Subject: Add p9a_mss_volt procedure Change-Id: I893685b365f6c815653717d4cc8149f2ea7acb94 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/68412 Tested-by: FSP CI Jenkins Tested-by: Jenkins Server Tested-by: HWSV CI Tested-by: Hostboot CI Reviewed-by: STEPHEN GLANCY Reviewed-by: ANDRE A. MARIN Reviewed-by: Jennifer A. Stofer Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/68751 Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Reviewed-by: Christian R. Geddes --- .../xml/error_info/p9_memory_mss_volt.xml | 57 -------------------- src/import/generic/memory/lib/spd/spd_facade.H | 4 +- src/import/generic/memory/lib/utils/find.H | 63 ++++++++++++++++++++++ .../lib/utils/voltage/gen_mss_voltage_traits.H | 30 +++++++++-- .../procedures/xml/error_info/generic_error.xml | 20 +++++++ 5 files changed, 111 insertions(+), 63 deletions(-) delete mode 100644 src/import/chips/p9/procedures/xml/error_info/p9_memory_mss_volt.xml (limited to 'src/import') diff --git a/src/import/chips/p9/procedures/xml/error_info/p9_memory_mss_volt.xml b/src/import/chips/p9/procedures/xml/error_info/p9_memory_mss_volt.xml deleted file mode 100644 index 73f3c1b0a..000000000 --- a/src/import/chips/p9/procedures/xml/error_info/p9_memory_mss_volt.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - RC_MSS_VOLT_DDR_TYPE_REQUIRED_VOLTAGE - One or more DIMMs do not support required voltage for DDR type. - EXPECTED_OPERABLE - EXPECTED_ENDURANT - ACTUAL_OPERABLE - ACTUAL_ENDURANT - - MEMORY_PLUGGING_ERROR - HIGH - - - DIMM_TARGET - MEDIUM - - - DIMM_TARGET - - - diff --git a/src/import/generic/memory/lib/spd/spd_facade.H b/src/import/generic/memory/lib/spd/spd_facade.H index 5c86d7895..b8ac288d1 100644 --- a/src/import/generic/memory/lib/spd/spd_facade.H +++ b/src/import/generic/memory/lib/spd/spd_facade.H @@ -1619,9 +1619,9 @@ fapi2::ReturnCode get_spd_decoder_list( const fapi2::Target& i_target, for( const auto& l_dimm : mss::find_targets(i_target) ) { std::vector l_spd; - FAPI_TRY( get_raw_data(l_dimm, l_spd) ); + FAPI_TRY( get_raw_data(l_dimm, l_spd), "%s Failed get_raw_data", mss::c_str(l_dimm) ); - FAPI_TRY( add_decoder_to_list(l_dimm, l_spd, o_spd_decoder) ); + FAPI_TRY( add_decoder_to_list(l_dimm, l_spd, o_spd_decoder), "%s Failed add_decoder_to_list", mss::c_str(l_dimm) ); }// dimms fapi_try_exit: diff --git a/src/import/generic/memory/lib/utils/find.H b/src/import/generic/memory/lib/utils/find.H index cb0ffab15..df7d55d41 100644 --- a/src/import/generic/memory/lib/utils/find.H +++ b/src/import/generic/memory/lib/utils/find.H @@ -130,6 +130,30 @@ inline fapi2::Target find_target( const fapi2::Target +inline fapi2::Target find_target( const fapi2::Target& + i_self) +{ + return i_self; +} + +/// +/// @brief find the OCMB_CHIP given a OCMB_CHIP +/// @param[in] i_self the fapi2 target OCMB_CHIP +/// @return a OCMB_CHIP target. +/// +template<> +inline fapi2::Target find_target( const fapi2::Target& + i_self) +{ + return i_self; +} + /// /// @brief find the McBIST given a DIMM /// @param[in] i_target the fapi2 target DIMM @@ -154,6 +178,20 @@ inline fapi2::Target find_target( const fapi2::Tar .getParent(); } +/// +/// @brief find the PROC_CHIP given a OCMB_CHIP +/// @param[in] i_target the fapi2 target OCMB_CHIP +/// @return a PROC_CHIP target. +/// +template<> +inline fapi2::Target find_target( const fapi2::Target& + i_target) +{ + return i_target.getParent() + .getParent() + .getParent(); +} + /// /// @brief find the DMI given an MBA /// @param[in] i_target the fapi2 target MBA @@ -201,6 +239,30 @@ find_targets( const fapi2::Target& i_target, return i_target.getChildren(i_state); } +/// +/// @brief find all the OCMB_CHIPs connected to a PROC_CHIP +/// @param[in] i_target a fapi2::Target PROC_CHIP +/// @return a vector of fapi2::TARGET_TYPE_OCMB_CHIP +/// +template<> +inline std::vector< fapi2::Target > +find_targets( const fapi2::Target& i_target, + fapi2::TargetState i_state ) +{ + std::vector< fapi2::Target > l_ocmbs; + + for (const auto& l_mc : i_target.getChildren(i_state)) + { + for (const auto& l_omi : l_mc.getChildren(i_state)) + { + auto l_these_ocmbs( l_omi.getChildren(i_state) ); + l_ocmbs.insert(l_ocmbs.end(), l_these_ocmbs.begin(), l_these_ocmbs.end()); + } + } + + return l_ocmbs; +} + /// /// @brief find all the MEMBUFs connected to an DMI /// @param[in] i_target a fapi2::Target DMI @@ -324,6 +386,7 @@ inline std::vector< fapi2::Target > find_targets { return i_target.getChildren(i_state); } + /// /// @brief find all the MCS connected to an MCBIST /// @param[in] i_target a fapi2::Target MCBIST diff --git a/src/import/generic/memory/lib/utils/voltage/gen_mss_voltage_traits.H b/src/import/generic/memory/lib/utils/voltage/gen_mss_voltage_traits.H index baa9c693a..b121bfdb0 100644 --- a/src/import/generic/memory/lib/utils/voltage/gen_mss_voltage_traits.H +++ b/src/import/generic/memory/lib/utils/voltage/gen_mss_voltage_traits.H @@ -44,14 +44,14 @@ namespace mss /// /// @class Traits and policy class for voltage code -/// @tparam M mss::mc_type memory controller type +/// @tparam P mss::proc_type processor type /// @tparam D mss::spd::device_type DRAM device type (generation) /// -template< mss::mc_type M, mss::spd::device_type D > +template< mss::mc_type P, mss::spd::device_type D > class voltage_traits; /// -/// @class Traits and policy class for voltage code - specialization for the NIMBUS memory controller type +/// @class Traits and policy class for voltage code - specialization for the NIMBUS processor type, DDR4 device type /// template<> class voltage_traits @@ -67,10 +67,32 @@ class voltage_traits // Traits values ////////////////////////////////////////////////////////////// // List of attribute setter functions for setting voltage rail values - // This vector is defined in the p9 space: lib/eff_config/nimbus_mss_voltage.C static const std::vector&, uint32_t)> voltage_setters; }; +/// +/// @class Traits and policy class for voltage code - specialization for the AXONE processor type, DDR4 device type +/// +template<> +class voltage_traits +{ + public: + ////////////////////////////////////////////////////////////// + // Target types + ////////////////////////////////////////////////////////////// + static constexpr fapi2::TargetType VOLTAGE_TARGET_TYPE = fapi2::TARGET_TYPE_OCMB_CHIP; + static constexpr fapi2::TargetType SPD_TARGET_TYPE = fapi2::TARGET_TYPE_MEM_PORT; + + ////////////////////////////////////////////////////////////// + // Traits values + ////////////////////////////////////////////////////////////// + // List of attribute setter functions for setting voltage rail values + static const std::vector&, uint32_t)> voltage_setters; + + // Static consts for DDR4 voltages used in p9_mss_volt + static const uint64_t DDR4_NOMINAL_VOLTAGE = 1200; + static const uint64_t DDR4_VPP_VOLTAGE = 2500; +}; } // ns mss #endif diff --git a/src/import/generic/procedures/xml/error_info/generic_error.xml b/src/import/generic/procedures/xml/error_info/generic_error.xml index 2315fe6a3..066c8817a 100644 --- a/src/import/generic/procedures/xml/error_info/generic_error.xml +++ b/src/import/generic/procedures/xml/error_info/generic_error.xml @@ -291,6 +291,26 @@ + + RC_MSS_VOLT_DDR_TYPE_REQUIRED_VOLTAGE + One or more DIMMs do not support required voltage for DDR type. + EXPECTED_OPERABLE + EXPECTED_ENDURANT + ACTUAL_OPERABLE + ACTUAL_ENDURANT + + MEMORY_PLUGGING_ERROR + HIGH + + + DIMM_TARGET + MEDIUM + + + DIMM_TARGET + + + RC_MSS_PORT_DOES_NOT_SUPPORT_MAJORITY_FREQ -- cgit v1.2.1