Skip to content

Commit

Permalink
Adds LRDIMM MRD - DRAM to buffer RD calibration
Browse files Browse the repository at this point in the history
Change-Id: I66de2a4738c3f07d50635add2ae9ea71a55b69d9
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/67185
Tested-by: Jenkins Server <[email protected]>
Tested-by: Hostboot CI <[email protected]>
Reviewed-by: Louis Stermole <[email protected]>
Reviewed-by: STEPHEN GLANCY <[email protected]>
Reviewed-by: Jennifer A. Stofer <[email protected]>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/68029
Tested-by: Jenkins OP Build CI <[email protected]>
Tested-by: Jenkins OP HW <[email protected]>
Tested-by: FSP CI Jenkins <[email protected]>
Reviewed-by: Christian R. Geddes <[email protected]>
  • Loading branch information
sglancy6 authored and crgeddes committed Dec 5, 2018
1 parent cda0121 commit 09524b1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 87 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ fapi2::ReturnCode mrep::analyze_result_for_each_nibble( const fapi2::Target<fapi
(io_recorder.iv_final_delay == 0) )
{
io_recorder.iv_final_delay = i_delay;
FAPI_DBG( "%s buffer:%u nibble:%u found a 0->1 transition at delay 0x%02x",
FAPI_DBG( "MREP %s buffer:%u nibble:%u found a 0->1 transition at delay 0x%02x",
mss::c_str(i_target), i_buffer, i_nibble, i_delay );
}

Expand Down Expand Up @@ -692,44 +692,6 @@ uint64_t mrep::calculate_cycles( const fapi2::Target<fapi2::TARGET_TYPE_MCA>& i_
return 0;
}

///
/// @brief Sets up and runs the calibration step
/// @param[in] i_target - the MCA target on which to operate
/// @param[in] i_rp - the rank pair
/// @param[in] i_abort_on_error - whether or not we are aborting on cal error
/// @return fapi2::ReturnCode fapi2::FAPI2_RC_SUCCESS iff ok
///
fapi2::ReturnCode mrd::run( const fapi2::Target<fapi2::TARGET_TYPE_MCA>& i_target,
const uint64_t i_rp,
const uint8_t i_abort_on_error ) const
{
return fapi2::FAPI2_RC_SUCCESS;
}

///
/// @brief Executes a cal step with workarounds
/// @param[in] i_target - the MCA target on which to operate
/// @param[in] i_rp - the rank pair
/// @param[in] i_abort_on_error - whether or not we are aborting on cal error
/// @return fapi2::ReturnCode fapi2::FAPI2_RC_SUCCESS iff ok
///
fapi2::ReturnCode mrd::execute( const fapi2::Target<fapi2::TARGET_TYPE_MCA>& i_target,
const uint64_t i_rp,
const uint8_t i_abort_on_error ) const
{
return fapi2::FAPI2_RC_SUCCESS;
}

///
/// @brief Calculates the number of cycles a given calibration step will take
/// @param[in] i_target - the MCA target on which to operate
/// @return l_cycles - the number of cycles a given calibration step wil take
///
uint64_t mrd::calculate_cycles( const fapi2::Target<fapi2::TARGET_TYPE_MCA>& i_target ) const
{
return 0;
}

///
/// @brief Sets up and runs the calibration step
/// @param[in] i_target - the MCA target on which to operate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
#include <lib/dimm/ddr4/pba.H>
#include <lib/workarounds/ccs_workarounds.H>
#include <lib/rosetta_map/rosetta_map.H>
#include <lib/phy/ddr_phy.H>

// Disables LRDIMM support for HB
#ifndef __HOSTBOOT_MODULE
Expand Down Expand Up @@ -607,51 +608,6 @@ class mrep : public step

};

///
/// @brief MPR training step
///
class mrd : public step
{
public:
mrd() :
step("MRD")
{}

///
/// @brief Default virtual destructor
///
~mrd() = default;

///
/// @brief Sets up and runs the calibration step
/// @param[in] i_target - the MCA target on which to operate
/// @param[in] i_rp - the rank pair
/// @param[in] i_abort_on_error - whether or not we are aborting on cal error
/// @return fapi2::ReturnCode fapi2::FAPI2_RC_SUCCESS iff ok
///
fapi2::ReturnCode run( const fapi2::Target<fapi2::TARGET_TYPE_MCA>& i_target,
const uint64_t i_rp,
const uint8_t i_abort_on_error ) const;

///
/// @brief Executes a cal step with workarounds
/// @param[in] i_target - the MCA target on which to operate
/// @param[in] i_rp - the rank pair
/// @param[in] i_abort_on_error - whether or not we are aborting on cal error
/// @return fapi2::ReturnCode fapi2::FAPI2_RC_SUCCESS iff ok
///
fapi2::ReturnCode execute( const fapi2::Target<fapi2::TARGET_TYPE_MCA>& i_target,
const uint64_t i_rp,
const uint8_t i_abort_on_error ) const;

///
/// @brief Calculates the number of cycles a given calibration step will take
/// @param[in] i_target - the MCA target on which to operate
/// @return l_cycles - the number of cycles a given calibration step wil take
///
uint64_t calculate_cycles( const fapi2::Target<fapi2::TARGET_TYPE_MCA>& i_target ) const;
};

///
/// @brief MPR training step
///
Expand Down
11 changes: 8 additions & 3 deletions src/import/chips/p9/procedures/hwp/memory/lib/phy/mss_training.C
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,17 @@

#include <vector>
#include <initializer_list>

#include <fapi2.H>
#include <mss.H>
#include <lib/phy/ddr_phy.H>
#include <lib/phy/mss_training.H>
#include <lib/phy/mss_lrdimm_training.H>

#include <lib/workarounds/dp16_workarounds.H>
#include <lib/workarounds/wr_vref_workarounds.H>
#include <lib/dimm/ddr4/latch_wr_vref.H>
#include <lib/workarounds/seq_workarounds.H>
#include <lib/workarounds/dqs_align_workarounds.H>
#include <lib/workarounds/ccs_workarounds.H>

#include <generic/memory/lib/utils/scom.H>
#include <generic/memory/lib/utils/count_dimm.H>
#include <lib/dimm/rank.H>
Expand All @@ -61,6 +58,7 @@

#ifdef LRDIMM_CAPABLE
#include <lib/phy/mss_dwl.H>
#include <lib/phy/mss_mrd_fine.H>
#endif

namespace mss
Expand Down Expand Up @@ -1227,6 +1225,13 @@ std::vector<std::shared_ptr<step>> steps_factory(const fapi2::buffer<uint32_t>&

#ifdef LRDIMM_CAPABLE

// MRD_FINE
if(i_cal_steps.getBit<mss::cal_steps::MRD_FINE>())
{
FAPI_INF("LRDIMM: MRD_FINE is enabled");
l_steps.push_back(std::make_shared<mss::training::lrdimm::mrd_fine>());
}

// DWL
if(i_cal_steps.getBit<mss::cal_steps::DWL>())
{
Expand Down

0 comments on commit 09524b1

Please sign in to comment.