Skip to content

Commit

Permalink
Add L1 for p9a_mss_bulk_pwr_throttles and p9a_mss_utils_to_throttle
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
aamarin authored and crgeddes committed Mar 15, 2019
1 parent cd82f3e commit 2dcce4b
Show file tree
Hide file tree
Showing 8 changed files with 202 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/import/chips/p9/procedures/hwp/memory/lib/shared/mss_const.H
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -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)
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -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)
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2dcce4b

Please sign in to comment.