summaryrefslogtreecommitdiffstats
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
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>
-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
-rw-r--r--src/import/chips/p9/procedures/xml/attribute_info/memory_mcs_attributes.xml78
-rwxr-xr-xsrc/import/chips/p9/procedures/xml/attribute_info/memory_mrw_attributes.xml2
-rw-r--r--src/import/hwpf/fapi2/xml/attribute_info/hb_temp_defaults.xml15
-rw-r--r--src/usr/targeting/common/xmltohb/attribute_types.xml30
6 files changed, 382 insertions, 172 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) );
}
diff --git a/src/import/chips/p9/procedures/xml/attribute_info/memory_mcs_attributes.xml b/src/import/chips/p9/procedures/xml/attribute_info/memory_mcs_attributes.xml
index 29ea1984b..4c714e317 100644
--- a/src/import/chips/p9/procedures/xml/attribute_info/memory_mcs_attributes.xml
+++ b/src/import/chips/p9/procedures/xml/attribute_info/memory_mcs_attributes.xml
@@ -23,7 +23,7 @@
<!-- -->
<!-- IBM_PROLOG_END_TAG -->
<attributes>
-
+ <!-- MCS attribute array indexes are always [port][dimm] -->
<attribute>
<id>ATTR_MSS_VOLT_VDDR</id>
<targetType>TARGET_TYPE_MCBIST</targetType>
@@ -1228,21 +1228,52 @@
<id>ATTR_MSS_MEM_WATT_TARGET</id>
<targetType>TARGET_TYPE_MCS</targetType>
<description>
- 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.
+ 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.
</description>
<initToZero></initToZero>
+ <mssUnit>cW</mssUnit>
<valueType>uint32</valueType>
<writeable/>
- <array>2</array>
-
+ <array>2 2</array>
<mssAccessorName>mem_watt_target</mssAccessorName>
</attribute>
<attribute>
+ <id>ATTR_MSS_TOTAL_PWR_SLOPE</id>
+ <targetType>TARGET_TYPE_MCS</targetType>
+ <description>
+ VDDR+VPP Power slope value for dimm
+ creator: mss_eff_config
+ consumer: mss_bulk_pwr_throttles
+ </description>
+ <initToZero></initToZero>
+ <valueType>uint32</valueType>
+ <writeable/>
+ <array> 2 2</array>
+ <mssAccessorName>total_pwr_slope</mssAccessorName>
+ </attribute>
+
+ <attribute>
+ <id>ATTR_MSS_TOTAL_PWR_INTERCEPT</id>
+ <targetType>TARGET_TYPE_MCS</targetType>
+ <description>
+ VDDR+VPP Power intercept value for dimm
+ creator: mss_eff_config
+ consumer: mss_bulk_pwr_throttles
+ </description>
+ <initToZero></initToZero>
+ <valueType>uint32</valueType>
+ <writeable/>
+ <array> 2 2</array>
+ <mssAccessorName>total_pwr_intercept</mssAccessorName>
+ </attribute>
+
+ <attribute>
<id>ATTR_MSS_MASTER_PWR_SLOPE</id>
<targetType>TARGET_TYPE_MCS</targetType>
<description>Master Power slope value for dimm</description>
@@ -1342,14 +1373,29 @@
</attribute>
<attribute>
- <id>ATTR_MSS_CHANNEL_PAIR_MAXPOWER</id>
+ <id>ATTR_MSS_DATABUS_UTIL</id>
+ <targetType>TARGET_TYPE_MCS</targetType>
+ <description>
+ Databus utilization limit used to calculate memory throttles and power limit
+ creator: OCC
+ consumer: mss_utils_to_throttle
+ </description>
+ <initToZero></initToZero>
+ <valueType>uint32</valueType>
+ <array>2</array>
+ <writeable/>
+ <mssAccessorName>databus_util</mssAccessorName>
+ </attribute>
+
+ <attribute>
+ <id>ATTR_MSS_PORT_MAXPOWER</id>
<targetType>TARGET_TYPE_MCS</targetType>
<description>Channel Pair Max Power output from thermal procedures</description>
<initToZero></initToZero>
<valueType>uint32</valueType>
<writeable/>
<array>2</array>
- <mssAccessorName>channel_pair_maxpower</mssAccessorName>
+ <mssAccessorName>port_maxpower</mssAccessorName>
</attribute>
<attribute>
@@ -2121,20 +2167,6 @@
</attribute>
<attribute>
- <id>ATTR_MSS_OCC_THROTTLED_N_CMDS</id>
- <targetType>TARGET_TYPE_MCS</targetType>
- <!-- TK Do we need an attr per port & dimm ? P8 only had an attr per port AAM -->
- <description>
- cfg_nm_n_per_port throttle N value that was calculated from MSS_DATABUS_UTIL
- </description>
- <initToZero></initToZero>
- <valueType>uint32</valueType>
- <writeable/>
- <array>2</array>
- <mssAccessorName>occ_throttled_n_cmds</mssAccessorName>
- </attribute>
-
- <attribute>
<id>ATTR_EFF_DRAM_MAC</id>
<targetType>TARGET_TYPE_MCS</targetType>
<description>
diff --git a/src/import/chips/p9/procedures/xml/attribute_info/memory_mrw_attributes.xml b/src/import/chips/p9/procedures/xml/attribute_info/memory_mrw_attributes.xml
index 79eb711ca..b3680f6a5 100755
--- a/src/import/chips/p9/procedures/xml/attribute_info/memory_mrw_attributes.xml
+++ b/src/import/chips/p9/procedures/xml/attribute_info/memory_mrw_attributes.xml
@@ -88,7 +88,6 @@
<valueType>uint32</valueType>
<platInit/>
<initToZero/>
- <!-- little comment to tell us this might change during power/thermal implemetation -->
<!-- little comment to tell us we implemented - will remove before flight TODO RTC:159145 -->
<mssAccessorName>mrw_mem_m_dram_clocks</mssAccessorName>
</attribute>
@@ -103,7 +102,6 @@
<valueType>uint32</valueType>
<platInit/>
<initToZero/>
- <!-- little comment to tell us this might change during power/thermal implemetation -->
<!-- little comment to tell us we implemented - will remove before flight TODO RTC:159145 -->
<mssAccessorName>mrw_max_dram_databus_util</mssAccessorName>
</attribute>
diff --git a/src/import/hwpf/fapi2/xml/attribute_info/hb_temp_defaults.xml b/src/import/hwpf/fapi2/xml/attribute_info/hb_temp_defaults.xml
index e08ce5ce6..3bc0cce27 100644
--- a/src/import/hwpf/fapi2/xml/attribute_info/hb_temp_defaults.xml
+++ b/src/import/hwpf/fapi2/xml/attribute_info/hb_temp_defaults.xml
@@ -376,9 +376,6 @@
<id>ATTR_PM_SAFE_FREQUENCY_MHZ</id>
</attribute>
<attribute>
- <id>ATTR_MSS_OCC_THROTTLED_N_CMDS</id>
- </attribute>
- <attribute>
<id>ATTR_MSS_MRW_PERIODIC_MEMCAL_MODE_OPTIONS</id>
</attribute>
<attribute>
@@ -417,7 +414,17 @@
<attribute>
<id>ATTR_MSS_VPD_MT_DIMM_RCD_IBT_ODT</id>
</attribute>
-<!-- =====================================================================
+ <attribute>
+ <id>ATTR_MSS_TOTAL_PWR_SLOPE</id>
+ </attribute>
+ <attribute>
+ <id>ATTR_MSS_TOTAL_PWR_INTERCEPT</id>
+ </attribute>
+ <attribute>
+ <id>ATTR_MSS_PORT_MAXPOWER</id>
+ </attribute>
+
+ <!-- =====================================================================
End of temporary definitions
================================================================= -->
diff --git a/src/usr/targeting/common/xmltohb/attribute_types.xml b/src/usr/targeting/common/xmltohb/attribute_types.xml
index 6a9cfd19c..393ac8313 100644
--- a/src/usr/targeting/common/xmltohb/attribute_types.xml
+++ b/src/usr/targeting/common/xmltohb/attribute_types.xml
@@ -9462,8 +9462,6 @@ DEPRECATED!!!!
</hwpfToHbAttrMap>
</attribute>
-<!--TODO RTC:159746 we can remove the following attribute and update the one below
- after the tmgt code gets updated to the correct type-->
<attribute>
<id>MSS_MEM_WATT_TARGET</id>
<description>
@@ -9476,27 +9474,7 @@ DEPRECATED!!!!
<simpleType>
<uint32_t>
</uint32_t>
- </simpleType>
- <persistency>volatile-zeroed</persistency>
- <readable/>
- <writeable/>
-</attribute>
-
-<!--TODO RTC:159746 We need to remove the _TEMPORARY suffix from the following attribute once
-the tmgt code has been updated to have the correct type for MSS_MEM_WATT_TARGET-->
-<attribute>
- <id>MSS_MEM_WATT_TARGET_TEMPORARY</id>
- <description>
- 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: none.
- </description>
- <simpleType>
- <uint32_t>
- </uint32_t>
- <array>2</array>
+ <array>2,2</array>
</simpleType>
<persistency>volatile-zeroed</persistency>
<readable/>
@@ -15318,12 +15296,16 @@ Measured in GB</description>
consumer: mss_utils_to_throttle
</description>
<simpleType>
- <uint8_t></uint8_t>
+ <uint32_t></uint32_t>
<array>2</array>
</simpleType>
<persistency>volatile-zeroed</persistency>
<readable/>
<writeable/>
+ <hwpfToHbAttrMap>
+ <id>ATTR_MSS_DATABUS_UTIL</id>
+ <macro>DIRECT</macro>
+ </hwpfToHbAttrMap>
</attribute>
<attribute>
OpenPOWER on IntegriCloud