Skip to content

Commit

Permalink
Enables DDR4 training advanced
Browse files Browse the repository at this point in the history
Change-Id: I64a05ce07b8ce734b2269a4218b3c0c06490618e
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/56452
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Dev-Ready: STEPHEN GLANCY <sglancy@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: Louis Stermole <stermole@us.ibm.com>
Reviewed-by: ANDRE A. MARIN <aamarin@us.ibm.com>
Reviewed-by: Martin Gloff <mgloff@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/56457
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: Dean Sanner <dsanner@us.ibm.com>
  • Loading branch information
sglancy6 authored and sannerd committed May 25, 2018
1 parent 90a2cbe commit 2254d9f
Show file tree
Hide file tree
Showing 15 changed files with 818 additions and 233 deletions.
3 changes: 3 additions & 0 deletions src/build/citest/etc/workarounds.postsimsetup
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,6 @@ sbex -t 1051972
cd $sb/sbei/sbfw/
mk -a && mk install_all
cd -

#grab new action files for Centaur
sbex -t 1055588
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2016,2017 */
/* Contributors Listed Below - COPYRIGHT 2016,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -60,10 +60,9 @@ extern "C" {
start_bit = sb;
num_bits = nb;
}
PDA_Scom_Storage::~PDA_Scom_Storage() {}

///
/// @brief PDA_Scom_Storage class constructor
/// @brief PDA_MRS_Storage class constructor
/// @param[in] ad Attribute Data
/// @param[in] an Attribute Name
/// @param[in] dr DRAM
Expand Down
141 changes: 97 additions & 44 deletions src/import/chips/centaur/procedures/hwp/memory/p9c_mss_ddr4_pda.H
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2016,2017 */
/* Contributors Listed Below - COPYRIGHT 2016,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -39,57 +39,110 @@
#include <fapi2.H>
#include <vector>
using namespace std;

extern "C"
{
///
/// @brief PDA MRS storage structure
///
class PDA_MRS_Storage
{
private:
char pda_string[fapi2::MAX_ECMD_STRING_LEN];
public:
uint8_t attribute_data;
uint32_t attribute_name;
uint8_t MRS;
uint8_t dimm;
uint8_t dram;
uint8_t rank;
uint8_t port;
///
/// @brief PDA MRS storage constructor
///
PDA_MRS_Storage(const uint8_t ad, const uint32_t an, const uint8_t dr, const uint8_t di, const uint8_t r,
const uint8_t p);
~PDA_MRS_Storage();
bool operator> (const PDA_MRS_Storage& PDA2) const;
bool operator< (const PDA_MRS_Storage& PDA2) const;
void copy(PDA_MRS_Storage& temp);
fapi2::ReturnCode setMRSbyAttr(const fapi2::Target<fapi2::TARGET_TYPE_MBA>& i_target);
fapi2::ReturnCode checkPDAValid(const fapi2::Target<fapi2::TARGET_TYPE_MBA>& i_target);
char* c_str();
void generatePDAString();
};
class PDA_MRS_Storage
{
private:
char pda_string[fapi2::MAX_ECMD_STRING_LEN];
public:
uint8_t attribute_data;
uint32_t attribute_name;
uint8_t MRS;
uint8_t dimm;
uint8_t dram;
uint8_t rank;
uint8_t port;

///
/// @brief PDA MRS storage constructor
/// @param[in] ad attribute data
/// @param[in] ad attribute name/ID
/// @param[in] dr dram number
/// @param[in] di DIMM position
/// @param[in] r rank
/// @param[in] p port
///
PDA_MRS_Storage(const uint8_t ad, const uint32_t an, const uint8_t dr, const uint8_t di, const uint8_t r,
const uint8_t p);

///
/// @brief Destructor
///
~PDA_MRS_Storage();

///
/// @brief Greater than operator
/// @param[in] PDA2 object to compare to
/// @return bool true iff this object is greater than the one we're comparing against
///
bool operator> (const PDA_MRS_Storage& PDA2) const;

///
/// @brief Greater than operator
/// @param[in] PDA2 object to compare to
/// @return bool true iff this object is greater than the one we're comparing against
///
bool operator< (const PDA_MRS_Storage& PDA2) const;

///
/// @brief copies one PDA_MRS_Storage to this one
/// @param[in] temp MRS storage data structure
///
void copy(PDA_MRS_Storage& temp);

///
/// @brief sets the MRS variable based upon the inputted attribute name
/// @param[in] i_target Centaur MBA target
/// @return FAPI2_RC_SUCCESS
///
fapi2::ReturnCode setMRSbyAttr(const fapi2::Target<fapi2::TARGET_TYPE_MBA>& i_target);

///
/// @brief Checks to make sure that
/// @param[in] i_target MBA target
/// @return FAPI2_RC_SUCCESS iff successful
///
fapi2::ReturnCode checkPDAValid(const fapi2::Target<fapi2::TARGET_TYPE_MBA>& i_target);

///
/// @brief sends out the string
/// @return pda string
///
char* c_str();
void generatePDAString();
};

///
/// @brief PDA scom storage structure
///
class PDA_Scom_Storage
{
public:
uint64_t scom_addr;
uint32_t start_bit;
uint32_t num_bits;
///
/// @brief PDA Scom storage constructor
///
PDA_Scom_Storage(const uint64_t sa, const uint32_t sb, const uint32_t nb);
~PDA_Scom_Storage();
};

typedef fapi2::ReturnCode (*mss_ddr4_pda_FP_t)(fapi2::Target<fapi2::TARGET_TYPE_MBA>& i_target,
vector<PDA_MRS_Storage> pda);
class PDA_Scom_Storage
{
public:
uint64_t scom_addr;
uint32_t start_bit;
uint32_t num_bits;
///
/// @brief PDA_Scom_Storage constructor
/// @param[in] sa Scom Address
/// @param[in] sb Start Bit
/// @param[in] nb Num Bits
///
PDA_Scom_Storage(const uint64_t sa, const uint32_t sb, const uint32_t nb);

///
/// @brief Default destructor
///
~PDA_Scom_Storage() = default;
};

typedef fapi2::ReturnCode (*mss_ddr4_pda_FP_t)(fapi2::Target<fapi2::TARGET_TYPE_MBA>& i_target,
vector<PDA_MRS_Storage> pda);

extern "C"
{
///
/// @brief runs through the vector of given PDA values and issues the PDA commands to the requested DRAMs
/// @param[in] i_target: Reference to centaur.mba target,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
# OpenPOWER HostBoot Project
#
# Contributors Listed Below - COPYRIGHT 2016,2017
# Contributors Listed Below - COPYRIGHT 2016,2018
# [+] International Business Machines Corp.
#
#
Expand All @@ -27,4 +27,8 @@

PROCEDURE=p9c_mss_ddr4_pda
$(eval $(call ADD_MEMORY_INCDIRS,$(PROCEDURE)))
lib${PROCEDURE}_DEPLIBS+=p9c_mss_mrs6_DDR4
lib${PROCEDURE}_DEPLIBS+=p9c_mss_access_delay_reg
lib${PROCEDURE}_DEPLIBS+=p9c_mss_funcs
lib${PROCEDURE}_DEPLIBS+=p9c_mss_ddr4_funcs
$(call BUILD_PROCEDURE)

0 comments on commit 2254d9f

Please sign in to comment.