-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]> Tested-by: Jenkins Server <[email protected]> Tested-by: HWSV CI <[email protected]> Tested-by: Hostboot CI <[email protected]> Reviewed-by: STEPHEN GLANCY <[email protected]> Reviewed-by: Sheldon Bailey <[email protected]> Reviewed-by: Louis Stermole <[email protected]> Reviewed-by: Jennifer A. Stofer <[email protected]> Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/72148 Tested-by: Jenkins OP Build CI <[email protected]> Tested-by: Jenkins OP HW <[email protected]> Reviewed-by: Christian R. Geddes <[email protected]>
- Loading branch information
Showing
8 changed files
with
202 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 <[email protected]> | ||
// *HWP HWP Backup: Louis Stermole <[email protected]> | ||
// *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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 <[email protected]> | ||
// *HWP HWP Backup: Louis Stermole <[email protected]> | ||
// *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 |
29 changes: 29 additions & 0 deletions
29
src/import/chips/p9a/procedures/hwp/memory/p9a_mss_bulk_pwr_throttles.mk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 <[email protected]> | ||
// *HWP HWP Backup: Louis Stermole <[email protected]> | ||
// *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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
src/import/chips/p9a/procedures/hwp/memory/p9a_mss_utils_to_throttle.mk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters