From 3e1fcbff53a59d2d29f6f9c363b5eda5281dee74 Mon Sep 17 00:00:00 2001 From: Dan Crowell Date: Thu, 17 Jan 2019 08:57:31 -0600 Subject: Interface for OCMB getVPD Add new getVPD interface to support the OCMB chip with the DDIMM SPD. Change-Id: I7bb8b7958aeeaca2fda788b013e9e5e244013c27 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/70596 Tested-by: FSP CI Jenkins Tested-by: Jenkins Server Reviewed-by: STEPHEN GLANCY Tested-by: PPE CI Tested-by: Hostboot CI Reviewed-by: Louis Stermole Reviewed-by: ANDRE A. MARIN Reviewed-by: Jennifer A. Stofer Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/70601 Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Reviewed-by: Daniel M. Crowell --- src/import/hwpf/fapi2/include/fapi2_vpd_access.H | 71 +++++++++++++++++++++--- src/import/hwpf/fapi2/include/vpd_access_defs.H | 2 + 2 files changed, 66 insertions(+), 7 deletions(-) (limited to 'src/import/hwpf') 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 { 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 // 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 +{ + 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; -- cgit v1.2.1