Skip to content

Commit

Permalink
add lrdimm plug rules
Browse files Browse the repository at this point in the history
Change-Id: Id4768ad5b53d2fa9dc5bd9f3bb5ce267dd365734
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/67852
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: Louis Stermole <stermole@us.ibm.com>
Dev-Ready: STEPHEN GLANCY <sglancy@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/67859
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
  • Loading branch information
Li Meng authored and crgeddes committed Oct 29, 2018
1 parent 3376ac3 commit 24186be
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 17 deletions.
17 changes: 13 additions & 4 deletions src/import/chips/p9/procedures/hwp/memory/lib/dimm/kind.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 @@ -92,6 +92,7 @@ class kind
iv_stack_type = i_rhs.iv_stack_type;
iv_hybrid = i_rhs.iv_hybrid;
iv_hybrid_memory_type = i_rhs.iv_hybrid_memory_type;
iv_rcd_mfgid = i_rhs.iv_rcd_mfgid;
return *this;
}

Expand All @@ -114,7 +115,8 @@ class kind
(iv_size == i_rhs.iv_size) &&
(iv_stack_type == i_rhs.iv_stack_type) &&
(iv_hybrid == i_rhs.iv_hybrid) &&
(iv_hybrid_memory_type == i_rhs.iv_hybrid_memory_type));
(iv_hybrid_memory_type == i_rhs.iv_hybrid_memory_type) &&
(iv_rcd_mfgid == i_rhs.iv_rcd_mfgid));
}

///
Expand Down Expand Up @@ -147,6 +149,7 @@ class kind
FAPI_TRY( mss::eff_prim_stack_type( i_target, iv_stack_type) );
FAPI_TRY( mss::eff_hybrid( i_target, iv_hybrid ));
FAPI_TRY( mss::eff_hybrid_memory_type( i_target, iv_hybrid_memory_type ));
FAPI_TRY( mss::eff_rcd_mfg_id(i_target, iv_rcd_mfgid) );
return;

fapi_try_exit:
Expand All @@ -167,6 +170,9 @@ class kind
/// @param[in] i_size the overal size of the DIMM in GB
/// @param[in] i_mfgid the dram manufacturer id of the dimm, defaulted to 0
/// @param[in] i_stack_type dram die type, single die package or 3DS
/// @param[in] i_hybrid, default not hybrid
/// @param[in] i_hybrid_memory_type, defult none
/// @param[in] i_rcd_mfgid dimm register and data buffer manufacturer id, default 0
/// @note can't be constexpr as fapi2::Target doesn't have a constexpr ctor.
///
kind( const uint8_t i_master_ranks,
Expand All @@ -180,7 +186,8 @@ class kind
const uint16_t i_mfgid = 0,
const uint8_t i_stack_type = fapi2::ENUM_ATTR_EFF_PRIM_STACK_TYPE_SDP,
const uint8_t i_hybrid = fapi2::ENUM_ATTR_EFF_HYBRID_NOT_HYBRID,
const uint8_t i_hybrid_memory_type = fapi2::ENUM_ATTR_EFF_HYBRID_MEMORY_TYPE_NONE):
const uint8_t i_hybrid_memory_type = fapi2::ENUM_ATTR_EFF_HYBRID_MEMORY_TYPE_NONE,
const uint16_t i_rcd_mfgid = 0):
iv_target(0),
iv_master_ranks(i_master_ranks),
iv_total_ranks(i_total_ranks),
Expand All @@ -194,7 +201,8 @@ class kind
iv_mfgid(i_mfgid),
iv_stack_type(i_stack_type),
iv_hybrid(i_hybrid),
iv_hybrid_memory_type(i_hybrid_memory_type)
iv_hybrid_memory_type(i_hybrid_memory_type),
iv_rcd_mfgid(i_rcd_mfgid)
{
// Bit of an idiot-check to be sure a hand-crafted dimm::kind make sense wrt slaves, masters, packages, etc.
// Both of these are checked in eff_config. If they are messed up, they should be caught there
Expand Down Expand Up @@ -228,6 +236,7 @@ class kind
uint8_t iv_stack_type;
uint8_t iv_hybrid;
uint8_t iv_hybrid_memory_type;
uint16_t iv_rcd_mfgid;

///
/// @brief equal_config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,24 +76,18 @@ fapi2::ReturnCode check_lrdimm( const std::vector<dimm::kind>& i_kinds )
// We don't want to exit with an error as we are in development, but want to know we have LRDIMM
if( l_kind.iv_dimm_type == fapi2::ENUM_ATTR_EFF_DIMM_TYPE_LRDIMM )
{
FAPI_ERR("%s has an LRDIMM plugged into it!", mss::c_str(l_kind.iv_target));
FAPI_INF("%s has a LRDIMM plugged into it!", mss::c_str(l_kind.iv_target));
FAPI_ASSERT(l_kind.iv_rcd_mfgid == fapi2::ENUM_ATTR_EFF_RCD_MFG_ID_IDT,
fapi2::MSS_PLUG_RULES_LRDIMM_RCD_DB_MANUFACTURER_ID_UNSUPPORTED()
.set_RCD_MFGID(l_kind.iv_rcd_mfgid)
.set_DIMM_TARGET(l_kind.iv_target),
"%s has a LRDIMM with an unsupported register and buffer manufacturer, rcd_mfgid=%x",
mss::c_str(l_kind.iv_target), l_kind.iv_rcd_mfgid);
}

#if 0

FAPI_ASSERT( l_kind.iv_dimm_type != fapi2::ENUM_ATTR_EFF_DIMM_TYPE_LRDIMM,
fapi2::MSS_PLUG_RULES_LRDIMM_UNSUPPORTED()
.set_DIMM_TARGET(l_kind.iv_target),
"%s has an LRDIMM plugged and is currently unsupported",
mss::c_str(l_kind.iv_target) );
#endif
}

#if 0
fapi_try_exit:
return fapi2::current_err;
#endif
return fapi2::FAPI2_RC_SUCCESS;
}

///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,28 @@
</gard>
</hwpError>

<hwpError>
<rc>RC_MSS_PLUG_RULES_LRDIMM_RCD_DB_MANUFACTURER_ID_UNSUPPORTED</rc>
<description>
The manufacturer of the LRDIMM need to be IDT currently, others do not supported
</description>
<ffdc>RCD_MFGID</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>
<gard>
<target>DIMM_TARGET</target>
</gard>
</hwpError>

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

0 comments on commit 24186be

Please sign in to comment.