summaryrefslogtreecommitdiffstats
path: root/src/import
diff options
context:
space:
mode:
authorAndre Marin <aamarin@us.ibm.com>2019-01-15 14:05:59 -0600
committerChristian R. Geddes <crgeddes@us.ibm.com>2019-03-15 16:11:00 -0500
commit2dcce4bcccc2ded0e047da9dd4332baa2dd44f6b (patch)
tree909318813555f0cf7ae40282616b96c5de63bef9 /src/import
parentcd82f3ecbcef777e821b5d457e30f37f1ce15fdf (diff)
downloadtalos-hostboot-2dcce4bcccc2ded0e047da9dd4332baa2dd44f6b.tar.gz
talos-hostboot-2dcce4bcccc2ded0e047da9dd4332baa2dd44f6b.zip
Add L1 for p9a_mss_bulk_pwr_throttles and p9a_mss_utils_to_throttle
Change-Id: Icd016e70c11cb94dd8ab7259bc2874f5a1d84a86 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/70502 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@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: STEPHEN GLANCY <sglancy@us.ibm.com> Reviewed-by: Sheldon Bailey <baileysh@us.ibm.com> Reviewed-by: Louis Stermole <stermole@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/72148 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: Christian R. Geddes <crgeddes@us.ibm.com>
Diffstat (limited to 'src/import')
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/shared/mss_const.H10
-rw-r--r--src/import/chips/p9a/procedures/hwp/memory/p9a_mss_bulk_pwr_throttles.C34
-rw-r--r--src/import/chips/p9a/procedures/hwp/memory/p9a_mss_bulk_pwr_throttles.H40
-rw-r--r--src/import/chips/p9a/procedures/hwp/memory/p9a_mss_bulk_pwr_throttles.mk29
-rw-r--r--src/import/chips/p9a/procedures/hwp/memory/p9a_mss_utils_to_throttle.C35
-rw-r--r--src/import/chips/p9a/procedures/hwp/memory/p9a_mss_utils_to_throttle.H26
-rw-r--r--src/import/chips/p9a/procedures/hwp/memory/p9a_mss_utils_to_throttle.mk29
-rw-r--r--src/import/generic/memory/lib/utils/shared/mss_generic_consts.H9
8 files changed, 202 insertions, 10 deletions
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/shared/mss_const.H b/src/import/chips/p9/procedures/hwp/memory/lib/shared/mss_const.H
index d82723973..30c22a227 100644
--- a/src/import/chips/p9/procedures/hwp/memory/lib/shared/mss_const.H
+++ b/src/import/chips/p9/procedures/hwp/memory/lib/shared/mss_const.H
@@ -485,16 +485,6 @@ enum test_type
} // namespace mcbist
-///
-/// @brief throttle_type used to set bulk_pwr_throttls to run POWER or THERMAL throttling
-/// @note OCC will be using the POWER option
-///
-enum class throttle_type
-{
- POWER = 0,
- THERMAL = 1,
-};
-
enum class shmoo_edge : std::size_t
{
LEFT,
diff --git a/src/import/chips/p9a/procedures/hwp/memory/p9a_mss_bulk_pwr_throttles.C b/src/import/chips/p9a/procedures/hwp/memory/p9a_mss_bulk_pwr_throttles.C
index 6222a3c7c..b6aa68510 100644
--- a/src/import/chips/p9a/procedures/hwp/memory/p9a_mss_bulk_pwr_throttles.C
+++ b/src/import/chips/p9a/procedures/hwp/memory/p9a_mss_bulk_pwr_throttles.C
@@ -22,3 +22,37 @@
/* permissions and limitations under the License. */
/* */
/* IBM_PROLOG_END_TAG */
+
+///
+/// @file p9a_mss_bulk_pwr_throttles.C
+/// @brief Set the OCMB throttle attributes based on any power limits (thermal, regulator, or bulk)
+///
+// *HWP HWP Owner: Andre A. Marin <aamarin@us.ibm.com>
+// *HWP HWP Backup: Louis Stermole <stermole@us.ibm.com>
+// *HWP Team: Memory
+// *HWP Level: 1
+// *HWP Consumed by: FSP:HB
+
+#include <fapi2.H>
+#include <vector>
+#include <p9a_mss_bulk_pwr_throttles.H>
+
+///
+/// @brief Set ATTR_MSS_PORT_MAXPOWER, ATTR_MSS_MEM_THROTTLED_N_COMMANDS_PER_SLOT, ATTR_MSS_MEM_THROTTLED_N_COMMANDS_PER_PORT
+/// @param[in] i_targets vector of OCMB_CHIP's on the same processor or in the same node
+/// @param[in] i_throttle_type thermal boolean to determine whether to calculate throttles based on the power regulator or thermal limits
+/// @return fapi2::ReturnCode - FAPI2_RC_SUCCESS iff get is OK
+/// @note Called by p9a_mss_eff_config_thermal or by TMGT
+/// @note determines the throttle levels based off of the DIMM's power curve, sets the slot throttles to the same
+/// @note Enums are POWER for power regulator throttles and THERMAL for thermal throttles
+/// @note equalizes the throttles to the lowest of runtime and the lowest slot-throttle value
+///
+fapi2::ReturnCode p9a_mss_bulk_pwr_throttles(const std::vector< fapi2::Target<fapi2::TARGET_TYPE_OCMB_CHIP> >&
+ i_targets,
+ const mss::throttle_type i_throttle_type)
+{
+ FAPI_INF("Start p9a_mss_bulk_pwr_throttles for %s type throttling",
+ (( i_throttle_type == mss::throttle_type::THERMAL) ? "THERMAL" : "POWER"));
+
+ return fapi2::FAPI2_RC_SUCCESS;
+}
diff --git a/src/import/chips/p9a/procedures/hwp/memory/p9a_mss_bulk_pwr_throttles.H b/src/import/chips/p9a/procedures/hwp/memory/p9a_mss_bulk_pwr_throttles.H
index 4fefd77e7..6e033b877 100644
--- a/src/import/chips/p9a/procedures/hwp/memory/p9a_mss_bulk_pwr_throttles.H
+++ b/src/import/chips/p9a/procedures/hwp/memory/p9a_mss_bulk_pwr_throttles.H
@@ -22,3 +22,43 @@
/* permissions and limitations under the License. */
/* */
/* IBM_PROLOG_END_TAG */
+
+///
+/// @file p9a_mss_bulk_pwr_throttles.H
+/// @brief Set the OCMB throttle attributes based on any power limits (thermal, regulator, or bulk)
+///
+// *HWP HWP Owner: Andre A. Marin <aamarin@us.ibm.com>
+// *HWP HWP Backup: Louis Stermole <stermole@us.ibm.com>
+// *HWP Team: Memory
+// *HWP Level: 1
+// *HWP Consumed by: FSP:HB
+
+#ifndef __P9A_MSS_BULK_PWR_THROTTLES__
+#define __P9A_MSS_BULK_PWR_THROTTLES__
+
+#include <fapi2.H>
+#include <vector>
+#include <generic/memory/lib/utils/shared/mss_generic_consts.H>
+
+typedef fapi2::ReturnCode (*p9a_mss_bulk_pwr_throttles_FP_t) (const
+ std::vector< fapi2::Target< fapi2::TARGET_TYPE_OCMB_CHIP>>&, const mss::throttle_type i_throttle_type);
+
+extern "C"
+{
+
+ ///
+ /// @brief Set ATTR_MSS_PORT_MAXPOWER, ATTR_MSS_MEM_THROTTLED_N_COMMANDS_PER_SLOT, ATTR_MSS_MEM_THROTTLED_N_COMMANDS_PER_PORT
+ /// @param[in] i_targets vector of OCMB_CHIP's on the same processor or in the same node
+ /// @param[in] thermal boolean to determine whether to calculate throttles based on the power regulator or thermal limits
+ /// @return fapi2::ReturnCode - FAPI2_RC_SUCCESS iff get is OK
+ /// @note Called by p9a_mss_eff_config_thermal or by TMGT
+ /// @note determines the throttle levels based off of the DIMM's power curve, sets the slot throttles to the same
+ /// @note Enums are POWER for power regulator throttles and THERMAL for thermal throttles
+ /// @note equalizes the throttles to the lowest of runtime and the lowest slot-throttle value
+ ///
+ fapi2::ReturnCode p9a_mss_bulk_pwr_throttles (const std::vector < fapi2::Target< fapi2::TARGET_TYPE_OCMB_CHIP>>&
+ i_targets,
+ const mss::throttle_type i_throttle_type );
+}
+
+#endif
diff --git a/src/import/chips/p9a/procedures/hwp/memory/p9a_mss_bulk_pwr_throttles.mk b/src/import/chips/p9a/procedures/hwp/memory/p9a_mss_bulk_pwr_throttles.mk
new file mode 100644
index 000000000..aff426ea7
--- /dev/null
+++ b/src/import/chips/p9a/procedures/hwp/memory/p9a_mss_bulk_pwr_throttles.mk
@@ -0,0 +1,29 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/import/chips/p9a/procedures/hwp/memory/p9a_mss_bulk_pwr_throttles.mk $
+#
+# OpenPOWER HostBoot Project
+#
+# Contributors Listed Below - COPYRIGHT 2019
+# [+] International Business Machines Corp.
+#
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# permissions and limitations under the License.
+#
+# IBM_PROLOG_END_TAG
+-include 00p9a_common.mk
+
+PROCEDURE=p9a_mss_bulk_pwr_throttles
+$(eval $(call ADD_MEMORY_INCDIRS,$(PROCEDURE)))
+$(call BUILD_PROCEDURE)
diff --git a/src/import/chips/p9a/procedures/hwp/memory/p9a_mss_utils_to_throttle.C b/src/import/chips/p9a/procedures/hwp/memory/p9a_mss_utils_to_throttle.C
index 1d5a23e89..0666a8772 100644
--- a/src/import/chips/p9a/procedures/hwp/memory/p9a_mss_utils_to_throttle.C
+++ b/src/import/chips/p9a/procedures/hwp/memory/p9a_mss_utils_to_throttle.C
@@ -22,3 +22,38 @@
/* permissions and limitations under the License. */
/* */
/* IBM_PROLOG_END_TAG */
+
+///
+/// @file p9a_mss_utils_to_throttle.C
+/// @brief Sets throttles and power attributes for a given utilization value
+/// @note TMGT will call this procedure to set the N address operations (commands)
+/// allowed within a window of M DRAM clocks given the minimum dram data bus utilization.
+//// If input utilization is zero, then safemode values from MRW will be used
+///
+
+// *HWP HWP Owner: Andre A. Marin <aamarin@us.ibm.com>
+// *HWP HWP Backup: Louis Stermole <stermole@us.ibm.com>
+// *HWP Team: Memory
+// *HWP Level: 1
+// *HWP Consumed by: FSP:HB
+
+#include <p9a_mss_utils_to_throttle.H>
+
+// fapi2
+#include <fapi2.H>
+
+///
+/// @brief Determines throttle and power values for a given port databus utilization.
+/// @param[in] i_targets vector of OCMB_CHIPs to set throttle and power attributes on
+/// @return FAPI2_RC_SUCCESS iff ok
+/// @note ATTR_MSS_MEM_THROTTLED_N_COMMANDS_PER_SLOT will be set to worst case of all slots passed in
+/// @note input ATTR_MSS_DATABUS_UTIL and ATTR_MSS_MEM_WATT_TARGET
+/// @note output ATTR_MSS_MEM_THROTTLED_N_COMMANDS_PER_SLOT, ATTR_MSS_MEM_THROTTLED_N_COMMANDS_PER_PORT, and ATTR_MSS_PORT_MAXPOWER
+/// @note Does not set runtime throttles or set registers to throttle values`
+///
+fapi2::ReturnCode p9a_mss_utils_to_throttle( const std::vector< fapi2::Target<fapi2::TARGET_TYPE_OCMB_CHIP> >&
+ i_targets )
+{
+ FAPI_INF("Entering p9a_mss_utils_to_throttle");
+ return fapi2::FAPI2_RC_SUCCESS;
+}
diff --git a/src/import/chips/p9a/procedures/hwp/memory/p9a_mss_utils_to_throttle.H b/src/import/chips/p9a/procedures/hwp/memory/p9a_mss_utils_to_throttle.H
index 0927b54f6..0cbde3d40 100644
--- a/src/import/chips/p9a/procedures/hwp/memory/p9a_mss_utils_to_throttle.H
+++ b/src/import/chips/p9a/procedures/hwp/memory/p9a_mss_utils_to_throttle.H
@@ -22,3 +22,29 @@
/* permissions and limitations under the License. */
/* */
/* IBM_PROLOG_END_TAG */
+
+#ifndef __P9A_MSS_UTILS_TO_THROTTLE__
+#define __P9A_MSS_UTILS_TO_THROTTLE__
+
+#include <fapi2.H>
+#include <vector>
+
+typedef fapi2::ReturnCode (*p9a_mss_utils_to_throttle_FP_t) (const
+ std::vector< fapi2::Target<fapi2::TARGET_TYPE_OCMB_CHIP> >&);
+
+extern "C"
+{
+
+ ///
+ /// @brief Determines throttle and power values for a given port databus utilization.
+ /// @param[in] i_targets vector of OCMB_CHIPs to set throttle and power attributes on
+ /// @return FAPI2_RC_SUCCESS iff ok
+ /// @note ATTR_MSS_MEM_THROTTLED_N_COMMANDS_PER_SLOT will be set to worst case of all slots passed in
+ /// @note output ATTR_MSS_MEM_THROTTLED_N_COMMANDS_PER_SLOT, ATTR_MSS_MEM_THROTTLED_N_COMMANDS_PER_PORT, and ATTR_MSS_PORT_MAXPOWER
+ /// @note Does not set runtime throttles or set registers to throttle values`
+ ///
+ fapi2::ReturnCode p9a_mss_utils_to_throttle(const std::vector <fapi2::Target<fapi2::TARGET_TYPE_OCMB_CHIP> >&
+ i_targets);
+}
+
+#endif
diff --git a/src/import/chips/p9a/procedures/hwp/memory/p9a_mss_utils_to_throttle.mk b/src/import/chips/p9a/procedures/hwp/memory/p9a_mss_utils_to_throttle.mk
new file mode 100644
index 000000000..a60770713
--- /dev/null
+++ b/src/import/chips/p9a/procedures/hwp/memory/p9a_mss_utils_to_throttle.mk
@@ -0,0 +1,29 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/import/chips/p9a/procedures/hwp/memory/p9a_mss_utils_to_throttle.mk $
+#
+# OpenPOWER HostBoot Project
+#
+# Contributors Listed Below - COPYRIGHT 2019
+# [+] International Business Machines Corp.
+#
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# permissions and limitations under the License.
+#
+# IBM_PROLOG_END_TAG
+-include 00p9a_common.mk
+
+PROCEDURE=p9a_mss_utils_to_throttle
+$(eval $(call ADD_MEMORY_INCDIRS,$(PROCEDURE)))
+$(call BUILD_PROCEDURE)
diff --git a/src/import/generic/memory/lib/utils/shared/mss_generic_consts.H b/src/import/generic/memory/lib/utils/shared/mss_generic_consts.H
index c3c3a8f4a..7f52ebe3a 100644
--- a/src/import/generic/memory/lib/utils/shared/mss_generic_consts.H
+++ b/src/import/generic/memory/lib/utils/shared/mss_generic_consts.H
@@ -310,6 +310,15 @@ enum nibble_mask
MASK_NIBBLE1 = 0x0f,
};
+///
+/// @brief throttle_type used to set bulk_pwr_throttls to run POWER or THERMAL throttling
+/// @note OCC will be using the POWER option
+///
+enum class throttle_type
+{
+ POWER = 0,
+ THERMAL = 1,
+};
///
/// @brief Trait classes for proc_type
OpenPOWER on IntegriCloud