Skip to content

Commit

Permalink
Add p9a_mss_volt procedure
Browse files Browse the repository at this point in the history
Change-Id: I893685b365f6c815653717d4cc8149f2ea7acb94
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/68412
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: STEPHEN GLANCY <sglancy@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/68751
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>
  • Loading branch information
stermole authored and crgeddes committed Dec 19, 2018
1 parent 1b23e25 commit 3a99295
Show file tree
Hide file tree
Showing 5 changed files with 111 additions and 63 deletions.

This file was deleted.

4 changes: 2 additions & 2 deletions src/import/generic/memory/lib/spd/spd_facade.H
Original file line number Diff line number Diff line change
Expand Up @@ -1619,9 +1619,9 @@ fapi2::ReturnCode get_spd_decoder_list( const fapi2::Target<T>& i_target,
for( const auto& l_dimm : mss::find_targets<fapi2::TARGET_TYPE_DIMM>(i_target) )
{
std::vector<uint8_t> l_spd;
FAPI_TRY( get_raw_data(l_dimm, l_spd) );
FAPI_TRY( get_raw_data(l_dimm, l_spd), "%s Failed get_raw_data", mss::c_str(l_dimm) );

FAPI_TRY( add_decoder_to_list(l_dimm, l_spd, o_spd_decoder) );
FAPI_TRY( add_decoder_to_list(l_dimm, l_spd, o_spd_decoder), "%s Failed add_decoder_to_list", mss::c_str(l_dimm) );
}// dimms

fapi_try_exit:
Expand Down
63 changes: 63 additions & 0 deletions src/import/generic/memory/lib/utils/find.H
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,30 @@ inline fapi2::Target<fapi2::TARGET_TYPE_MCS> find_target( const fapi2::Target<fa
return i_self;
}

///
/// @brief find the MEM_PORT given a MEM_PORT
/// @param[in] i_self the fapi2 target MEM_PORT
/// @return a MEM_PORT target.
///
template<>
inline fapi2::Target<fapi2::TARGET_TYPE_MEM_PORT> find_target( const fapi2::Target<fapi2::TARGET_TYPE_MEM_PORT>&
i_self)
{
return i_self;
}

///
/// @brief find the OCMB_CHIP given a OCMB_CHIP
/// @param[in] i_self the fapi2 target OCMB_CHIP
/// @return a OCMB_CHIP target.
///
template<>
inline fapi2::Target<fapi2::TARGET_TYPE_OCMB_CHIP> find_target( const fapi2::Target<fapi2::TARGET_TYPE_OCMB_CHIP>&
i_self)
{
return i_self;
}

///
/// @brief find the McBIST given a DIMM
/// @param[in] i_target the fapi2 target DIMM
Expand All @@ -154,6 +178,20 @@ inline fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP> find_target( const fapi2::Tar
.getParent<fapi2::TARGET_TYPE_PROC_CHIP>();
}

///
/// @brief find the PROC_CHIP given a OCMB_CHIP
/// @param[in] i_target the fapi2 target OCMB_CHIP
/// @return a PROC_CHIP target.
///
template<>
inline fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP> find_target( const fapi2::Target<fapi2::TARGET_TYPE_OCMB_CHIP>&
i_target)
{
return i_target.getParent<fapi2::TARGET_TYPE_OMI>()
.getParent<fapi2::TARGET_TYPE_MC>()
.getParent<fapi2::TARGET_TYPE_PROC_CHIP>();
}

///
/// @brief find the DMI given an MBA
/// @param[in] i_target the fapi2 target MBA
Expand Down Expand Up @@ -201,6 +239,30 @@ find_targets( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target,
return i_target.getChildren<fapi2::TARGET_TYPE_DMI>(i_state);
}

///
/// @brief find all the OCMB_CHIPs connected to a PROC_CHIP
/// @param[in] i_target a fapi2::Target PROC_CHIP
/// @return a vector of fapi2::TARGET_TYPE_OCMB_CHIP
///
template<>
inline std::vector< fapi2::Target<fapi2::TARGET_TYPE_OCMB_CHIP> >
find_targets( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target,
fapi2::TargetState i_state )
{
std::vector< fapi2::Target<fapi2::TARGET_TYPE_OCMB_CHIP> > l_ocmbs;

for (const auto& l_mc : i_target.getChildren<fapi2::TARGET_TYPE_MC>(i_state))
{
for (const auto& l_omi : l_mc.getChildren<fapi2::TARGET_TYPE_OMI>(i_state))
{
auto l_these_ocmbs( l_omi.getChildren<fapi2::TARGET_TYPE_OCMB_CHIP>(i_state) );
l_ocmbs.insert(l_ocmbs.end(), l_these_ocmbs.begin(), l_these_ocmbs.end());
}
}

return l_ocmbs;
}

///
/// @brief find all the MEMBUFs connected to an DMI
/// @param[in] i_target a fapi2::Target DMI
Expand Down Expand Up @@ -324,6 +386,7 @@ inline std::vector< fapi2::Target<fapi2::TARGET_TYPE_MCS> > find_targets
{
return i_target.getChildren<fapi2::TARGET_TYPE_MCS>(i_state);
}

///
/// @brief find all the MCS connected to an MCBIST
/// @param[in] i_target a fapi2::Target MCBIST
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ namespace mss

///
/// @class Traits and policy class for voltage code
/// @tparam M mss::mc_type memory controller type
/// @tparam P mss::proc_type processor type
/// @tparam D mss::spd::device_type DRAM device type (generation)
///
template< mss::mc_type M, mss::spd::device_type D >
template< mss::mc_type P, mss::spd::device_type D >
class voltage_traits;

///
/// @class Traits and policy class for voltage code - specialization for the NIMBUS memory controller type
/// @class Traits and policy class for voltage code - specialization for the NIMBUS processor type, DDR4 device type
///
template<>
class voltage_traits<mss::mc_type::NIMBUS, mss::spd::device_type::DDR4>
Expand All @@ -67,10 +67,32 @@ class voltage_traits<mss::mc_type::NIMBUS, mss::spd::device_type::DDR4>
// Traits values
//////////////////////////////////////////////////////////////
// List of attribute setter functions for setting voltage rail values
// This vector is defined in the p9 space: lib/eff_config/nimbus_mss_voltage.C
static const std::vector<fapi2::ReturnCode (*)(const fapi2::Target<VOLTAGE_TARGET_TYPE>&, uint32_t)> voltage_setters;
};

///
/// @class Traits and policy class for voltage code - specialization for the AXONE processor type, DDR4 device type
///
template<>
class voltage_traits<mss::mc_type::EXPLORER, mss::spd::device_type::DDR4>
{
public:
//////////////////////////////////////////////////////////////
// Target types
//////////////////////////////////////////////////////////////
static constexpr fapi2::TargetType VOLTAGE_TARGET_TYPE = fapi2::TARGET_TYPE_OCMB_CHIP;
static constexpr fapi2::TargetType SPD_TARGET_TYPE = fapi2::TARGET_TYPE_MEM_PORT;

//////////////////////////////////////////////////////////////
// Traits values
//////////////////////////////////////////////////////////////
// List of attribute setter functions for setting voltage rail values
static const std::vector<fapi2::ReturnCode (*)(const fapi2::Target<VOLTAGE_TARGET_TYPE>&, uint32_t)> voltage_setters;

// Static consts for DDR4 voltages used in p9_mss_volt
static const uint64_t DDR4_NOMINAL_VOLTAGE = 1200;
static const uint64_t DDR4_VPP_VOLTAGE = 2500;
};

} // ns mss
#endif
20 changes: 20 additions & 0 deletions src/import/generic/procedures/xml/error_info/generic_error.xml
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,26 @@
</callout>
</hwpError>

<hwpError>
<rc>RC_MSS_VOLT_DDR_TYPE_REQUIRED_VOLTAGE</rc>
<description>One or more DIMMs do not support required voltage for DDR type.</description>
<ffdc>EXPECTED_OPERABLE</ffdc>
<ffdc>EXPECTED_ENDURANT</ffdc>
<ffdc>ACTUAL_OPERABLE</ffdc>
<ffdc>ACTUAL_ENDURANT</ffdc>
<callout>
<procedure>MEMORY_PLUGGING_ERROR</procedure>
<priority>HIGH</priority>
</callout>
<callout>
<target>DIMM_TARGET</target>
<priority>MEDIUM</priority>
</callout>
<deconfigure>
<target>DIMM_TARGET</target>
</deconfigure>
</hwpError>

<hwpError>
<rc>RC_MSS_PORT_DOES_NOT_SUPPORT_MAJORITY_FREQ</rc>
<description>
Expand Down

0 comments on commit 3a99295

Please sign in to comment.