summaryrefslogtreecommitdiffstats
path: root/src/import
diff options
context:
space:
mode:
Diffstat (limited to 'src/import')
-rw-r--r--src/import/generic/memory/lib/data_engine/attr_engine_traits.H52
-rw-r--r--src/import/generic/memory/lib/data_engine/data_engine_traits_def.H5
-rw-r--r--src/import/generic/memory/lib/mss_generic_attribute_getters.H22
-rw-r--r--src/import/generic/memory/lib/spd/common/dimm_module_decoder.H17
-rw-r--r--src/import/generic/memory/lib/spd/ddimm/ddr4/ddimm_decoder_ddr4.H8
-rw-r--r--src/import/generic/memory/lib/spd/spd_facade.H8
-rw-r--r--src/import/generic/memory/lib/spd/spd_fields_ddr4.H14
-rw-r--r--src/import/generic/memory/lib/spd/spd_traits_ddr4.H6
-rw-r--r--src/import/generic/memory/lib/utils/shared/mss_generic_consts.H3
-rw-r--r--src/import/generic/procedures/xml/attribute_info/generic_memory_eff_attributes.xml14
10 files changed, 122 insertions, 27 deletions
diff --git a/src/import/generic/memory/lib/data_engine/attr_engine_traits.H b/src/import/generic/memory/lib/data_engine/attr_engine_traits.H
index adfd81b3f..ebcd02c8c 100644
--- a/src/import/generic/memory/lib/data_engine/attr_engine_traits.H
+++ b/src/import/generic/memory/lib/data_engine/attr_engine_traits.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2019 */
+/* Contributors Listed Below - COPYRIGHT 2019,2020 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -3466,6 +3466,56 @@ struct attrEngineTraits<P, attr_eff_engine_fields, attr_eff_engine_fields::DRAM_
}
};
+///
+/// @brief Traits for attr_engine
+/// @class attrEngineTraits
+/// @note attr_engine_derived_fields, SPD_REVISION specialization
+///
+template < proc_type P >
+struct attrEngineTraits<P, attr_eff_engine_fields, attr_eff_engine_fields::SPD_REVISION>
+{
+ using attr_type = fapi2::ATTR_MEM_EFF_SPD_REVISION_Type;
+ using attr_integral_type = std::remove_all_extents<attr_type>::type;
+ static constexpr fapi2::TargetType TARGET_TYPE = fapi2::ATTR_MEM_EFF_SPD_REVISION_TargetType;
+ static constexpr generic_ffdc_codes FFDC_CODE = SET_SPD_REVISION;
+
+ ///
+ /// @brief attribute getter
+ /// @param[in] i_target the fapi2 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)
+ {
+ return mss::attr::get_spd_revision(i_target, o_setting);
+ }
+
+ ///
+ /// @brief attribute setter
+ /// @param[in] i_target the attr 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,
+ attr_type& i_setting)
+ {
+ return mss::attr::set_spd_revision(i_target, i_setting);
+ }
+
+ ///
+ /// @brief Computes setting for attribute
+ /// @param[in] i_efd_data EFD data
+ /// @param[out] o_setting value we want to set attr with
+ /// @return FAPI2_RC_SUCCESS iff okay
+ ///
+ static inline fapi2::ReturnCode get_value_to_set(const spd::facade& i_spd_data,
+ attr_integral_type& o_setting)
+ {
+ return i_spd_data.revision(o_setting);
+ }
+};
+
}//mss
#endif
diff --git a/src/import/generic/memory/lib/data_engine/data_engine_traits_def.H b/src/import/generic/memory/lib/data_engine/data_engine_traits_def.H
index bdc16dc6a..4852da6b1 100644
--- a/src/import/generic/memory/lib/data_engine/data_engine_traits_def.H
+++ b/src/import/generic/memory/lib/data_engine/data_engine_traits_def.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2018,2019 */
+/* Contributors Listed Below - COPYRIGHT 2018,2020 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -118,9 +118,10 @@ enum class attr_eff_engine_fields
DRAM_MFG_ID = 23,
RCD_MFG_ID = 24,
DRAM_MODULE_HEIGHT = 25,
+ SPD_REVISION = 26,
// Dispatcher set to last enum value
- DISPATCHER = DRAM_MODULE_HEIGHT,
+ DISPATCHER = SPD_REVISION,
};
///
diff --git a/src/import/generic/memory/lib/mss_generic_attribute_getters.H b/src/import/generic/memory/lib/mss_generic_attribute_getters.H
index 0dc348821..f18b799ea 100644
--- a/src/import/generic/memory/lib/mss_generic_attribute_getters.H
+++ b/src/import/generic/memory/lib/mss_generic_attribute_getters.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2018,2019 */
+/* Contributors Listed Below - COPYRIGHT 2018,2020 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -2854,6 +2854,26 @@ fapi_try_exit:
return fapi2::current_err;
}
+///
+/// @brief ATTR_MEM_EFF_SPD_REVISION getter
+/// @param[in] const ref to the TARGET_TYPE_MEM_PORT
+/// @param[out] uint8_t& reference to store the value
+/// @note Generated by gen_accessors.pl generate_mc_port_params
+/// @return fapi2::ReturnCode - FAPI2_RC_SUCCESS iff get is OK
+/// @note SPD Revision (SPD Byte 1)
+///
+inline fapi2::ReturnCode get_spd_revision(const fapi2::Target<fapi2::TARGET_TYPE_MEM_PORT>& i_target, uint8_t& o_value)
+{
+
+ FAPI_TRY( FAPI_ATTR_GET(fapi2::ATTR_MEM_EFF_SPD_REVISION, i_target, o_value) );
+ return fapi2::current_err;
+
+fapi_try_exit:
+ FAPI_ERR("failed getting ATTR_MEM_EFF_SPD_REVISION: 0x%lx (target: %s)",
+ uint64_t(fapi2::current_err), mss::c_str(i_target));
+ return fapi2::current_err;
+}
+
///
/// @brief ATTR_MEM_EFF_VOLT_VDDR getter
diff --git a/src/import/generic/memory/lib/spd/common/dimm_module_decoder.H b/src/import/generic/memory/lib/spd/common/dimm_module_decoder.H
index b1c47aa3f..7ccd72116 100644
--- a/src/import/generic/memory/lib/spd/common/dimm_module_decoder.H
+++ b/src/import/generic/memory/lib/spd/common/dimm_module_decoder.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2016,2019 */
+/* Contributors Listed Below - COPYRIGHT 2016,2020 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -107,6 +107,17 @@ class dimm_module_decoder
}
///
+ /// @brief Decodes SPD Revision -> SPD_REVISION
+ /// @param[out] o_output encoding from SPD
+ /// @return FAPI2_RC_SUCCESS if okay
+ ///
+ virtual fapi2::ReturnCode revision(uint8_t& o_output) const
+ {
+ o_output = 0;
+ return fapi2::FAPI2_RC_SUCCESS;
+ }
+
+ ///
/// @brief Decodes module nominal height max
/// @param[out] o_output height range encoding from SPD
/// @return FAPI2_RC_SUCCESS if okay
@@ -559,11 +570,11 @@ class dimm_module_decoder
// DDIMM information from here on out
//////////////////////////////////////////
///
- /// @brief Decodes SPD Revision for bytes 192->447 -> SPD_REVISION
+ /// @brief Decodes SPD Revision for bytes 192->447 -> SPD_REV_DDIMM_MODULE
/// @param[out] o_output encoding from SPD
/// @return FAPI2_RC_SUCCESS if okay
///
- virtual fapi2::ReturnCode ddimm_spd_revision(uint8_t& o_output) const
+ virtual fapi2::ReturnCode ddimm_module_spd_revision(uint8_t& o_output) const
{
o_output = 0;
return fapi2::FAPI2_RC_SUCCESS;
diff --git a/src/import/generic/memory/lib/spd/ddimm/ddr4/ddimm_decoder_ddr4.H b/src/import/generic/memory/lib/spd/ddimm/ddr4/ddimm_decoder_ddr4.H
index b72fde057..fb93691d2 100644
--- a/src/import/generic/memory/lib/spd/ddimm/ddr4/ddimm_decoder_ddr4.H
+++ b/src/import/generic/memory/lib/spd/ddimm/ddr4/ddimm_decoder_ddr4.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2018,2019 */
+/* Contributors Listed Below - COPYRIGHT 2018,2020 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -114,13 +114,13 @@ class decoder< DDR4, DDIMM_MODULE, R > : public dimm_module_decoder
}
///
- /// @brief Decodes SPD Revision for bytes 192->447 -> SPD_REVISION
+ /// @brief Decodes SPD Revision for bytes 192->447 -> SPD_REV_DDIMM_MODULE
/// @param[out] o_output encoding from SPD
/// @return FAPI2_RC_SUCCESS if okay
///
- virtual fapi2::ReturnCode ddimm_spd_revision(uint8_t& o_output) const override
+ virtual fapi2::ReturnCode ddimm_module_spd_revision(uint8_t& o_output) const override
{
- FAPI_TRY( (mss::spd::reader<fields_t::SPD_REVISION, R>(iv_target, iv_data, o_output)) );
+ FAPI_TRY( (mss::spd::reader<fields_t::SPD_REV_DDIMM_MODULE, R>(iv_target, iv_data, o_output)) );
fapi_try_exit:
return fapi2::current_err;
diff --git a/src/import/generic/memory/lib/spd/spd_facade.H b/src/import/generic/memory/lib/spd/spd_facade.H
index d28138dba..53fe2a675 100644
--- a/src/import/generic/memory/lib/spd/spd_facade.H
+++ b/src/import/generic/memory/lib/spd/spd_facade.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2018,2019 */
+/* Contributors Listed Below - COPYRIGHT 2018,2020 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -1682,13 +1682,13 @@ class facade final
}
///
- /// @brief Decodes SPD Revision for bytes 192->447 -> SPD_REVISION
+ /// @brief Decodes SPD Revision for bytes 192->447 -> SPD_REV_DDIMM_MODULE
/// @param[out] o_output encoding from SPD
/// @return FAPI2_RC_SUCCESS if okay
///
- fapi2::ReturnCode ddimm_spd_revision(uint8_t& o_output) const
+ fapi2::ReturnCode ddimm_module_spd_revision(uint8_t& o_output) const
{
- FAPI_TRY( iv_dimm_module_decoder->ddimm_spd_revision(o_output) );
+ FAPI_TRY( iv_dimm_module_decoder->ddimm_module_spd_revision(o_output) );
fapi_try_exit:
return fapi2::current_err;
diff --git a/src/import/generic/memory/lib/spd/spd_fields_ddr4.H b/src/import/generic/memory/lib/spd/spd_fields_ddr4.H
index b60e69222..c05527045 100644
--- a/src/import/generic/memory/lib/spd/spd_fields_ddr4.H
+++ b/src/import/generic/memory/lib/spd/spd_fields_ddr4.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2018,2019 */
+/* Contributors Listed Below - COPYRIGHT 2018,2020 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -795,10 +795,10 @@ class fields<DDR4, DDIMM_MODULE>
enum
{
- // Byte 192: SPD Revision for bytes 192->447
- SPD_REV_BYTE = 192,
- SPD_REVISION_START = 0,
- SPD_REVISION_LEN = 8,
+ // Byte 192: SPD Revision DDIMM Module Type (bytes 192->447)
+ SPD_REV_DDIMM_MODULE_BYTE = 192,
+ SPD_REV_DDIMM_MODULE_START = 0,
+ SPD_REV_DDIMM_MODULE_LEN = 8,
// Byte 193: Module Height
MODULE_HEIGHT_BYTE = 193,
@@ -1192,8 +1192,8 @@ class fields<DDR4, DDIMM_MODULE>
// Second field - start bit
// Third field - bit length
- // Byte 192: SPD Revision for bytes 192->447
- static constexpr field_t SPD_REVISION{SPD_REV_BYTE, SPD_REVISION_START, SPD_REVISION_LEN};
+ // Byte 192: SPD Revision DDIMM Module Bytes (192->447)
+ static constexpr field_t SPD_REV_DDIMM_MODULE{SPD_REV_DDIMM_MODULE_BYTE, SPD_REV_DDIMM_MODULE_START, SPD_REV_DDIMM_MODULE_LEN};
// Byte 193: Module Height
static constexpr field_t MODULE_BASE_HEIGHT{MODULE_HEIGHT_BYTE, MODULE_BASE_HEIGHT_START, MODULE_BASE_HEIGHT_LEN};
diff --git a/src/import/generic/memory/lib/spd/spd_traits_ddr4.H b/src/import/generic/memory/lib/spd/spd_traits_ddr4.H
index a26ab64e3..fd60ba00f 100644
--- a/src/import/generic/memory/lib/spd/spd_traits_ddr4.H
+++ b/src/import/generic/memory/lib/spd/spd_traits_ddr4.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2018,2019 */
+/* Contributors Listed Below - COPYRIGHT 2018,2020 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -3690,11 +3690,11 @@ class readerTraits< fields<DDR4, LRDIMM_MODULE>::DATA_BUFFER_GAIN_ADJUST, R >
/// @class readerTraits
/// @brief trait structure to hold static SPD information
/// @tparam R the revision of the SPD field
-/// @note SPD_REVISION field specialization
+/// @note SPD_REV_DDIMM_MODULE field specialization
/// @note valid for all revs
///
template< rev R >
-class readerTraits < fields< DDR4, DDIMM_MODULE>::SPD_REVISION, R >
+class readerTraits < fields< DDR4, DDIMM_MODULE>::SPD_REV_DDIMM_MODULE, R >
{
public:
diff --git a/src/import/generic/memory/lib/utils/shared/mss_generic_consts.H b/src/import/generic/memory/lib/utils/shared/mss_generic_consts.H
index 414274469..77f177c40 100644
--- a/src/import/generic/memory/lib/utils/shared/mss_generic_consts.H
+++ b/src/import/generic/memory/lib/utils/shared/mss_generic_consts.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2018,2019 */
+/* Contributors Listed Below - COPYRIGHT 2018,2020 */
/* [+] Evan Lojewski */
/* [+] International Business Machines Corp. */
/* */
@@ -271,6 +271,7 @@ enum generic_ffdc_codes
SET_RCD_MFG_ID = 0x109B,
SET_DRAM_MODULE_HEIGHT = 0x109C,
+ SET_SPD_REVISION = 0x109D,
};
///
diff --git a/src/import/generic/procedures/xml/attribute_info/generic_memory_eff_attributes.xml b/src/import/generic/procedures/xml/attribute_info/generic_memory_eff_attributes.xml
index d434b72b2..50246bb19 100644
--- a/src/import/generic/procedures/xml/attribute_info/generic_memory_eff_attributes.xml
+++ b/src/import/generic/procedures/xml/attribute_info/generic_memory_eff_attributes.xml
@@ -5,7 +5,7 @@
<!-- -->
<!-- OpenPOWER HostBoot Project -->
<!-- -->
-<!-- Contributors Listed Below - COPYRIGHT 2018,2019 -->
+<!-- Contributors Listed Below - COPYRIGHT 2018,2020 -->
<!-- [+] International Business Machines Corp. -->
<!-- -->
<!-- -->
@@ -905,4 +905,16 @@
<mssAccessorName>volt_vpp</mssAccessorName>
</attribute>
+ <attribute>
+ <id>ATTR_MEM_EFF_SPD_REVISION</id>
+ <targetType>TARGET_TYPE_MEM_PORT</targetType>
+ <description>
+ SPD Revision (SPD Byte 1)
+ </description>
+ <initToZero></initToZero>
+ <valueType>uint8</valueType>
+ <writeable/>
+ <mssAccessorName>spd_revision</mssAccessorName>
+ </attribute>
+
</attributes>
OpenPOWER on IntegriCloud