summaryrefslogtreecommitdiffstats
path: root/src/import/chips/p9/procedures/hwp
diff options
context:
space:
mode:
authorJacob Harvey <jlharvey@us.ibm.com>2016-08-26 15:08:52 -0500
committerChristian R. Geddes <crgeddes@us.ibm.com>2016-09-01 14:02:00 -0400
commitd2f585ae16f4ba4a9f62b110e91de956cb1cf774 (patch)
treed1485b6f498372b83e0b8bfb29605dfce703837c /src/import/chips/p9/procedures/hwp
parentf09939abc5f6a49147ced7d8bb7e312dc78536ce (diff)
downloadtalos-hostboot-d2f585ae16f4ba4a9f62b110e91de956cb1cf774.tar.gz
talos-hostboot-d2f585ae16f4ba4a9f62b110e91de956cb1cf774.zip
Modifying ATTRs for memory power thermal
Added MSS_MRW_ATTRs to base_hwp_file, implemented bulk_pwr and utils_to_throttle APIs for the OCC team. Added simple structural changes Change-Id: I9483be7f06c95c8c4dfe4823443052efde6fa776 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/28916 Reviewed-by: Matt K. Light <mklight@us.ibm.com> Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com> Reviewed-by: STEPHEN GLANCY <sglancy@us.ibm.com> Reviewed-by: Brian R. Silver <bsilver@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: Louis Stermole <stermole@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> CMVC-Prereq: 995208 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/28989 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Diffstat (limited to 'src/import/chips/p9/procedures/hwp')
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/mss_attribute_accessors.H408
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/p9_mss_eff_config.C21
2 files changed, 310 insertions, 119 deletions
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/mss_attribute_accessors.H b/src/import/chips/p9/procedures/hwp/memory/lib/mss_attribute_accessors.H
index 215afcaa2..f349d19b4 100644
--- a/src/import/chips/p9/procedures/hwp/memory/lib/mss_attribute_accessors.H
+++ b/src/import/chips/p9/procedures/hwp/memory/lib/mss_attribute_accessors.H
@@ -5953,21 +5953,23 @@ fapi_try_exit:
///
/// @brief ATTR_MSS_MEM_WATT_TARGET getter
-/// @param[in] const ref to the fapi2::Target<fapi2::TARGET_TYPE_MCA>
+/// @param[in] const ref to the fapi2::Target<fapi2::TARGET_TYPE_DIMM>
/// @param[out] ref to the value uint32_t
-/// @note Generated by gen_accessors.pl generateParameters (D)
+/// @note Generated by gen_accessors.pl generateParameters (F)
/// @return fapi2::ReturnCode - FAPI2_RC_SUCCESS iff get is OK
-/// @note Total memory power limit in cW for the dimms on the memory channel pair. Used to
-/// compute the throttles on the channel and/or dimms. creator: unknown. consumer:
-/// mss_eff_config. firmware notes:
+/// @note Total memory power used to throttle for each dimm Used to compute the throttles
+/// on the channel and/or dimms for OCC OCC sets after IPL creator: mss_eff_config
+/// consumer: mss_bulk_pwr_throttle, mss_utils_to_throttle firmware notes:
/// none.
///
-inline fapi2::ReturnCode mem_watt_target(const fapi2::Target<fapi2::TARGET_TYPE_MCA>& i_target, uint32_t& o_value)
+inline fapi2::ReturnCode mem_watt_target(const fapi2::Target<fapi2::TARGET_TYPE_DIMM>& i_target, uint32_t& o_value)
{
- uint32_t l_value[2];
+ uint32_t l_value[2][2];
+ auto l_mca = i_target.getParent<fapi2::TARGET_TYPE_MCA>();
+ auto l_mcs = l_mca.getParent<fapi2::TARGET_TYPE_MCS>();
- FAPI_TRY( FAPI_ATTR_GET(fapi2::ATTR_MSS_MEM_WATT_TARGET, i_target.getParent<fapi2::TARGET_TYPE_MCS>(), l_value) );
- o_value = l_value[mss::index(i_target)];
+ FAPI_TRY( FAPI_ATTR_GET(fapi2::ATTR_MSS_MEM_WATT_TARGET, l_mcs, l_value) );
+ o_value = l_value[mss::index(l_mca)][mss::index(i_target)];
return fapi2::current_err;
fapi_try_exit:
@@ -5978,22 +5980,28 @@ fapi_try_exit:
///
/// @brief ATTR_MSS_MEM_WATT_TARGET getter
-/// @param[in] const ref to the fapi2::Target<fapi2::TARGET_TYPE_DIMM>
-/// @param[out] ref to the value uint32_t
-/// @note Generated by gen_accessors.pl generateParameters (D.1)
+/// @param[in] const ref to the fapi2::Target<fapi2::TARGET_TYPE_MCA>
+/// @param[out] uint32_t* memory to store the value
+/// @note Generated by gen_accessors.pl generateParameters (G)
/// @return fapi2::ReturnCode - FAPI2_RC_SUCCESS iff get is OK
-/// @note Total memory power limit in cW for the dimms on the memory channel pair. Used to
-/// compute the throttles on the channel and/or dimms. creator: unknown. consumer:
-/// mss_eff_config. firmware notes:
+/// @note Total memory power used to throttle for each dimm Used to compute the throttles
+/// on the channel and/or dimms for OCC OCC sets after IPL creator: mss_eff_config
+/// consumer: mss_bulk_pwr_throttle, mss_utils_to_throttle firmware notes:
/// none.
///
-inline fapi2::ReturnCode mem_watt_target(const fapi2::Target<fapi2::TARGET_TYPE_DIMM>& i_target, uint32_t& o_value)
+inline fapi2::ReturnCode mem_watt_target(const fapi2::Target<fapi2::TARGET_TYPE_MCA>& i_target, uint32_t* o_array)
{
- uint32_t l_value[2];
- auto l_mca = i_target.getParent<fapi2::TARGET_TYPE_MCA>();
+ if (o_array == nullptr)
+ {
+ FAPI_ERR("nullptr passed to attribute accessor %s", __func__);
+ return fapi2::FAPI2_RC_INVALID_PARAMETER;
+ }
- FAPI_TRY( FAPI_ATTR_GET(fapi2::ATTR_MSS_MEM_WATT_TARGET, l_mca.getParent<fapi2::TARGET_TYPE_MCS>(), l_value) );
- o_value = l_value[mss::index(l_mca)];
+ uint32_t l_value[2][2];
+ auto l_mcs = i_target.getParent<fapi2::TARGET_TYPE_MCS>();
+
+ FAPI_TRY( FAPI_ATTR_GET(fapi2::ATTR_MSS_MEM_WATT_TARGET, l_mcs, l_value) );
+ memcpy(o_array, &(l_value[mss::index(i_target)][0]), 8);
return fapi2::current_err;
fapi_try_exit:
@@ -6006,11 +6014,11 @@ fapi_try_exit:
/// @brief ATTR_MSS_MEM_WATT_TARGET getter
/// @param[in] const ref to the fapi2::Target<fapi2::TARGET_TYPE_MCS>
/// @param[out] uint32_t* memory to store the value
-/// @note Generated by gen_accessors.pl generateParameters (E)
+/// @note Generated by gen_accessors.pl generateParameters (H)
/// @return fapi2::ReturnCode - FAPI2_RC_SUCCESS iff get is OK
-/// @note Total memory power limit in cW for the dimms on the memory channel pair. Used to
-/// compute the throttles on the channel and/or dimms. creator: unknown. consumer:
-/// mss_eff_config. firmware notes:
+/// @note Total memory power used to throttle for each dimm Used to compute the throttles
+/// on the channel and/or dimms for OCC OCC sets after IPL creator: mss_eff_config
+/// consumer: mss_bulk_pwr_throttle, mss_utils_to_throttle firmware notes:
/// none.
///
inline fapi2::ReturnCode mem_watt_target(const fapi2::Target<fapi2::TARGET_TYPE_MCS>& i_target, uint32_t* o_array)
@@ -6021,10 +6029,10 @@ inline fapi2::ReturnCode mem_watt_target(const fapi2::Target<fapi2::TARGET_TYPE_
return fapi2::FAPI2_RC_INVALID_PARAMETER;
}
- uint32_t l_value[2];
+ uint32_t l_value[2][2];
FAPI_TRY( FAPI_ATTR_GET(fapi2::ATTR_MSS_MEM_WATT_TARGET, i_target, l_value) );
- memcpy(o_array, &l_value, 8);
+ memcpy(o_array, &l_value, 16);
return fapi2::current_err;
fapi_try_exit:
@@ -6034,6 +6042,174 @@ fapi_try_exit:
}
///
+/// @brief ATTR_MSS_TOTAL_PWR_SLOPE getter
+/// @param[in] const ref to the fapi2::Target<fapi2::TARGET_TYPE_DIMM>
+/// @param[out] ref to the value uint32_t
+/// @note Generated by gen_accessors.pl generateParameters (F)
+/// @return fapi2::ReturnCode - FAPI2_RC_SUCCESS iff get is OK
+/// @note VDDR+VPP Power slope value for dimm creator: mss_eff_config consumer:
+/// mss_bulk_pwr_throttles
+///
+inline fapi2::ReturnCode total_pwr_slope(const fapi2::Target<fapi2::TARGET_TYPE_DIMM>& i_target, uint32_t& o_value)
+{
+ uint32_t l_value[2][2];
+ auto l_mca = i_target.getParent<fapi2::TARGET_TYPE_MCA>();
+ auto l_mcs = l_mca.getParent<fapi2::TARGET_TYPE_MCS>();
+
+ FAPI_TRY( FAPI_ATTR_GET(fapi2::ATTR_MSS_TOTAL_PWR_SLOPE, l_mcs, l_value) );
+ o_value = l_value[mss::index(l_mca)][mss::index(i_target)];
+ return fapi2::current_err;
+
+fapi_try_exit:
+ FAPI_ERR("failed accessing ATTR_MSS_TOTAL_PWR_SLOPE: 0x%lx (target: %s)",
+ uint64_t(fapi2::current_err), mss::c_str(i_target));
+ return fapi2::current_err;
+}
+
+///
+/// @brief ATTR_MSS_TOTAL_PWR_SLOPE getter
+/// @param[in] const ref to the fapi2::Target<fapi2::TARGET_TYPE_MCA>
+/// @param[out] uint32_t* memory to store the value
+/// @note Generated by gen_accessors.pl generateParameters (G)
+/// @return fapi2::ReturnCode - FAPI2_RC_SUCCESS iff get is OK
+/// @note VDDR+VPP Power slope value for dimm creator: mss_eff_config consumer:
+/// mss_bulk_pwr_throttles
+///
+inline fapi2::ReturnCode total_pwr_slope(const fapi2::Target<fapi2::TARGET_TYPE_MCA>& i_target, uint32_t* o_array)
+{
+ if (o_array == nullptr)
+ {
+ FAPI_ERR("nullptr passed to attribute accessor %s", __func__);
+ return fapi2::FAPI2_RC_INVALID_PARAMETER;
+ }
+
+ uint32_t l_value[2][2];
+ auto l_mcs = i_target.getParent<fapi2::TARGET_TYPE_MCS>();
+
+ FAPI_TRY( FAPI_ATTR_GET(fapi2::ATTR_MSS_TOTAL_PWR_SLOPE, l_mcs, l_value) );
+ memcpy(o_array, &(l_value[mss::index(i_target)][0]), 8);
+ return fapi2::current_err;
+
+fapi_try_exit:
+ FAPI_ERR("failed accessing ATTR_MSS_TOTAL_PWR_SLOPE: 0x%lx (target: %s)",
+ uint64_t(fapi2::current_err), mss::c_str(i_target));
+ return fapi2::current_err;
+}
+
+///
+/// @brief ATTR_MSS_TOTAL_PWR_SLOPE getter
+/// @param[in] const ref to the fapi2::Target<fapi2::TARGET_TYPE_MCS>
+/// @param[out] uint32_t* memory to store the value
+/// @note Generated by gen_accessors.pl generateParameters (H)
+/// @return fapi2::ReturnCode - FAPI2_RC_SUCCESS iff get is OK
+/// @note VDDR+VPP Power slope value for dimm creator: mss_eff_config consumer:
+/// mss_bulk_pwr_throttles
+///
+inline fapi2::ReturnCode total_pwr_slope(const fapi2::Target<fapi2::TARGET_TYPE_MCS>& i_target, uint32_t* o_array)
+{
+ if (o_array == nullptr)
+ {
+ FAPI_ERR("nullptr passed to attribute accessor %s", __func__);
+ return fapi2::FAPI2_RC_INVALID_PARAMETER;
+ }
+
+ uint32_t l_value[2][2];
+
+ FAPI_TRY( FAPI_ATTR_GET(fapi2::ATTR_MSS_TOTAL_PWR_SLOPE, i_target, l_value) );
+ memcpy(o_array, &l_value, 16);
+ return fapi2::current_err;
+
+fapi_try_exit:
+ FAPI_ERR("failed accessing ATTR_MSS_TOTAL_PWR_SLOPE: 0x%lx (target: %s)",
+ uint64_t(fapi2::current_err), mss::c_str(i_target));
+ return fapi2::current_err;
+}
+
+///
+/// @brief ATTR_MSS_TOTAL_PWR_INTERCEPT getter
+/// @param[in] const ref to the fapi2::Target<fapi2::TARGET_TYPE_DIMM>
+/// @param[out] ref to the value uint32_t
+/// @note Generated by gen_accessors.pl generateParameters (F)
+/// @return fapi2::ReturnCode - FAPI2_RC_SUCCESS iff get is OK
+/// @note VDDR+VPP Power intercept value for dimm creator: mss_eff_config consumer:
+/// mss_bulk_pwr_throttles
+///
+inline fapi2::ReturnCode total_pwr_intercept(const fapi2::Target<fapi2::TARGET_TYPE_DIMM>& i_target, uint32_t& o_value)
+{
+ uint32_t l_value[2][2];
+ auto l_mca = i_target.getParent<fapi2::TARGET_TYPE_MCA>();
+ auto l_mcs = l_mca.getParent<fapi2::TARGET_TYPE_MCS>();
+
+ FAPI_TRY( FAPI_ATTR_GET(fapi2::ATTR_MSS_TOTAL_PWR_INTERCEPT, l_mcs, l_value) );
+ o_value = l_value[mss::index(l_mca)][mss::index(i_target)];
+ return fapi2::current_err;
+
+fapi_try_exit:
+ FAPI_ERR("failed accessing ATTR_MSS_TOTAL_PWR_INTERCEPT: 0x%lx (target: %s)",
+ uint64_t(fapi2::current_err), mss::c_str(i_target));
+ return fapi2::current_err;
+}
+
+///
+/// @brief ATTR_MSS_TOTAL_PWR_INTERCEPT getter
+/// @param[in] const ref to the fapi2::Target<fapi2::TARGET_TYPE_MCA>
+/// @param[out] uint32_t* memory to store the value
+/// @note Generated by gen_accessors.pl generateParameters (G)
+/// @return fapi2::ReturnCode - FAPI2_RC_SUCCESS iff get is OK
+/// @note VDDR+VPP Power intercept value for dimm creator: mss_eff_config consumer:
+/// mss_bulk_pwr_throttles
+///
+inline fapi2::ReturnCode total_pwr_intercept(const fapi2::Target<fapi2::TARGET_TYPE_MCA>& i_target, uint32_t* o_array)
+{
+ if (o_array == nullptr)
+ {
+ FAPI_ERR("nullptr passed to attribute accessor %s", __func__);
+ return fapi2::FAPI2_RC_INVALID_PARAMETER;
+ }
+
+ uint32_t l_value[2][2];
+ auto l_mcs = i_target.getParent<fapi2::TARGET_TYPE_MCS>();
+
+ FAPI_TRY( FAPI_ATTR_GET(fapi2::ATTR_MSS_TOTAL_PWR_INTERCEPT, l_mcs, l_value) );
+ memcpy(o_array, &(l_value[mss::index(i_target)][0]), 8);
+ return fapi2::current_err;
+
+fapi_try_exit:
+ FAPI_ERR("failed accessing ATTR_MSS_TOTAL_PWR_INTERCEPT: 0x%lx (target: %s)",
+ uint64_t(fapi2::current_err), mss::c_str(i_target));
+ return fapi2::current_err;
+}
+
+///
+/// @brief ATTR_MSS_TOTAL_PWR_INTERCEPT getter
+/// @param[in] const ref to the fapi2::Target<fapi2::TARGET_TYPE_MCS>
+/// @param[out] uint32_t* memory to store the value
+/// @note Generated by gen_accessors.pl generateParameters (H)
+/// @return fapi2::ReturnCode - FAPI2_RC_SUCCESS iff get is OK
+/// @note VDDR+VPP Power intercept value for dimm creator: mss_eff_config consumer:
+/// mss_bulk_pwr_throttles
+///
+inline fapi2::ReturnCode total_pwr_intercept(const fapi2::Target<fapi2::TARGET_TYPE_MCS>& i_target, uint32_t* o_array)
+{
+ if (o_array == nullptr)
+ {
+ FAPI_ERR("nullptr passed to attribute accessor %s", __func__);
+ return fapi2::FAPI2_RC_INVALID_PARAMETER;
+ }
+
+ uint32_t l_value[2][2];
+
+ FAPI_TRY( FAPI_ATTR_GET(fapi2::ATTR_MSS_TOTAL_PWR_INTERCEPT, i_target, l_value) );
+ memcpy(o_array, &l_value, 16);
+ return fapi2::current_err;
+
+fapi_try_exit:
+ FAPI_ERR("failed accessing ATTR_MSS_TOTAL_PWR_INTERCEPT: 0x%lx (target: %s)",
+ uint64_t(fapi2::current_err), mss::c_str(i_target));
+ return fapi2::current_err;
+}
+
+///
/// @brief ATTR_MSS_MASTER_PWR_SLOPE getter
/// @param[in] const ref to the fapi2::Target<fapi2::TARGET_TYPE_DIMM>
/// @param[out] ref to the value uint32_t
@@ -6789,7 +6965,86 @@ fapi_try_exit:
}
///
-/// @brief ATTR_MSS_CHANNEL_PAIR_MAXPOWER getter
+/// @brief ATTR_MSS_DATABUS_UTIL getter
+/// @param[in] const ref to the fapi2::Target<fapi2::TARGET_TYPE_MCA>
+/// @param[out] ref to the value uint32_t
+/// @note Generated by gen_accessors.pl generateParameters (D)
+/// @return fapi2::ReturnCode - FAPI2_RC_SUCCESS iff get is OK
+/// @note Databus utilization limit used to calculate memory throttles and power limit
+/// creator: OCC consumer:
+/// mss_utils_to_throttle
+///
+inline fapi2::ReturnCode databus_util(const fapi2::Target<fapi2::TARGET_TYPE_MCA>& i_target, uint32_t& o_value)
+{
+ uint32_t l_value[2];
+
+ FAPI_TRY( FAPI_ATTR_GET(fapi2::ATTR_MSS_DATABUS_UTIL, i_target.getParent<fapi2::TARGET_TYPE_MCS>(), l_value) );
+ o_value = l_value[mss::index(i_target)];
+ return fapi2::current_err;
+
+fapi_try_exit:
+ FAPI_ERR("failed accessing ATTR_MSS_DATABUS_UTIL: 0x%lx (target: %s)",
+ uint64_t(fapi2::current_err), mss::c_str(i_target));
+ return fapi2::current_err;
+}
+
+///
+/// @brief ATTR_MSS_DATABUS_UTIL getter
+/// @param[in] const ref to the fapi2::Target<fapi2::TARGET_TYPE_DIMM>
+/// @param[out] ref to the value uint32_t
+/// @note Generated by gen_accessors.pl generateParameters (D.1)
+/// @return fapi2::ReturnCode - FAPI2_RC_SUCCESS iff get is OK
+/// @note Databus utilization limit used to calculate memory throttles and power limit
+/// creator: OCC consumer:
+/// mss_utils_to_throttle
+///
+inline fapi2::ReturnCode databus_util(const fapi2::Target<fapi2::TARGET_TYPE_DIMM>& i_target, uint32_t& o_value)
+{
+ uint32_t l_value[2];
+ auto l_mca = i_target.getParent<fapi2::TARGET_TYPE_MCA>();
+
+ FAPI_TRY( FAPI_ATTR_GET(fapi2::ATTR_MSS_DATABUS_UTIL, l_mca.getParent<fapi2::TARGET_TYPE_MCS>(), l_value) );
+ o_value = l_value[mss::index(l_mca)];
+ return fapi2::current_err;
+
+fapi_try_exit:
+ FAPI_ERR("failed accessing ATTR_MSS_DATABUS_UTIL: 0x%lx (target: %s)",
+ uint64_t(fapi2::current_err), mss::c_str(i_target));
+ return fapi2::current_err;
+}
+
+///
+/// @brief ATTR_MSS_DATABUS_UTIL getter
+/// @param[in] const ref to the fapi2::Target<fapi2::TARGET_TYPE_MCS>
+/// @param[out] uint32_t* memory to store the value
+/// @note Generated by gen_accessors.pl generateParameters (E)
+/// @return fapi2::ReturnCode - FAPI2_RC_SUCCESS iff get is OK
+/// @note Databus utilization limit used to calculate memory throttles and power limit
+/// creator: OCC consumer:
+/// mss_utils_to_throttle
+///
+inline fapi2::ReturnCode databus_util(const fapi2::Target<fapi2::TARGET_TYPE_MCS>& i_target, uint32_t* o_array)
+{
+ if (o_array == nullptr)
+ {
+ FAPI_ERR("nullptr passed to attribute accessor %s", __func__);
+ return fapi2::FAPI2_RC_INVALID_PARAMETER;
+ }
+
+ uint32_t l_value[2];
+
+ FAPI_TRY( FAPI_ATTR_GET(fapi2::ATTR_MSS_DATABUS_UTIL, i_target, l_value) );
+ memcpy(o_array, &l_value, 8);
+ return fapi2::current_err;
+
+fapi_try_exit:
+ FAPI_ERR("failed accessing ATTR_MSS_DATABUS_UTIL: 0x%lx (target: %s)",
+ uint64_t(fapi2::current_err), mss::c_str(i_target));
+ return fapi2::current_err;
+}
+
+///
+/// @brief ATTR_MSS_PORT_MAXPOWER getter
/// @param[in] const ref to the fapi2::Target<fapi2::TARGET_TYPE_MCA>
/// @param[out] ref to the value uint32_t
/// @note Generated by gen_accessors.pl generateParameters (D)
@@ -6797,22 +7052,22 @@ fapi_try_exit:
/// @note Channel Pair Max Power output from thermal
/// procedures
///
-inline fapi2::ReturnCode channel_pair_maxpower(const fapi2::Target<fapi2::TARGET_TYPE_MCA>& i_target, uint32_t& o_value)
+inline fapi2::ReturnCode port_maxpower(const fapi2::Target<fapi2::TARGET_TYPE_MCA>& i_target, uint32_t& o_value)
{
uint32_t l_value[2];
- FAPI_TRY( FAPI_ATTR_GET(fapi2::ATTR_MSS_CHANNEL_PAIR_MAXPOWER, i_target.getParent<fapi2::TARGET_TYPE_MCS>(), l_value) );
+ FAPI_TRY( FAPI_ATTR_GET(fapi2::ATTR_MSS_PORT_MAXPOWER, i_target.getParent<fapi2::TARGET_TYPE_MCS>(), l_value) );
o_value = l_value[mss::index(i_target)];
return fapi2::current_err;
fapi_try_exit:
- FAPI_ERR("failed accessing ATTR_MSS_CHANNEL_PAIR_MAXPOWER: 0x%lx (target: %s)",
+ FAPI_ERR("failed accessing ATTR_MSS_PORT_MAXPOWER: 0x%lx (target: %s)",
uint64_t(fapi2::current_err), mss::c_str(i_target));
return fapi2::current_err;
}
///
-/// @brief ATTR_MSS_CHANNEL_PAIR_MAXPOWER getter
+/// @brief ATTR_MSS_PORT_MAXPOWER getter
/// @param[in] const ref to the fapi2::Target<fapi2::TARGET_TYPE_DIMM>
/// @param[out] ref to the value uint32_t
/// @note Generated by gen_accessors.pl generateParameters (D.1)
@@ -6820,24 +7075,23 @@ fapi_try_exit:
/// @note Channel Pair Max Power output from thermal
/// procedures
///
-inline fapi2::ReturnCode channel_pair_maxpower(const fapi2::Target<fapi2::TARGET_TYPE_DIMM>& i_target,
- uint32_t& o_value)
+inline fapi2::ReturnCode port_maxpower(const fapi2::Target<fapi2::TARGET_TYPE_DIMM>& i_target, uint32_t& o_value)
{
uint32_t l_value[2];
auto l_mca = i_target.getParent<fapi2::TARGET_TYPE_MCA>();
- FAPI_TRY( FAPI_ATTR_GET(fapi2::ATTR_MSS_CHANNEL_PAIR_MAXPOWER, l_mca.getParent<fapi2::TARGET_TYPE_MCS>(), l_value) );
+ FAPI_TRY( FAPI_ATTR_GET(fapi2::ATTR_MSS_PORT_MAXPOWER, l_mca.getParent<fapi2::TARGET_TYPE_MCS>(), l_value) );
o_value = l_value[mss::index(l_mca)];
return fapi2::current_err;
fapi_try_exit:
- FAPI_ERR("failed accessing ATTR_MSS_CHANNEL_PAIR_MAXPOWER: 0x%lx (target: %s)",
+ FAPI_ERR("failed accessing ATTR_MSS_PORT_MAXPOWER: 0x%lx (target: %s)",
uint64_t(fapi2::current_err), mss::c_str(i_target));
return fapi2::current_err;
}
///
-/// @brief ATTR_MSS_CHANNEL_PAIR_MAXPOWER getter
+/// @brief ATTR_MSS_PORT_MAXPOWER getter
/// @param[in] const ref to the fapi2::Target<fapi2::TARGET_TYPE_MCS>
/// @param[out] uint32_t* memory to store the value
/// @note Generated by gen_accessors.pl generateParameters (E)
@@ -6845,7 +7099,7 @@ fapi_try_exit:
/// @note Channel Pair Max Power output from thermal
/// procedures
///
-inline fapi2::ReturnCode channel_pair_maxpower(const fapi2::Target<fapi2::TARGET_TYPE_MCS>& i_target, uint32_t* o_array)
+inline fapi2::ReturnCode port_maxpower(const fapi2::Target<fapi2::TARGET_TYPE_MCS>& i_target, uint32_t* o_array)
{
if (o_array == nullptr)
{
@@ -6855,12 +7109,12 @@ inline fapi2::ReturnCode channel_pair_maxpower(const fapi2::Target<fapi2::TARGET
uint32_t l_value[2];
- FAPI_TRY( FAPI_ATTR_GET(fapi2::ATTR_MSS_CHANNEL_PAIR_MAXPOWER, i_target, l_value) );
+ FAPI_TRY( FAPI_ATTR_GET(fapi2::ATTR_MSS_PORT_MAXPOWER, i_target, l_value) );
memcpy(o_array, &l_value, 8);
return fapi2::current_err;
fapi_try_exit:
- FAPI_ERR("failed accessing ATTR_MSS_CHANNEL_PAIR_MAXPOWER: 0x%lx (target: %s)",
+ FAPI_ERR("failed accessing ATTR_MSS_PORT_MAXPOWER: 0x%lx (target: %s)",
uint64_t(fapi2::current_err), mss::c_str(i_target));
return fapi2::current_err;
}
@@ -10424,82 +10678,6 @@ fapi_try_exit:
}
///
-/// @brief ATTR_MSS_OCC_THROTTLED_N_CMDS getter
-/// @param[in] const ref to the fapi2::Target<fapi2::TARGET_TYPE_MCA>
-/// @param[out] ref to the value uint32_t
-/// @note Generated by gen_accessors.pl generateParameters (D)
-/// @return fapi2::ReturnCode - FAPI2_RC_SUCCESS iff get is OK
-/// @note cfg_nm_n_per_port throttle N value that was calculated from
-/// MSS_DATABUS_UTIL
-///
-inline fapi2::ReturnCode occ_throttled_n_cmds(const fapi2::Target<fapi2::TARGET_TYPE_MCA>& i_target, uint32_t& o_value)
-{
- uint32_t l_value[2];
-
- FAPI_TRY( FAPI_ATTR_GET(fapi2::ATTR_MSS_OCC_THROTTLED_N_CMDS, i_target.getParent<fapi2::TARGET_TYPE_MCS>(), l_value) );
- o_value = l_value[mss::index(i_target)];
- return fapi2::current_err;
-
-fapi_try_exit:
- FAPI_ERR("failed accessing ATTR_MSS_OCC_THROTTLED_N_CMDS: 0x%lx (target: %s)",
- uint64_t(fapi2::current_err), mss::c_str(i_target));
- return fapi2::current_err;
-}
-
-///
-/// @brief ATTR_MSS_OCC_THROTTLED_N_CMDS getter
-/// @param[in] const ref to the fapi2::Target<fapi2::TARGET_TYPE_DIMM>
-/// @param[out] ref to the value uint32_t
-/// @note Generated by gen_accessors.pl generateParameters (D.1)
-/// @return fapi2::ReturnCode - FAPI2_RC_SUCCESS iff get is OK
-/// @note cfg_nm_n_per_port throttle N value that was calculated from
-/// MSS_DATABUS_UTIL
-///
-inline fapi2::ReturnCode occ_throttled_n_cmds(const fapi2::Target<fapi2::TARGET_TYPE_DIMM>& i_target, uint32_t& o_value)
-{
- uint32_t l_value[2];
- auto l_mca = i_target.getParent<fapi2::TARGET_TYPE_MCA>();
-
- FAPI_TRY( FAPI_ATTR_GET(fapi2::ATTR_MSS_OCC_THROTTLED_N_CMDS, l_mca.getParent<fapi2::TARGET_TYPE_MCS>(), l_value) );
- o_value = l_value[mss::index(l_mca)];
- return fapi2::current_err;
-
-fapi_try_exit:
- FAPI_ERR("failed accessing ATTR_MSS_OCC_THROTTLED_N_CMDS: 0x%lx (target: %s)",
- uint64_t(fapi2::current_err), mss::c_str(i_target));
- return fapi2::current_err;
-}
-
-///
-/// @brief ATTR_MSS_OCC_THROTTLED_N_CMDS getter
-/// @param[in] const ref to the fapi2::Target<fapi2::TARGET_TYPE_MCS>
-/// @param[out] uint32_t* memory to store the value
-/// @note Generated by gen_accessors.pl generateParameters (E)
-/// @return fapi2::ReturnCode - FAPI2_RC_SUCCESS iff get is OK
-/// @note cfg_nm_n_per_port throttle N value that was calculated from
-/// MSS_DATABUS_UTIL
-///
-inline fapi2::ReturnCode occ_throttled_n_cmds(const fapi2::Target<fapi2::TARGET_TYPE_MCS>& i_target, uint32_t* o_array)
-{
- if (o_array == nullptr)
- {
- FAPI_ERR("nullptr passed to attribute accessor %s", __func__);
- return fapi2::FAPI2_RC_INVALID_PARAMETER;
- }
-
- uint32_t l_value[2];
-
- FAPI_TRY( FAPI_ATTR_GET(fapi2::ATTR_MSS_OCC_THROTTLED_N_CMDS, i_target, l_value) );
- memcpy(o_array, &l_value, 8);
- return fapi2::current_err;
-
-fapi_try_exit:
- FAPI_ERR("failed accessing ATTR_MSS_OCC_THROTTLED_N_CMDS: 0x%lx (target: %s)",
- uint64_t(fapi2::current_err), mss::c_str(i_target));
- return fapi2::current_err;
-}
-
-///
/// @brief ATTR_EFF_DRAM_MAC getter
/// @param[in] const ref to the fapi2::Target<fapi2::TARGET_TYPE_DIMM>
/// @param[out] ref to the value uint16_t
diff --git a/src/import/chips/p9/procedures/hwp/memory/p9_mss_eff_config.C b/src/import/chips/p9/procedures/hwp/memory/p9_mss_eff_config.C
index 40f7e7514..119f39f8a 100644
--- a/src/import/chips/p9/procedures/hwp/memory/p9_mss_eff_config.C
+++ b/src/import/chips/p9/procedures/hwp/memory/p9_mss_eff_config.C
@@ -69,7 +69,7 @@ fapi2::ReturnCode p9_mss_eff_config( const fapi2::Target<fapi2::TARGET_TYPE_MCS>
{
const auto l_dimm_pos = mss::pos(l_dimm);
- // TODO: RTC 152390
+ // TODO RTC:152390 Create function to do map checking on cached values
// Find decoder factory for this dimm position
auto l_it = l_factory_caches.find(l_dimm_pos);
@@ -96,7 +96,7 @@ fapi2::ReturnCode p9_mss_eff_config( const fapi2::Target<fapi2::TARGET_TYPE_MCS>
{
const auto l_dimm_pos = mss::pos(l_dimm);
- // TODO: RTC 152390
+ // TODO RTC:152390 Create function to do map checking on cached values
// Find decoder factory for this dimm position
auto l_it = l_factory_caches.find(l_dimm_pos);
@@ -223,14 +223,27 @@ fapi2::ReturnCode p9_mss_eff_config( const fapi2::Target<fapi2::TARGET_TYPE_MCS>
uint32_t l_m_dram_clocks[mss::PORTS_PER_MCS] = {0x200, 0x200};
FAPI_TRY( FAPI_ATTR_SET( fapi2::ATTR_MSS_RUNTIME_MEM_M_DRAM_CLOCKS, i_target, l_m_dram_clocks ) );
}
-
+ //TODO RTC:160060 verify attributes are needed, best place to put them, and correct values
+ // TK hard coded for now, should change at some point. Most of these are set in eff_config_thermal
+ {
+ uint32_t l_mem_watt_target[mss::PORTS_PER_MCS][mss::MAX_DIMM_PER_PORT] = {{0x640, 0x640}, {0x640, 0x640}};
+ FAPI_TRY( FAPI_ATTR_SET( fapi2::ATTR_MSS_MEM_WATT_TARGET, i_target,
+ l_mem_watt_target ) );
+ }
+ //Values taken from Mike Pardeik. Calculated to reach 90% util, will be removed once eff_config_thermal is implemented
{
- uint32_t l_throttled_n_commands[mss::PORTS_PER_MCS] = {0x60, 0x60};
+ uint32_t l_throttled_n_commands[mss::PORTS_PER_MCS] = {0x73, 0x73};
FAPI_TRY( FAPI_ATTR_SET( fapi2::ATTR_MSS_RUNTIME_MEM_THROTTLED_N_COMMANDS_PER_PORT, i_target,
l_throttled_n_commands ) );
}
{
+ uint32_t l_throttled_n_commands[mss::PORTS_PER_MCS] = {0x73, 0x73};
+ FAPI_TRY( FAPI_ATTR_SET( fapi2::ATTR_MSS_RUNTIME_MEM_THROTTLED_N_COMMANDS_PER_SLOT, i_target,
+ l_throttled_n_commands ) );
+ }
+
+ {
uint16_t l_cal_step[mss::PORTS_PER_MCS] = {0xFAC0, 0xFAC0};
FAPI_TRY( FAPI_ATTR_SET(fapi2::ATTR_MSS_CAL_STEP_ENABLE, i_target, l_cal_step) );
}
OpenPOWER on IntegriCloud