Skip to content

Commit 2dcce4b

Browse files
aamarincrgeddes
authored andcommitted
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>
1 parent cd82f3e commit 2dcce4b

File tree

8 files changed

+202
-10
lines changed

8 files changed

+202
-10
lines changed

src/import/chips/p9/procedures/hwp/memory/lib/shared/mss_const.H

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -485,16 +485,6 @@ enum test_type
485485

486486
} // namespace mcbist
487487

488-
///
489-
/// @brief throttle_type used to set bulk_pwr_throttls to run POWER or THERMAL throttling
490-
/// @note OCC will be using the POWER option
491-
///
492-
enum class throttle_type
493-
{
494-
POWER = 0,
495-
THERMAL = 1,
496-
};
497-
498488
enum class shmoo_edge : std::size_t
499489
{
500490
LEFT,

src/import/chips/p9a/procedures/hwp/memory/p9a_mss_bulk_pwr_throttles.C

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,37 @@
2222
/* permissions and limitations under the License. */
2323
/* */
2424
/* IBM_PROLOG_END_TAG */
25+
26+
///
27+
/// @file p9a_mss_bulk_pwr_throttles.C
28+
/// @brief Set the OCMB throttle attributes based on any power limits (thermal, regulator, or bulk)
29+
///
30+
// *HWP HWP Owner: Andre A. Marin <aamarin@us.ibm.com>
31+
// *HWP HWP Backup: Louis Stermole <stermole@us.ibm.com>
32+
// *HWP Team: Memory
33+
// *HWP Level: 1
34+
// *HWP Consumed by: FSP:HB
35+
36+
#include <fapi2.H>
37+
#include <vector>
38+
#include <p9a_mss_bulk_pwr_throttles.H>
39+
40+
///
41+
/// @brief Set ATTR_MSS_PORT_MAXPOWER, ATTR_MSS_MEM_THROTTLED_N_COMMANDS_PER_SLOT, ATTR_MSS_MEM_THROTTLED_N_COMMANDS_PER_PORT
42+
/// @param[in] i_targets vector of OCMB_CHIP's on the same processor or in the same node
43+
/// @param[in] i_throttle_type thermal boolean to determine whether to calculate throttles based on the power regulator or thermal limits
44+
/// @return fapi2::ReturnCode - FAPI2_RC_SUCCESS iff get is OK
45+
/// @note Called by p9a_mss_eff_config_thermal or by TMGT
46+
/// @note determines the throttle levels based off of the DIMM's power curve, sets the slot throttles to the same
47+
/// @note Enums are POWER for power regulator throttles and THERMAL for thermal throttles
48+
/// @note equalizes the throttles to the lowest of runtime and the lowest slot-throttle value
49+
///
50+
fapi2::ReturnCode p9a_mss_bulk_pwr_throttles(const std::vector< fapi2::Target<fapi2::TARGET_TYPE_OCMB_CHIP> >&
51+
i_targets,
52+
const mss::throttle_type i_throttle_type)
53+
{
54+
FAPI_INF("Start p9a_mss_bulk_pwr_throttles for %s type throttling",
55+
(( i_throttle_type == mss::throttle_type::THERMAL) ? "THERMAL" : "POWER"));
56+
57+
return fapi2::FAPI2_RC_SUCCESS;
58+
}

src/import/chips/p9a/procedures/hwp/memory/p9a_mss_bulk_pwr_throttles.H

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,43 @@
2222
/* permissions and limitations under the License. */
2323
/* */
2424
/* IBM_PROLOG_END_TAG */
25+
26+
///
27+
/// @file p9a_mss_bulk_pwr_throttles.H
28+
/// @brief Set the OCMB throttle attributes based on any power limits (thermal, regulator, or bulk)
29+
///
30+
// *HWP HWP Owner: Andre A. Marin <aamarin@us.ibm.com>
31+
// *HWP HWP Backup: Louis Stermole <stermole@us.ibm.com>
32+
// *HWP Team: Memory
33+
// *HWP Level: 1
34+
// *HWP Consumed by: FSP:HB
35+
36+
#ifndef __P9A_MSS_BULK_PWR_THROTTLES__
37+
#define __P9A_MSS_BULK_PWR_THROTTLES__
38+
39+
#include <fapi2.H>
40+
#include <vector>
41+
#include <generic/memory/lib/utils/shared/mss_generic_consts.H>
42+
43+
typedef fapi2::ReturnCode (*p9a_mss_bulk_pwr_throttles_FP_t) (const
44+
std::vector< fapi2::Target< fapi2::TARGET_TYPE_OCMB_CHIP>>&, const mss::throttle_type i_throttle_type);
45+
46+
extern "C"
47+
{
48+
49+
///
50+
/// @brief Set ATTR_MSS_PORT_MAXPOWER, ATTR_MSS_MEM_THROTTLED_N_COMMANDS_PER_SLOT, ATTR_MSS_MEM_THROTTLED_N_COMMANDS_PER_PORT
51+
/// @param[in] i_targets vector of OCMB_CHIP's on the same processor or in the same node
52+
/// @param[in] thermal boolean to determine whether to calculate throttles based on the power regulator or thermal limits
53+
/// @return fapi2::ReturnCode - FAPI2_RC_SUCCESS iff get is OK
54+
/// @note Called by p9a_mss_eff_config_thermal or by TMGT
55+
/// @note determines the throttle levels based off of the DIMM's power curve, sets the slot throttles to the same
56+
/// @note Enums are POWER for power regulator throttles and THERMAL for thermal throttles
57+
/// @note equalizes the throttles to the lowest of runtime and the lowest slot-throttle value
58+
///
59+
fapi2::ReturnCode p9a_mss_bulk_pwr_throttles (const std::vector < fapi2::Target< fapi2::TARGET_TYPE_OCMB_CHIP>>&
60+
i_targets,
61+
const mss::throttle_type i_throttle_type );
62+
}
63+
64+
#endif
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# IBM_PROLOG_BEGIN_TAG
2+
# This is an automatically generated prolog.
3+
#
4+
# $Source: src/import/chips/p9a/procedures/hwp/memory/p9a_mss_bulk_pwr_throttles.mk $
5+
#
6+
# OpenPOWER HostBoot Project
7+
#
8+
# Contributors Listed Below - COPYRIGHT 2019
9+
# [+] International Business Machines Corp.
10+
#
11+
#
12+
# Licensed under the Apache License, Version 2.0 (the "License");
13+
# you may not use this file except in compliance with the License.
14+
# You may obtain a copy of the License at
15+
#
16+
# http://www.apache.org/licenses/LICENSE-2.0
17+
#
18+
# Unless required by applicable law or agreed to in writing, software
19+
# distributed under the License is distributed on an "AS IS" BASIS,
20+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
21+
# implied. See the License for the specific language governing
22+
# permissions and limitations under the License.
23+
#
24+
# IBM_PROLOG_END_TAG
25+
-include 00p9a_common.mk
26+
27+
PROCEDURE=p9a_mss_bulk_pwr_throttles
28+
$(eval $(call ADD_MEMORY_INCDIRS,$(PROCEDURE)))
29+
$(call BUILD_PROCEDURE)

src/import/chips/p9a/procedures/hwp/memory/p9a_mss_utils_to_throttle.C

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,38 @@
2222
/* permissions and limitations under the License. */
2323
/* */
2424
/* IBM_PROLOG_END_TAG */
25+
26+
///
27+
/// @file p9a_mss_utils_to_throttle.C
28+
/// @brief Sets throttles and power attributes for a given utilization value
29+
/// @note TMGT will call this procedure to set the N address operations (commands)
30+
/// allowed within a window of M DRAM clocks given the minimum dram data bus utilization.
31+
//// If input utilization is zero, then safemode values from MRW will be used
32+
///
33+
34+
// *HWP HWP Owner: Andre A. Marin <aamarin@us.ibm.com>
35+
// *HWP HWP Backup: Louis Stermole <stermole@us.ibm.com>
36+
// *HWP Team: Memory
37+
// *HWP Level: 1
38+
// *HWP Consumed by: FSP:HB
39+
40+
#include <p9a_mss_utils_to_throttle.H>
41+
42+
// fapi2
43+
#include <fapi2.H>
44+
45+
///
46+
/// @brief Determines throttle and power values for a given port databus utilization.
47+
/// @param[in] i_targets vector of OCMB_CHIPs to set throttle and power attributes on
48+
/// @return FAPI2_RC_SUCCESS iff ok
49+
/// @note ATTR_MSS_MEM_THROTTLED_N_COMMANDS_PER_SLOT will be set to worst case of all slots passed in
50+
/// @note input ATTR_MSS_DATABUS_UTIL and ATTR_MSS_MEM_WATT_TARGET
51+
/// @note output ATTR_MSS_MEM_THROTTLED_N_COMMANDS_PER_SLOT, ATTR_MSS_MEM_THROTTLED_N_COMMANDS_PER_PORT, and ATTR_MSS_PORT_MAXPOWER
52+
/// @note Does not set runtime throttles or set registers to throttle values`
53+
///
54+
fapi2::ReturnCode p9a_mss_utils_to_throttle( const std::vector< fapi2::Target<fapi2::TARGET_TYPE_OCMB_CHIP> >&
55+
i_targets )
56+
{
57+
FAPI_INF("Entering p9a_mss_utils_to_throttle");
58+
return fapi2::FAPI2_RC_SUCCESS;
59+
}

src/import/chips/p9a/procedures/hwp/memory/p9a_mss_utils_to_throttle.H

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,29 @@
2222
/* permissions and limitations under the License. */
2323
/* */
2424
/* IBM_PROLOG_END_TAG */
25+
26+
#ifndef __P9A_MSS_UTILS_TO_THROTTLE__
27+
#define __P9A_MSS_UTILS_TO_THROTTLE__
28+
29+
#include <fapi2.H>
30+
#include <vector>
31+
32+
typedef fapi2::ReturnCode (*p9a_mss_utils_to_throttle_FP_t) (const
33+
std::vector< fapi2::Target<fapi2::TARGET_TYPE_OCMB_CHIP> >&);
34+
35+
extern "C"
36+
{
37+
38+
///
39+
/// @brief Determines throttle and power values for a given port databus utilization.
40+
/// @param[in] i_targets vector of OCMB_CHIPs to set throttle and power attributes on
41+
/// @return FAPI2_RC_SUCCESS iff ok
42+
/// @note ATTR_MSS_MEM_THROTTLED_N_COMMANDS_PER_SLOT will be set to worst case of all slots passed in
43+
/// @note output ATTR_MSS_MEM_THROTTLED_N_COMMANDS_PER_SLOT, ATTR_MSS_MEM_THROTTLED_N_COMMANDS_PER_PORT, and ATTR_MSS_PORT_MAXPOWER
44+
/// @note Does not set runtime throttles or set registers to throttle values`
45+
///
46+
fapi2::ReturnCode p9a_mss_utils_to_throttle(const std::vector <fapi2::Target<fapi2::TARGET_TYPE_OCMB_CHIP> >&
47+
i_targets);
48+
}
49+
50+
#endif
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# IBM_PROLOG_BEGIN_TAG
2+
# This is an automatically generated prolog.
3+
#
4+
# $Source: src/import/chips/p9a/procedures/hwp/memory/p9a_mss_utils_to_throttle.mk $
5+
#
6+
# OpenPOWER HostBoot Project
7+
#
8+
# Contributors Listed Below - COPYRIGHT 2019
9+
# [+] International Business Machines Corp.
10+
#
11+
#
12+
# Licensed under the Apache License, Version 2.0 (the "License");
13+
# you may not use this file except in compliance with the License.
14+
# You may obtain a copy of the License at
15+
#
16+
# http://www.apache.org/licenses/LICENSE-2.0
17+
#
18+
# Unless required by applicable law or agreed to in writing, software
19+
# distributed under the License is distributed on an "AS IS" BASIS,
20+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
21+
# implied. See the License for the specific language governing
22+
# permissions and limitations under the License.
23+
#
24+
# IBM_PROLOG_END_TAG
25+
-include 00p9a_common.mk
26+
27+
PROCEDURE=p9a_mss_utils_to_throttle
28+
$(eval $(call ADD_MEMORY_INCDIRS,$(PROCEDURE)))
29+
$(call BUILD_PROCEDURE)

src/import/generic/memory/lib/utils/shared/mss_generic_consts.H

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,15 @@ enum nibble_mask
310310
MASK_NIBBLE1 = 0x0f,
311311
};
312312

313+
///
314+
/// @brief throttle_type used to set bulk_pwr_throttls to run POWER or THERMAL throttling
315+
/// @note OCC will be using the POWER option
316+
///
317+
enum class throttle_type
318+
{
319+
POWER = 0,
320+
THERMAL = 1,
321+
};
313322

314323
///
315324
/// @brief Trait classes for proc_type

0 commit comments

Comments
 (0)