summaryrefslogtreecommitdiffstats
path: root/src/import/chips/p9/procedures
diff options
context:
space:
mode:
Diffstat (limited to 'src/import/chips/p9/procedures')
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/eff_config/nimbus_pre_data_engine.C402
-rw-r--r--src/import/chips/p9/procedures/xml/error_info/p9_memory_mss_general_errors.xml71
2 files changed, 2 insertions, 471 deletions
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/eff_config/nimbus_pre_data_engine.C b/src/import/chips/p9/procedures/hwp/memory/lib/eff_config/nimbus_pre_data_engine.C
index 28e67f9b9..281fe8c56 100644
--- a/src/import/chips/p9/procedures/hwp/memory/lib/eff_config/nimbus_pre_data_engine.C
+++ b/src/import/chips/p9/procedures/hwp/memory/lib/eff_config/nimbus_pre_data_engine.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2018 */
+/* Contributors Listed Below - COPYRIGHT 2018,2019 */
/* [+] Evan Lojewski */
/* [+] International Business Machines Corp. */
/* */
@@ -34,289 +34,11 @@
// *HWP Level: 3
// *HWP Consumed by: CI
-#include <generic/memory/lib/utils/index.H>
-#include <lib/mss_attribute_accessors.H>
#include <generic/memory/lib/data_engine/pre_data_init.H>
-#include <generic/memory/lib/utils/find.H>
namespace mss
{
-///
-/// @brief Traits for pre_data_engine
-/// @class preDataInitTraits
-/// @note NIMBUS, DIMM_TYPE specialization
-///
-template<>
-class preDataInitTraits<mss::proc_type::NIMBUS, DIMM_TYPE>
-{
- public:
- using attr_type = fapi2::ATTR_EFF_DIMM_TYPE_Type;
- static const fapi2::TargetType TARGET_TYPE = fapi2::ATTR_EFF_DIMM_TYPE_TargetType;
-
- ///
- /// @brief attribute getter
- /// @param[in] i_target the MCS target
- /// @param[out] o_setting array to populate
- /// @return FAPI2_RC_SUCCESS iff okay
- ///
- static fapi2::ReturnCode get_attr(const fapi2::Target<TARGET_TYPE>& i_target,
- attr_type& o_setting)
- {
- FAPI_TRY( FAPI_ATTR_GET(fapi2::ATTR_EFF_DIMM_TYPE, i_target, o_setting) );
-
- fapi_try_exit:
- return fapi2::current_err;
- }
-
- ///
- /// @brief attribute setter
- /// @param[in] i_target the MCS target
- /// @param[in] i_setting array to set
- /// @return FAPI2_RC_SUCCESS iff okay
- ///
- static fapi2::ReturnCode set_attr(const fapi2::Target<TARGET_TYPE>& i_target,
- const attr_type& i_setting)
- {
- attr_type l_data = {};
- memcpy(l_data, i_setting, sizeof(l_data));
- FAPI_TRY( FAPI_ATTR_SET(fapi2::ATTR_EFF_DIMM_TYPE, i_target, l_data) );
-
- fapi_try_exit:
- return fapi2::current_err;
- }
-};
-
-///
-/// @brief Traits for pre_data_engine
-/// @class preDataInitTraits
-/// @note NIMBUS, DRAM_GEN specialization
-///
-template<>
-class preDataInitTraits<mss::proc_type::NIMBUS, DRAM_GEN>
-{
- public:
- using attr_type = fapi2::ATTR_EFF_DRAM_GEN_Type;
- static const fapi2::TargetType TARGET_TYPE = fapi2::ATTR_EFF_DRAM_GEN_TargetType;
-
- ///
- /// @brief attribute getter
- /// @param[in] i_target the MCS target
- /// @param[out] o_setting array to populate
- /// @return FAPI2_RC_SUCCESS iff okay
- ///
- static fapi2::ReturnCode get_attr(const fapi2::Target<TARGET_TYPE>& i_target,
- attr_type& o_setting)
- {
- FAPI_TRY( FAPI_ATTR_GET(fapi2::ATTR_EFF_DRAM_GEN, i_target, o_setting) );
-
- fapi_try_exit:
- return fapi2::current_err;
- }
-
- ///
- /// @brief attribute setter
- /// @param[in] i_target the MCS target
- /// @param[in] i_setting array to set
- /// @return FAPI2_RC_SUCCESS iff okay
- ///
- static fapi2::ReturnCode set_attr(const fapi2::Target<TARGET_TYPE>& i_target,
- const attr_type& i_setting)
- {
- attr_type l_data = {};
- memcpy(l_data, i_setting, sizeof(l_data));
-
- FAPI_TRY( FAPI_ATTR_SET(fapi2::ATTR_EFF_DRAM_GEN, i_target, l_data) );
-
- fapi_try_exit:
- return fapi2::current_err;
- }
-};
-
-///
-/// @brief Traits for pre_data_engine
-/// @class preDataInitTraits
-/// @note NIMBUS, HYBRID specialization
-///
-template<>
-class preDataInitTraits<mss::proc_type::NIMBUS, HYBRID>
-{
- public:
- using attr_type = fapi2::ATTR_EFF_HYBRID_Type;
- static const fapi2::TargetType TARGET_TYPE = fapi2::ATTR_EFF_HYBRID_TargetType;
-
- ///
- /// @brief attribute getter
- /// @param[in] i_target the MCS target
- /// @param[out] o_setting array to populate
- /// @return FAPI2_RC_SUCCESS iff okay
- ///
- static fapi2::ReturnCode get_attr(const fapi2::Target<TARGET_TYPE>& i_target,
- attr_type& o_setting)
- {
- FAPI_TRY( FAPI_ATTR_GET(fapi2::ATTR_EFF_HYBRID, i_target, o_setting) );
-
- fapi_try_exit:
- return fapi2::current_err;
- }
-
- ///
- /// @brief attribute setter
- /// @param[in] i_target the MCS target
- /// @param[in] i_setting array to set
- /// @return FAPI2_RC_SUCCESS iff okay
- ///
- static fapi2::ReturnCode set_attr(const fapi2::Target<TARGET_TYPE>& i_target,
- const attr_type& i_setting)
- {
- attr_type l_data = {};
- memcpy(l_data, i_setting, sizeof(l_data));
-
- FAPI_TRY( FAPI_ATTR_SET(fapi2::ATTR_EFF_HYBRID, i_target, l_data) );
-
- fapi_try_exit:
- return fapi2::current_err;
- }
-};
-
-///
-/// @brief Traits for pre_data_engine
-/// @class preDataInitTraits
-/// @note NIMBUS, HYBRID_MEDIA specialization
-///
-template<>
-class preDataInitTraits<mss::proc_type::NIMBUS, HYBRID_MEDIA>
-{
- public:
- using attr_type = fapi2::ATTR_EFF_HYBRID_MEMORY_TYPE_Type;
- static const fapi2::TargetType TARGET_TYPE = fapi2::ATTR_EFF_HYBRID_MEMORY_TYPE_TargetType;
-
- ///
- /// @brief attribute getter
- /// @param[in] i_target the MCS target
- /// @param[out] o_setting array to populate
- /// @return FAPI2_RC_SUCCESS iff okay
- ///
- static fapi2::ReturnCode get_attr(const fapi2::Target<TARGET_TYPE>& i_target,
- attr_type& o_setting)
- {
- FAPI_TRY( FAPI_ATTR_GET(fapi2::ATTR_EFF_HYBRID_MEMORY_TYPE, i_target, o_setting) );
-
- fapi_try_exit:
- return fapi2::current_err;
- }
-
- ///
- /// @brief attribute setter
- /// @param[in] i_target the MCS target
- /// @param[in] i_setting array to set
- /// @return FAPI2_RC_SUCCESS iff okay
- ///
- static fapi2::ReturnCode set_attr(const fapi2::Target<TARGET_TYPE>& i_target,
- const attr_type& i_setting)
- {
- attr_type l_data = {};
- memcpy(l_data, i_setting, sizeof(l_data));
-
- FAPI_TRY( FAPI_ATTR_SET(fapi2::ATTR_EFF_HYBRID_MEMORY_TYPE, i_target, l_data) );
-
- fapi_try_exit:
- return fapi2::current_err;
- }
-};
-
-///
-/// @brief Traits for pre_data_engine
-/// @class preDataInitTraits
-/// @note NIMBUS, MRANKS specialization
-///
-template<>
-class preDataInitTraits<mss::proc_type::NIMBUS, MRANKS>
-{
- public:
- using attr_type = fapi2::ATTR_EFF_NUM_MASTER_RANKS_PER_DIMM_Type;
- static const fapi2::TargetType TARGET_TYPE = fapi2::ATTR_EFF_NUM_MASTER_RANKS_PER_DIMM_TargetType;
-
- ///
- /// @brief attribute getter
- /// @param[in] i_target the MCS target
- /// @param[out] o_setting array to populate
- /// @return FAPI2_RC_SUCCESS iff okay
- ///
- static fapi2::ReturnCode get_attr(const fapi2::Target<TARGET_TYPE>& i_target,
- attr_type& o_setting)
- {
- FAPI_TRY( FAPI_ATTR_GET(fapi2::ATTR_EFF_NUM_MASTER_RANKS_PER_DIMM, i_target, o_setting) );
-
- fapi_try_exit:
- return fapi2::current_err;
- }
-
- ///
- /// @brief attribute setter
- /// @param[in] i_target the MCS target
- /// @param[in] i_setting array to set
- /// @return FAPI2_RC_SUCCESS iff okay
- ///
- static fapi2::ReturnCode set_attr(const fapi2::Target<TARGET_TYPE>& i_target,
- const attr_type& i_setting)
- {
- attr_type l_data = {};
- memcpy(l_data, i_setting, sizeof(l_data));
-
- FAPI_TRY( FAPI_ATTR_SET(fapi2::ATTR_EFF_NUM_MASTER_RANKS_PER_DIMM, i_target, l_data) );
-
- fapi_try_exit:
- return fapi2::current_err;
- }
-};
-
-///
-/// @brief Traits for pre_data_engine
-/// @class preDataInitTraits
-/// @note NIMBUS, DIMM_RANKS_CNFG specialization
-///
-template<>
-class preDataInitTraits<mss::proc_type::NIMBUS, DIMM_RANKS_CNFG>
-{
- public:
- using attr_type = fapi2::ATTR_EFF_DIMM_RANKS_CONFIGED_Type;
- static const fapi2::TargetType TARGET_TYPE = fapi2::ATTR_EFF_NUM_MASTER_RANKS_PER_DIMM_TargetType;
-
- ///
- /// @brief attribute getter
- /// @param[in] i_target the MCS target
- /// @param[out] o_setting array to populate
- /// @return FAPI2_RC_SUCCESS iff okay
- ///
- static fapi2::ReturnCode get_attr(const fapi2::Target<TARGET_TYPE>& i_target,
- attr_type& o_setting)
- {
- FAPI_TRY( FAPI_ATTR_GET(fapi2::ATTR_EFF_DIMM_RANKS_CONFIGED, i_target, o_setting) );
-
- fapi_try_exit:
- return fapi2::current_err;
- }
-
- ///
- /// @brief attribute setter
- /// @param[in] i_target the MCS target
- /// @param[in] i_setting array to set
- /// @return FAPI2_RC_SUCCESS iff okay
- ///
- static fapi2::ReturnCode set_attr(const fapi2::Target<TARGET_TYPE>& i_target,
- const attr_type& i_setting)
- {
- attr_type l_data = {};
- memcpy(l_data, i_setting, sizeof(l_data));
-
- FAPI_TRY( FAPI_ATTR_SET(fapi2::ATTR_EFF_DIMM_RANKS_CONFIGED, i_target, l_data) );
-
- fapi_try_exit:
- return fapi2::current_err;
- }
-};
-
// =========================================================
// DDR4 SPD Document Release 4
// Byte 2 (0x002): Key Byte / DRAM Device Type
@@ -389,126 +111,4 @@ const std::vector< std::pair<uint8_t, uint8_t> > pre_data_engine<mss::proc_type:
{3, fapi2::ENUM_ATTR_EFF_NUM_MASTER_RANKS_PER_DIMM_4R},
};
-///
-/// @brief Set ATTR_EFF_DIMM_TYPE
-/// @return FAPI2_RC_SUCCESS iff ok
-///
-template<>
-fapi2::ReturnCode pre_data_engine<mss::proc_type::NIMBUS>::set_dimm_type()
-{
- uint8_t l_base_module_type = 0;
- uint8_t l_dimm_type = 0;
-
- FAPI_TRY(iv_spd_data.base_module(l_base_module_type));
- FAPI_TRY(lookup_table_check(iv_dimm, BASE_MODULE_TYPE_MAP, SET_ATTR_DIMM_TYPE, l_base_module_type, l_dimm_type));
- FAPI_TRY( (set_field<mss::proc_type::NIMBUS, DIMM_TYPE>(iv_dimm, l_dimm_type)) );
-
-fapi_try_exit:
- return fapi2::current_err;
-}
-
-///
-/// @brief Set ATTR_EFF_DRAM_GEN
-/// @return FAPI2_RC_SUCCESS iff ok
-///
-template<>
-fapi2::ReturnCode pre_data_engine<mss::proc_type::NIMBUS>::set_dram_gen()
-{
- uint8_t l_device_type = 0;
- uint8_t l_dram_gen = 0;
-
- FAPI_TRY(iv_spd_data.device_type(l_device_type));
- FAPI_TRY(lookup_table_check(iv_dimm, DRAM_GEN_MAP, SET_ATTR_DRAM_GEN, l_device_type, l_dram_gen));
-
- FAPI_TRY( (set_field<mss::proc_type::NIMBUS, DRAM_GEN>(iv_dimm, l_dram_gen)) );
-
-fapi_try_exit:
- return fapi2::current_err;
-}
-
-///
-/// @brief Set ATTR_EFF_HYBRID
-/// @return FAPI2_RC_SUCCESS iff ok
-///
-template<>
-fapi2::ReturnCode pre_data_engine<mss::proc_type::NIMBUS>::set_hybrid()
-{
- uint8_t l_spd_hybrid_type = 0;
- uint8_t l_hybrid = 0;
-
- FAPI_TRY(iv_spd_data.hybrid(l_spd_hybrid_type));
- FAPI_TRY(lookup_table_check(iv_dimm, HYBRID_MAP, SET_ATTR_HYBRID, l_spd_hybrid_type, l_hybrid));
-
- FAPI_TRY( (set_field<mss::proc_type::NIMBUS, HYBRID>(iv_dimm, l_hybrid)) );
-
-fapi_try_exit:
- return fapi2::current_err;
-}
-
-///
-/// @brief Set ATTR_EFF_HYBRID_MEMORY_TYPE
-/// @return FAPI2_RC_SUCCESS iff ok
-///
-template<>
-fapi2::ReturnCode pre_data_engine<mss::proc_type::NIMBUS>::set_hybrid_media()
-{
- uint8_t l_hybrid_media = 0;
- uint8_t l_spd_hybrid_media = 0;
-
- FAPI_TRY(iv_spd_data.hybrid_media(l_spd_hybrid_media));
- FAPI_TRY(lookup_table_check(iv_dimm, HYBRID_MAP, SET_ATTR_HYBRID, l_spd_hybrid_media, l_hybrid_media));
-
- FAPI_TRY( (set_field<mss::proc_type::NIMBUS, HYBRID_MEDIA>(iv_dimm, l_hybrid_media)) );
-
-fapi_try_exit:
- return fapi2::current_err;
-}
-
-///
-/// @brief Set ATTR_EFF_NUM_MASTER_RANKS_PER_DIMM
-/// @return FAPI2_RC_SUCCESS iff ok
-///
-template<>
-fapi2::ReturnCode pre_data_engine<mss::proc_type::NIMBUS>::set_master_ranks()
-{
- // Sets up commonly used member variables
- uint8_t l_master_ranks_spd = 0;
- uint8_t l_master_ranks_to_set = 0;
- FAPI_TRY(iv_spd_data.num_package_ranks_per_dimm(l_master_ranks_spd),
- "%s failed to get number of package ranks from SPD", spd::c_str(iv_dimm));
- FAPI_TRY(lookup_table_check(iv_dimm, NUM_PACKAGE_RANKS_MAP, PRE_DATA_ENGINE_CTOR, l_master_ranks_spd,
- l_master_ranks_to_set), "%s failed MASTER_RANKS lookup check", spd::c_str(iv_dimm));
-
- FAPI_TRY( (set_field<mss::proc_type::NIMBUS, MRANKS>(iv_dimm, l_master_ranks_to_set)) );
-
-fapi_try_exit:
- return fapi2::current_err;
-}
-
-///
-/// @brief Sets ATTR_EFF_DIMM_RANKS_CONFIGED
-/// @return FAPI2_RC_SUCCESS iff okay
-///
-template<>
-fapi2::ReturnCode pre_data_engine<mss::proc_type::NIMBUS>::set_dimm_ranks_configured()
-{
- // Set configed ranks. Set the bit representing the master rank configured (0 being left most.) So,
- // a 4R DIMM would be 0b11110000 (0xF0). This is used by PRD.
- fapi2::buffer<uint8_t> l_ranks_configed;
- uint8_t l_master_ranks = 0;
-
- // Make sure the number of master ranks is setup
- FAPI_TRY( set_master_ranks(), "%s Failed to set the number of master ranks", spd::c_str(iv_dimm) );
- FAPI_TRY( eff_num_master_ranks_per_dimm(iv_dimm, l_master_ranks),
- "%s Failed to get the number of master ranks", spd::c_str(iv_dimm) );
-
- FAPI_TRY( l_ranks_configed.setBit(0, l_master_ranks),
- "%s. Failed to setBit", spd::c_str(iv_dimm) );
-
- FAPI_TRY( (set_field<mss::proc_type::NIMBUS, DIMM_RANKS_CNFG>(iv_dimm, uint8_t(l_ranks_configed))) );
-
-fapi_try_exit:
- return fapi2::current_err;
-}
-
}//mss
diff --git a/src/import/chips/p9/procedures/xml/error_info/p9_memory_mss_general_errors.xml b/src/import/chips/p9/procedures/xml/error_info/p9_memory_mss_general_errors.xml
index 7264ed78f..292bb393f 100644
--- a/src/import/chips/p9/procedures/xml/error_info/p9_memory_mss_general_errors.xml
+++ b/src/import/chips/p9/procedures/xml/error_info/p9_memory_mss_general_errors.xml
@@ -5,7 +5,7 @@
<!-- -->
<!-- OpenPOWER HostBoot Project -->
<!-- -->
-<!-- Contributors Listed Below - COPYRIGHT 2016,2018 -->
+<!-- Contributors Listed Below - COPYRIGHT 2016,2019 -->
<!-- [+] International Business Machines Corp. -->
<!-- -->
<!-- -->
@@ -62,73 +62,4 @@
</callout>
</hwpError>
- <hwpError>
- <rc>RC_MSS_UNEXPECTED_VALUE_SEEN</rc>
- <description> Invalid value seen versus the expected value wanted </description>
- <ffdc>TARGET</ffdc>
- <ffdc>EXPECTED</ffdc>
- <ffdc>ACTUAL</ffdc>
- <ffdc>FUNCTION</ffdc>
- <callout>
- <procedure>CODE</procedure>
- <priority>LOW</priority>
- </callout>
- </hwpError>
-
- <hwpError>
- <rc>RC_MSS_OUT_OF_BOUNDS_INDEXING</rc>
- <description>
- Desired index is larger than list (std::vector, array, etc.) size.
- Likely a programming error.
- </description>
- <ffdc>TARGET</ffdc>
- <ffdc>INDEX</ffdc>
- <ffdc>LIST_SIZE</ffdc>
- <ffdc>FUNCTION</ffdc>
- <callout>
- <procedure>CODE</procedure>
- <priority>LOW</priority>
- </callout>
- </hwpError>
-
- <hwpError>
- <rc>RC_MSS_CONVERSION_ERROR</rc>
- <description>
- Overflow or underflow occured converting one integral type to another.
- This is a programming error.
- </description>
- <ffdc>TARGET</ffdc>
- <ffdc>ORIGINAL_VAL</ffdc>
- <ffdc>CONVERTED_VAL</ffdc>
- <ffdc>FUNCTION</ffdc>
- <callout>
- <procedure>CODE</procedure>
- <priority>LOW</priority>
- </callout>
- </hwpError>
-
-
- <hwpError>
- <rc>RC_MSS_FAILED_DATA_INTEGRITY_CHECK</rc>
- <description>
- Bad data received.
- Settings are incorrect for received data.
- This could be code problem (decoding) or bad data.
- </description>
- <ffdc>VALUE</ffdc>
- <ffdc>BYTE</ffdc>
- <ffdc>FFDC_CODE</ffdc>
- <callout>
- <procedure>CODE</procedure>
- <priority>MEDIUM</priority>
- </callout>
- <callout>
- <target>TARGET</target>
- <priority>HIGH</priority>
- </callout>
- <deconfigure>
- <target>TARGET</target>
- </deconfigure>
- </hwpError>
-
</hwpErrors>
OpenPOWER on IntegriCloud