summaryrefslogtreecommitdiffstats
path: root/src/import/hwpf/fapi2
diff options
context:
space:
mode:
authorDan Crowell <dcrowell@us.ibm.com>2019-01-17 08:57:31 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2019-01-25 10:47:31 -0600
commit3e1fcbff53a59d2d29f6f9c363b5eda5281dee74 (patch)
tree83c2e561b37cf3ac70b0617e76dd997e65734c32 /src/import/hwpf/fapi2
parent7a16c287bd812471df2a6eb15bc8a988fb5cc695 (diff)
downloadtalos-hostboot-3e1fcbff53a59d2d29f6f9c363b5eda5281dee74.tar.gz
talos-hostboot-3e1fcbff53a59d2d29f6f9c363b5eda5281dee74.zip
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 <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: STEPHEN GLANCY <sglancy@us.ibm.com> Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: Louis Stermole <stermole@us.ibm.com> Reviewed-by: ANDRE A. MARIN <aamarin@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/70601 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: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/import/hwpf/fapi2')
-rw-r--r--src/import/hwpf/fapi2/include/fapi2_vpd_access.H71
-rw-r--r--src/import/hwpf/fapi2/include/vpd_access_defs.H2
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;
OpenPOWER on IntegriCloud