diff options
Diffstat (limited to 'src/import/hwpf')
-rw-r--r-- | src/import/hwpf/fapi2/include/fapi2_vpd_access.H | 71 | ||||
-rw-r--r-- | src/import/hwpf/fapi2/include/vpd_access_defs.H | 2 |
2 files changed, 66 insertions, 7 deletions
diff --git a/src/import/hwpf/fapi2/include/fapi2_vpd_access.H b/src/import/hwpf/fapi2/include/fapi2_vpd_access.H index 97078f510..ee1532202 100644 --- a/src/import/hwpf/fapi2/include/fapi2_vpd_access.H +++ b/src/import/hwpf/fapi2/include/fapi2_vpd_access.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016,2018 */ +/* Contributors Listed Below - COPYRIGHT 2016,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -40,7 +40,9 @@ namespace fapi2 { /// constants for VPD Info -constexpr uint64_t VPD_INFO_INVALID = 0xffffffffffffffff; +constexpr uint64_t VPD_INFO_INVALID_64 = 0xffffffffffffffff; +constexpr uint64_t VPD_INFO_INVALID_16 = 0xffff; +constexpr uint64_t VPD_INFO_INVALID_8 = 0xff; /// @brief Specialized class representing required VPDInfo to be used /// in collecting VPD for the MCS target type. @@ -49,13 +51,14 @@ template<> class VPDInfo<TARGET_TYPE_MCS> { public: - // @brief VPDInfo constructor + /// @brief VPDInfo constructor + /// @param[in] Type of VPD data to return VPDInfo( const fapi2::MemVpdData& i_vpd_type) : iv_vpd_type(i_vpd_type), - iv_size(VPD_INFO_INVALID), - iv_freq_mhz(VPD_INFO_INVALID), - iv_rank_count_dimm_0(VPD_INFO_INVALID), - iv_rank_count_dimm_1(VPD_INFO_INVALID), + iv_size(VPD_INFO_INVALID_64), + iv_freq_mhz(VPD_INFO_INVALID_64), + iv_rank_count_dimm_0(VPD_INFO_INVALID_64), + iv_rank_count_dimm_1(VPD_INFO_INVALID_64), iv_is_config_ffdc_enabled(true) {}; // type of vpd field to return @@ -63,12 +66,66 @@ class VPDInfo<TARGET_TYPE_MCS> // size of the vpd data size_t iv_size; + + // frequency of memory bus uint64_t iv_freq_mhz; + + // number of ranks per dimm position uint64_t iv_rank_count_dimm_0; uint64_t iv_rank_count_dimm_1; + + // set to false to avoid collecting a real ReturnCode bool iv_is_config_ffdc_enabled; }; +/// @brief Specialized class representing required VPDInfo to be used +/// in collecting VPD for the OCMB_CHIP target type. +/// @tparam T fapi2::TARGET_TYPE_OCMB_CHIP +template<> +class VPDInfo<TARGET_TYPE_OCMB_CHIP> +{ + public: + /// @brief VPDInfo constructor + /// @param[in] Type of VPD data to return + VPDInfo( const fapi2::MemVpdData& i_vpd_type) + : iv_vpd_type(i_vpd_type), + iv_size(VPD_INFO_INVALID_64), + iv_omi_freq_mhz(VPD_INFO_INVALID_64), + iv_rank_count(VPD_INFO_INVALID_64), + iv_is_config_ffdc_enabled(true), + iv_efd_type(VPD_INFO_INVALID_8), + iv_dmb_mfg_id(VPD_INFO_INVALID_16), + iv_dmb_revision(VPD_INFO_INVALID_8), + iv_ddr_mode(VPD_INFO_INVALID_8) + {}; + + // *** INPUT DATA *** + + // type of vpd field to return + fapi2::MemVpdData_t iv_vpd_type; + + // size of the vpd data in bytes + size_t iv_size; + + // frequency of attached OMI bus + uint64_t iv_omi_freq_mhz; + + // number of master ranks + uint64_t iv_rank_count; + + // set to false to avoid collecting a real ReturnCode + bool iv_is_config_ffdc_enabled; + + + // *** OUTPUT DATA *** + + // metadata describing the EFD data that was returned + uint8_t iv_efd_type; // e.g. byte 288 of DDIMM SPD + uint16_t iv_dmb_mfg_id; // buffer manufacturer + uint8_t iv_dmb_revision; // buffer revision + uint8_t iv_ddr_mode; // DDR4 or DDR5 +}; + /// @brief Return a blob of memory VPD data associated with the input target /// @param[in] i_target a valid fapi2 target diff --git a/src/import/hwpf/fapi2/include/vpd_access_defs.H b/src/import/hwpf/fapi2/include/vpd_access_defs.H index bfafa6497..12577771f 100644 --- a/src/import/hwpf/fapi2/include/vpd_access_defs.H +++ b/src/import/hwpf/fapi2/include/vpd_access_defs.H @@ -44,6 +44,8 @@ enum MemVpdData MP, //! Memory Power related info DQ, //! DQ/DQS pin assignments CK, //! CKE pin assignments + EFD, //! Extended Function Descriptor data for OCMB + BUFFER, //! Buffer data for OCMB }; typedef MemVpdData MemVpdData_t; |