diff options
author | Mark Pizzutillo <Mark.Pizzutillo@ibm.com> | 2019-08-26 18:02:37 -0400 |
---|---|---|
committer | Christian R Geddes <crgeddes@us.ibm.com> | 2019-09-27 13:49:09 -0500 |
commit | 48abe5e8afb54e389f45233e66e100a501d038e8 (patch) | |
tree | 2a930b0edc5367239fc100baf5df1b45185cf8eb /src/import/generic/memory/lib/spd | |
parent | 04d5973bec03c271184ff87f1e0dbb3aa57857d4 (diff) | |
download | talos-hostboot-48abe5e8afb54e389f45233e66e100a501d038e8.tar.gz talos-hostboot-48abe5e8afb54e389f45233e66e100a501d038e8.zip |
Add support for new pmic sequencing SPD fields
Change-Id: I8847090585161375fbb2c0ef853cffed80a67cc3
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/82961
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Louis Stermole <stermole@us.ibm.com>
Reviewed-by: STEPHEN GLANCY <sglancy@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com>
Reviewed-by: Jennifer A Stofer <stofer@us.ibm.com>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/83375
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Christian R Geddes <crgeddes@us.ibm.com>
Diffstat (limited to 'src/import/generic/memory/lib/spd')
5 files changed, 94 insertions, 46 deletions
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 c8ab503ec..b1c47aa3f 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 @@ -1492,6 +1492,28 @@ class dimm_module_decoder } /// + /// @brief Decodes PMIC0 Sequence Order + /// @param[out] o_output encoding from SPD + /// @return FAPI2_RC_SUCCESS if okay + /// + virtual fapi2::ReturnCode sequence_pmic0(uint8_t& o_output) const + { + o_output = 0; + return fapi2::FAPI2_RC_SUCCESS; + } + + /// + /// @brief Decodes PMIC1 Sequence Order + /// @param[out] o_output encoding from SPD + /// @return FAPI2_RC_SUCCESS if okay + /// + virtual fapi2::ReturnCode sequence_pmic1(uint8_t& o_output) const + { + o_output = 0; + return fapi2::FAPI2_RC_SUCCESS; + } + + /// /// @brief Decodes DRAM Manufacturer ID code /// @param[out] o_value dram manufacturing id code /// @return FAPI2_RC_SUCCESS iff okay 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 7c1b4f5c9..b72fde057 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 @@ -642,19 +642,6 @@ class decoder< DDR4, DDIMM_MODULE, R > : public dimm_module_decoder } /// - /// @brief Decodes VDD_Core PMIC0 -> VDD_CORE_PMIC0 - /// @param[out] o_output encoding from SPD - /// @return FAPI2_RC_SUCCESS if okay - /// - virtual fapi2::ReturnCode vdd_core_pmic0(uint8_t& o_output) const override - { - FAPI_TRY( (mss::spd::reader<fields_t::VDD_CORE_PMIC0, R>(iv_target, iv_data, o_output)) ); - - fapi_try_exit: - return fapi2::current_err; - } - - /// /// @brief Decodes PMIC0 Manfacture ID code 2nd byte /// @param[out] o_output encoding from SPD - multiple fields used /// @return FAPI2_RC_SUCCESS if okay @@ -696,19 +683,6 @@ class decoder< DDR4, DDIMM_MODULE, R > : public dimm_module_decoder } /// - /// @brief Decodes VDD_Core PMIC1 -> VDD_CORE_PMIC1 - /// @param[out] o_output encoding from SPD - /// @return FAPI2_RC_SUCCESS if okay - /// - virtual fapi2::ReturnCode vdd_core_pmic1(uint8_t& o_output) const override - { - FAPI_TRY( (mss::spd::reader<fields_t::VDD_CORE_PMIC1, R>(iv_target, iv_data, o_output)) ); - - fapi_try_exit: - return fapi2::current_err; - } - - /// /// @brief Decodes PMIC1 Manfacture ID code 2nd byte /// @param[out] o_output encoding from SPD - multiple fields used /// @return FAPI2_RC_SUCCESS if okay @@ -1400,6 +1374,32 @@ class decoder< DDR4, DDIMM_MODULE, R > : public dimm_module_decoder } /// + /// @brief Decodes PMIC1 Sequence -> PMIC0_SEQUENCE + /// @param[out] o_output encoding from SPD + /// @return FAPI2_RC_SUCCESS if okay + /// + virtual fapi2::ReturnCode sequence_pmic0(uint8_t& o_output) const override + { + FAPI_TRY((mss::spd::reader<fields_t::PMIC0_SEQUENCE, R>(iv_target, iv_data, o_output))); + + fapi_try_exit: + return fapi2::current_err; + } + + /// + /// @brief Decodes PMIC1 Sequence -> PMIC1_SEQUENCE + /// @param[out] o_output encoding from SPD + /// @return FAPI2_RC_SUCCESS if okay + /// + virtual fapi2::ReturnCode sequence_pmic1(uint8_t& o_output) const override + { + FAPI_TRY((mss::spd::reader<fields_t::PMIC1_SEQUENCE, R>(iv_target, iv_data, o_output))); + + fapi_try_exit: + return fapi2::current_err; + } + + /// /// @brief Decodes DRAM manufacturing ID Code /// @param[out] o_output encoding from SPD /// @return FAPI2_RC_SUCCESS if okay diff --git a/src/import/generic/memory/lib/spd/spd_facade.H b/src/import/generic/memory/lib/spd/spd_facade.H index 009059c09..d28138dba 100644 --- a/src/import/generic/memory/lib/spd/spd_facade.H +++ b/src/import/generic/memory/lib/spd/spd_facade.H @@ -2418,6 +2418,19 @@ class facade final } /// + /// @brief Decodes PMIC0 Sequence -> PMIC0_SEQUENCE + /// @param[out] o_output encoding from SPD + /// @return FAPI2_RC_SUCCESS if okay + /// + fapi2::ReturnCode sequence_pmic0(uint8_t& o_output) const + { + FAPI_TRY( iv_dimm_module_decoder->sequence_pmic0(o_output) ); + + fapi_try_exit: + return fapi2::current_err; + } + + /// /// @brief Decodes PMIC1 SWA Voltage Setting -> PMIC1_SWA_VOLT_SET /// @param[out] o_output encoding from SPD /// @return FAPI2_RC_SUCCESS if okay @@ -2741,6 +2754,19 @@ class facade final fapi_try_exit: return fapi2::current_err; } + + /// + /// @brief Decodes PMIC0 Sequence -> PMIC0_SEQUENCE + /// @param[out] o_output encoding from SPD + /// @return FAPI2_RC_SUCCESS if okay + /// + fapi2::ReturnCode sequence_pmic1(uint8_t& o_output) const + { + FAPI_TRY( iv_dimm_module_decoder->sequence_pmic1(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 194eba510..b60e69222 100644 --- a/src/import/generic/memory/lib/spd/spd_fields_ddr4.H +++ b/src/import/generic/memory/lib/spd/spd_fields_ddr4.H @@ -959,10 +959,10 @@ class fields<DDR4, DDIMM_MODULE> VIN_BULK_ENDURANT_START = 6, VIN_BULK_ENDURANT_LEN = 2, - // Byte 226: VDD_Core PMIC0 - VDD_CORE_PMIC0_BYTE = 226, - VDD_CORE_PMIC0_START = 0, - VDD_CORE_PMIC0_LEN = 8, + // Byte 226: PMIC0 Sequence + PMIC0_SEQUENCE_BYTE = 226, + PMIC0_SEQUENCE_START = 0, + PMIC0_SEQUENCE_LEN = 8, // Byte 227: PMIC0 Manfacture ID code 1st byte PMIC0_MFG_CODE1_BYTE = 227, @@ -979,10 +979,10 @@ class fields<DDR4, DDIMM_MODULE> PMIC0_REV_START = 0, PMIC0_REV_LEN = 8, - // Byte 230: VDD_Core PMIC1 - VDD_CORE_PMIC1_BYTE = 230, - VDD_CORE_PMIC1_START = 0, - VDD_CORE_PMIC1_LEN = 8, + // Byte 230: PMIC1 Sequence + PMIC1_SEQUENCE_BYTE = 230, + PMIC1_SEQUENCE_START = 0, + PMIC1_SEQUENCE_LEN = 8, // Byte 231: PMIC1 Manfacture ID code 1st byte PMIC1_MFG_CODE1_BYTE = 231, @@ -1288,8 +1288,8 @@ class fields<DDR4, DDIMM_MODULE> static constexpr field_t VIN_BULK_OPERABLE{VIN_BULK_BYTE, VIN_BULK_OPERABLE_START, VIN_BULK_OPERABLE_LEN}; static constexpr field_t VIN_BULK_ENDURANT{VIN_BULK_BYTE, VIN_BULK_ENDURANT_START, VIN_BULK_ENDURANT_LEN}; - // Byte 226: VDD_Core PMIC0 - static constexpr field_t VDD_CORE_PMIC0{VDD_CORE_PMIC0_BYTE, VDD_CORE_PMIC0_START, VDD_CORE_PMIC0_LEN}; + // Byte 226: PMIC0 Sequence + static constexpr field_t PMIC0_SEQUENCE{PMIC0_SEQUENCE_BYTE, PMIC0_SEQUENCE_START, PMIC0_SEQUENCE_LEN}; // Byte 227: PMIC0 Manfacture ID code 1st byte static constexpr field_t PMIC0_CONT_CODE{PMIC0_MFG_CODE1_BYTE, PMIC0_CONT_CODE_START, PMIC0_CONT_CODE_LEN}; @@ -1300,8 +1300,8 @@ class fields<DDR4, DDIMM_MODULE> // Byte 229: PMIC0 Revision Number static constexpr field_t PMIC0_REV{PMIC0_REV_BYTE, PMIC0_REV_START, PMIC0_REV_LEN}; - // Byte 230: VDD_Core PMIC1 - static constexpr field_t VDD_CORE_PMIC1{VDD_CORE_PMIC1_BYTE, VDD_CORE_PMIC1_START, VDD_CORE_PMIC1_LEN}; + // Byte 230: PMIC1 Sequence + static constexpr field_t PMIC1_SEQUENCE{PMIC1_SEQUENCE_BYTE, PMIC1_SEQUENCE_START, PMIC1_SEQUENCE_LEN}; // Byte 231: PMIC1 Manfacture ID code 1st byte static constexpr field_t PMIC1_CONT_CODE{PMIC1_MFG_CODE1_BYTE, PMIC1_CONT_CODE_START, PMIC1_CONT_CODE_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 eb0fde595..a26ab64e3 100644 --- a/src/import/generic/memory/lib/spd/spd_traits_ddr4.H +++ b/src/import/generic/memory/lib/spd/spd_traits_ddr4.H @@ -4450,16 +4450,16 @@ class readerTraits < fields< DDR4, DDIMM_MODULE>::VIN_BULK_ENDURANT, R > /// @class readerTraits /// @brief trait structure to hold static SPD information /// @tparam R the revision of the SPD field -/// @note VDD_CORE_PMIC0 field specialization +/// @note PMIC0_SEQUENCE field specialization /// @note valid for all revs /// template< rev R > -class readerTraits < fields< DDR4, DDIMM_MODULE>::VDD_CORE_PMIC0, R > +class readerTraits < fields< DDR4, DDIMM_MODULE>::PMIC0_SEQUENCE, R > { public: - static constexpr size_t COMPARISON_VAL = 0xff; - static constexpr const char* FIELD_STR = "VDD_Core PMIC0"; + static constexpr size_t COMPARISON_VAL = 0x4; + static constexpr const char* FIELD_STR = "PMIC0 Sequence"; template <typename T> using COMPARISON_OP = std::less_equal<T>; @@ -4526,16 +4526,16 @@ class readerTraits < fields< DDR4, DDIMM_MODULE>::PMIC0_REV, R > /// @class readerTraits /// @brief trait structure to hold static SPD information /// @tparam R the revision of the SPD field -/// @note VDD_CORE_PMIC1 field specialization +/// @note PMIC1_SEQUENCE field specialization /// @note valid for all revs /// template< rev R > -class readerTraits < fields< DDR4, DDIMM_MODULE>::VDD_CORE_PMIC1, R > +class readerTraits < fields< DDR4, DDIMM_MODULE>::PMIC1_SEQUENCE, R > { public: - static constexpr size_t COMPARISON_VAL = 0xff; - static constexpr const char* FIELD_STR = "VDD_Core PMIC1"; + static constexpr size_t COMPARISON_VAL = 0x04; + static constexpr const char* FIELD_STR = "PMIC1 Sequence"; template <typename T> using COMPARISON_OP = std::less_equal<T>; |