summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLouis Stermole <stermole@us.ibm.com>2019-03-22 18:48:29 -0400
committerChristian R. Geddes <crgeddes@us.ibm.com>2019-04-05 18:00:23 -0500
commit54a9c7b4a9e85d7d49a38e3d5e3f2407241cde13 (patch)
tree052d3e7646a5905d7a4a940a98fbe77333ee0ed1 /src
parentacd09d45c209ec014825cb7539aaab357493ea42 (diff)
downloadtalos-hostboot-54a9c7b4a9e85d7d49a38e3d5e3f2407241cde13.tar.gz
talos-hostboot-54a9c7b4a9e85d7d49a38e3d5e3f2407241cde13.zip
Fix duplicate symbol errors from DEFAULT_MC_TYPE
Change-Id: I7a5a40c0f0ab6a809e6906ad40e26fa473cfb286 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/74903 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: STEPHEN GLANCY <sglancy@us.ibm.com> Reviewed-by: Mark Pizzutillo <mark.pizzutillo@ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/74908 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')
-rw-r--r--src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_check_for_ready.C1
-rw-r--r--src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_draminit_mc.C1
-rw-r--r--src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/shared/exp_consts.H2
-rw-r--r--src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/shared/exp_defaults.H24
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/dimm/bcw_load_ddr4.C1
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/dimm/ddr4/latch_wr_vref.C1
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/dimm/ddr4/nvdimm_utils.C1
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/dimm/ddr4/pba.C1
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/dimm/ddr4/pda.C1
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/dimm/ddr4/zqcal.C1
-rwxr-xr-xsrc/import/chips/p9/procedures/hwp/memory/lib/dimm/eff_dimm.C1
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/fir/memdiags_fir.C1
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/fir/unmask.C1
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/mc/port.C1
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/mcbist/mcbist.C1
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/mcbist/memdiags.C1
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/mcbist/sim.C1
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/phy/dp16.C1
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/phy/mss_lrdimm_training.C1
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/phy/seq.C3
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/power_thermal/decoder.H3
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/shared/mss_const.H2
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/shared/nimbus_defaults.H24
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/workarounds/adr32s_workarounds.C3
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/workarounds/ccs_workarounds.C1
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/workarounds/dp16_workarounds.C3
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/workarounds/dqs_align_workarounds.C3
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/workarounds/draminit_workarounds.H1
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/workarounds/freq_workarounds.H2
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/workarounds/mcbist_workarounds.C1
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/workarounds/wr_vref_workarounds.C1
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/mss.H7
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/p9_mss_background_scrub.C1
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/p9_mss_draminit.C1
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/p9_mss_memdiag.C1
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/p9_mss_scominit.C1
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/p9_mss_scrub.C1
-rw-r--r--src/import/chips/p9a/procedures/hwp/memory/lib/shared/axone_consts.H7
-rw-r--r--src/import/chips/p9a/procedures/hwp/memory/lib/shared/axone_defaults.H25
-rw-r--r--src/import/chips/p9a/procedures/hwp/memory/p9a_omi_train.C1
-rw-r--r--src/import/chips/p9a/procedures/hwp/memory/p9a_omi_train_check.C1
-rw-r--r--src/import/generic/memory/lib/utils/freq/gen_mss_freq.H1
-rw-r--r--src/import/generic/memory/lib/utils/freq/mss_freq_scoreboard.C150
-rw-r--r--src/import/generic/memory/lib/utils/freq/mss_freq_scoreboard.H101
-rw-r--r--src/import/generic/memory/lib/utils/mss_math.H1
-rw-r--r--src/import/generic/memory/lib/utils/voltage/gen_mss_volt.H2
46 files changed, 215 insertions, 176 deletions
diff --git a/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_check_for_ready.C b/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_check_for_ready.C
index c162a9d15..6a7b0d894 100644
--- a/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_check_for_ready.C
+++ b/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_check_for_ready.C
@@ -34,6 +34,7 @@
// *HWP Consumed by: FSP:HB
#include <fapi2.H>
+#include <lib/shared/exp_defaults.H>
#include <exp_check_for_ready.H>
#include <lib/i2c/exp_i2c.H>
#include <generic/memory/lib/utils/poll.H>
diff --git a/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_draminit_mc.C b/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_draminit_mc.C
index 9719e612c..be2d4e36f 100644
--- a/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_draminit_mc.C
+++ b/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_draminit_mc.C
@@ -34,6 +34,7 @@
#include <fapi2.H>
+#include <lib/shared/exp_defaults.H>
#include <generic/memory/lib/utils/c_str.H>
#include <generic/memory/lib/utils/find.H>
#include <generic/memory/lib/utils/count_dimm.H>
diff --git a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/shared/exp_consts.H b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/shared/exp_consts.H
index 9d4857b72..5bc631f0c 100644
--- a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/shared/exp_consts.H
+++ b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/shared/exp_consts.H
@@ -41,8 +41,6 @@
namespace mss
{
-constexpr mss::mc_type DEFAULT_MC_TYPE = mss::mc_type::EXPLORER;
-
namespace exp
{
diff --git a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/shared/exp_defaults.H b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/shared/exp_defaults.H
index 39491810f..999e93425 100644
--- a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/shared/exp_defaults.H
+++ b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/shared/exp_defaults.H
@@ -22,3 +22,27 @@
/* permissions and limitations under the License. */
/* */
/* IBM_PROLOG_END_TAG */
+
+///
+/// @file exp_defaults.H
+/// @brief default types associated with Nimbus system
+///
+// *HWP HWP Owner: Andre A. Marin <aamarin@us.ibm.com>
+// *HWP HWP Backup: Louis Stermole <stermole@us.ibm.com>
+// *HWP Team: Memory
+// *HWP Level: 2
+// *HWP Consumed by: CI
+
+#ifndef _MSS_NIMBUS_DEFAULTS_H_
+#define _MSS_NIMBUS_DEFAULTS_H_
+
+#include <generic/memory/lib/utils/shared/mss_generic_consts.H>
+
+namespace mss
+{
+
+constexpr mss::mc_type DEFAULT_MC_TYPE = mss::mc_type::EXPLORER;
+
+} // ns mss
+
+#endif
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/dimm/bcw_load_ddr4.C b/src/import/chips/p9/procedures/hwp/memory/lib/dimm/bcw_load_ddr4.C
index 8fbf74623..266e7ce56 100644
--- a/src/import/chips/p9/procedures/hwp/memory/lib/dimm/bcw_load_ddr4.C
+++ b/src/import/chips/p9/procedures/hwp/memory/lib/dimm/bcw_load_ddr4.C
@@ -33,6 +33,7 @@
// *HWP Level: 3
// *HWP Consumed by: FSP:HB
+#include <lib/shared/nimbus_defaults.H>
#include <fapi2.H>
#include <p9_mc_scom_addresses.H>
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/dimm/ddr4/latch_wr_vref.C b/src/import/chips/p9/procedures/hwp/memory/lib/dimm/ddr4/latch_wr_vref.C
index 0d2cad989..7676df23b 100644
--- a/src/import/chips/p9/procedures/hwp/memory/lib/dimm/ddr4/latch_wr_vref.C
+++ b/src/import/chips/p9/procedures/hwp/memory/lib/dimm/ddr4/latch_wr_vref.C
@@ -33,6 +33,7 @@
// *HWP Level: 3
// *HWP Consumed by: FSP:HB Memory
+#include <lib/shared/nimbus_defaults.H>
#include <vector>
#include <fapi2.H>
#include <generic/memory/lib/utils/c_str.H>
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/dimm/ddr4/nvdimm_utils.C b/src/import/chips/p9/procedures/hwp/memory/lib/dimm/ddr4/nvdimm_utils.C
index fe2f396f1..0374da3dc 100644
--- a/src/import/chips/p9/procedures/hwp/memory/lib/dimm/ddr4/nvdimm_utils.C
+++ b/src/import/chips/p9/procedures/hwp/memory/lib/dimm/ddr4/nvdimm_utils.C
@@ -33,6 +33,7 @@
// *HWP Level: 3
// *HWP Consumed by: FSP:HB
+#include <lib/shared/nimbus_defaults.H>
#include <fapi2.H>
#include <vector>
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/dimm/ddr4/pba.C b/src/import/chips/p9/procedures/hwp/memory/lib/dimm/ddr4/pba.C
index 3fc0e0bb6..710fe2cd8 100644
--- a/src/import/chips/p9/procedures/hwp/memory/lib/dimm/ddr4/pba.C
+++ b/src/import/chips/p9/procedures/hwp/memory/lib/dimm/ddr4/pba.C
@@ -33,6 +33,7 @@
// *HWP Level: 3
// *HWP Consumed by: FSP:HB Memory Lab
+#include <lib/shared/nimbus_defaults.H>
#include <fapi2.H>
#include <generic/memory/lib/utils/c_str.H>
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/dimm/ddr4/pda.C b/src/import/chips/p9/procedures/hwp/memory/lib/dimm/ddr4/pda.C
index 2f22c42a0..a89cee0e2 100644
--- a/src/import/chips/p9/procedures/hwp/memory/lib/dimm/ddr4/pda.C
+++ b/src/import/chips/p9/procedures/hwp/memory/lib/dimm/ddr4/pda.C
@@ -33,6 +33,7 @@
// *HWP Level: 3
// *HWP Consumed by: FSP:HB Memory Lab
+#include <lib/shared/nimbus_defaults.H>
#include <fapi2.H>
#include <p9_mc_scom_addresses.H>
#include <p9_mc_scom_addresses_fld.H>
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/dimm/ddr4/zqcal.C b/src/import/chips/p9/procedures/hwp/memory/lib/dimm/ddr4/zqcal.C
index f007d2c17..844765f44 100644
--- a/src/import/chips/p9/procedures/hwp/memory/lib/dimm/ddr4/zqcal.C
+++ b/src/import/chips/p9/procedures/hwp/memory/lib/dimm/ddr4/zqcal.C
@@ -33,6 +33,7 @@
// *HWP Level: 3
// *HWP Consumed by: FSP:HB
+#include <lib/shared/nimbus_defaults.H>
#include <vector>
#include <fapi2.H>
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/dimm/eff_dimm.C b/src/import/chips/p9/procedures/hwp/memory/lib/dimm/eff_dimm.C
index c3c6a1f53..b62574bdc 100755
--- a/src/import/chips/p9/procedures/hwp/memory/lib/dimm/eff_dimm.C
+++ b/src/import/chips/p9/procedures/hwp/memory/lib/dimm/eff_dimm.C
@@ -27,6 +27,7 @@
// *HWP Team: Memory
// *HWP Level: 3
// *HWP Consumed by: FSP:HB
+#include <lib/shared/nimbus_defaults.H>
#include <math.h>
// fapi2
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/fir/memdiags_fir.C b/src/import/chips/p9/procedures/hwp/memory/lib/fir/memdiags_fir.C
index 034927ffa..f4ab6727c 100644
--- a/src/import/chips/p9/procedures/hwp/memory/lib/fir/memdiags_fir.C
+++ b/src/import/chips/p9/procedures/hwp/memory/lib/fir/memdiags_fir.C
@@ -33,6 +33,7 @@
// *HWP Level: 3
// *HWP Consumed by: FSP:HB
+#include <lib/shared/nimbus_defaults.H>
#include <fapi2.H>
#include <p9_mc_scom_addresses.H>
#include <p9_mc_scom_addresses_fld.H>
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/fir/unmask.C b/src/import/chips/p9/procedures/hwp/memory/lib/fir/unmask.C
index 999e4c812..3d28935f8 100644
--- a/src/import/chips/p9/procedures/hwp/memory/lib/fir/unmask.C
+++ b/src/import/chips/p9/procedures/hwp/memory/lib/fir/unmask.C
@@ -33,6 +33,7 @@
// *HWP Level: 3
// *HWP Consumed by: FSP:HB
+#include <lib/shared/nimbus_defaults.H>
#include <fapi2.H>
#include <p9_mc_scom_addresses.H>
#include <p9_mc_scom_addresses_fld.H>
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/mc/port.C b/src/import/chips/p9/procedures/hwp/memory/lib/mc/port.C
index 939f1b029..9ca4fae85 100644
--- a/src/import/chips/p9/procedures/hwp/memory/lib/mc/port.C
+++ b/src/import/chips/p9/procedures/hwp/memory/lib/mc/port.C
@@ -33,6 +33,7 @@
// *HWP Level: 3
// *HWP Consumed by: FSP:HB
+#include <lib/shared/nimbus_defaults.H>
#include <fapi2.H>
#include <lib/mc/port.H>
#include <lib/shared/mss_const.H>
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/mcbist/mcbist.C b/src/import/chips/p9/procedures/hwp/memory/lib/mcbist/mcbist.C
index 64ac23bcc..f5ef0e24c 100644
--- a/src/import/chips/p9/procedures/hwp/memory/lib/mcbist/mcbist.C
+++ b/src/import/chips/p9/procedures/hwp/memory/lib/mcbist/mcbist.C
@@ -33,6 +33,7 @@
// *HWP Level: 3
// *HWP Consumed by: FSP:HB
+#include <lib/shared/nimbus_defaults.H>
#include <fapi2.H>
#include <lib/mcbist/mcbist.H>
#include <lib/utils/dump_regs.H>
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/mcbist/memdiags.C b/src/import/chips/p9/procedures/hwp/memory/lib/mcbist/memdiags.C
index e7176b855..b235637b5 100644
--- a/src/import/chips/p9/procedures/hwp/memory/lib/mcbist/memdiags.C
+++ b/src/import/chips/p9/procedures/hwp/memory/lib/mcbist/memdiags.C
@@ -33,6 +33,7 @@
// *HWP Level: 3
// *HWP Consumed by: FSP:HB
+#include <lib/shared/nimbus_defaults.H>
#include <fapi2.H>
#include <p9_mc_scom_addresses.H>
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/mcbist/sim.C b/src/import/chips/p9/procedures/hwp/memory/lib/mcbist/sim.C
index 20a8b10a3..2fa88eb98 100644
--- a/src/import/chips/p9/procedures/hwp/memory/lib/mcbist/sim.C
+++ b/src/import/chips/p9/procedures/hwp/memory/lib/mcbist/sim.C
@@ -33,6 +33,7 @@
// *HWP Level: 3
// *HWP Consumed by: FSP:HB
+#include <lib/shared/nimbus_defaults.H>
#include <fapi2.H>
#include <lib/dimm/rank.H>
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/phy/dp16.C b/src/import/chips/p9/procedures/hwp/memory/lib/phy/dp16.C
index 2b809d3fa..759843cea 100644
--- a/src/import/chips/p9/procedures/hwp/memory/lib/phy/dp16.C
+++ b/src/import/chips/p9/procedures/hwp/memory/lib/phy/dp16.C
@@ -33,6 +33,7 @@
// *HWP Level: 3
// *HWP Consumed by: FSP:HB
+#include <lib/shared/nimbus_defaults.H>
#include <fapi2.H>
#include <utility>
#include <vector>
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/phy/mss_lrdimm_training.C b/src/import/chips/p9/procedures/hwp/memory/lib/phy/mss_lrdimm_training.C
index 0bee4a41f..2af5b7a15 100644
--- a/src/import/chips/p9/procedures/hwp/memory/lib/phy/mss_lrdimm_training.C
+++ b/src/import/chips/p9/procedures/hwp/memory/lib/phy/mss_lrdimm_training.C
@@ -35,6 +35,7 @@
// *HWP Level: 2
// *HWP Consumed by: FSP:HB
+#include <lib/shared/nimbus_defaults.H>
#include <p9_mc_scom_addresses.H>
#include <p9_mc_scom_addresses_fld.H>
#include <lib/phy/mss_lrdimm_training.H>
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/phy/seq.C b/src/import/chips/p9/procedures/hwp/memory/lib/phy/seq.C
index 6c61d08ce..8e15deb5b 100644
--- a/src/import/chips/p9/procedures/hwp/memory/lib/phy/seq.C
+++ b/src/import/chips/p9/procedures/hwp/memory/lib/phy/seq.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2016,2017 */
+/* Contributors Listed Below - COPYRIGHT 2016,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -33,6 +33,7 @@
// *HWP Level: 3
// *HWP Consumed by: FSP:HB
+#include <lib/shared/nimbus_defaults.H>
#include <fapi2.H>
#include <lib/phy/seq.H>
#include <generic/memory/lib/utils/scom.H>
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/power_thermal/decoder.H b/src/import/chips/p9/procedures/hwp/memory/lib/power_thermal/decoder.H
index e38696fef..ac1efcdbe 100644
--- a/src/import/chips/p9/procedures/hwp/memory/lib/power_thermal/decoder.H
+++ b/src/import/chips/p9/procedures/hwp/memory/lib/power_thermal/decoder.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2016,2018 */
+/* Contributors Listed Below - COPYRIGHT 2016,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -36,7 +36,6 @@
#define _MSS_POWER_DECODER__
#include <fapi2.H>
-#include <mss.H>
#include <lib/dimm/kind.H>
#include <generic/memory/lib/utils/count_dimm.H>
namespace mss
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 30c22a227..e61edfc78 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
@@ -43,8 +43,6 @@
namespace mss
{
-constexpr mss::mc_type DEFAULT_MC_TYPE = mss::mc_type::NIMBUS;
-
enum sizes
{
PORTS_PER_MCS = 2,
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/shared/nimbus_defaults.H b/src/import/chips/p9/procedures/hwp/memory/lib/shared/nimbus_defaults.H
index ee7ff2280..5863d063f 100644
--- a/src/import/chips/p9/procedures/hwp/memory/lib/shared/nimbus_defaults.H
+++ b/src/import/chips/p9/procedures/hwp/memory/lib/shared/nimbus_defaults.H
@@ -22,3 +22,27 @@
/* permissions and limitations under the License. */
/* */
/* IBM_PROLOG_END_TAG */
+
+///
+/// @file nimbus_defaults.H
+/// @brief default types associated with Nimbus system
+///
+// *HWP HWP Owner: Andre Marin <aamarin@us.ibm.com>
+// *HWP HWP Backup: Stephen Glancy <sglancy@us.ibm.com>
+// *HWP Team: Memory
+// *HWP Level: 3
+// *HWP Consumed by: HB:FSP
+
+#ifndef _MSS_NIMBUS_DEFAULTS_H_
+#define _MSS_NIMBUS_DEFAULTS_H_
+
+#include <generic/memory/lib/utils/shared/mss_generic_consts.H>
+
+namespace mss
+{
+
+constexpr mss::mc_type DEFAULT_MC_TYPE = mss::mc_type::NIMBUS;
+
+} // ns mss
+
+#endif
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/adr32s_workarounds.C b/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/adr32s_workarounds.C
index 281079963..cb9e22594 100644
--- a/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/adr32s_workarounds.C
+++ b/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/adr32s_workarounds.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2016,2018 */
+/* Contributors Listed Below - COPYRIGHT 2016,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -35,6 +35,7 @@
// *HWP Level: 3
// *HWP Consumed by: FSP:HB
+#include <lib/shared/nimbus_defaults.H>
#include <fapi2.H>
#include <p9_mc_scom_addresses.H>
#include <p9_mc_scom_addresses_fld.H>
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/ccs_workarounds.C b/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/ccs_workarounds.C
index 957eac4fd..13c3cffae 100644
--- a/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/ccs_workarounds.C
+++ b/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/ccs_workarounds.C
@@ -33,6 +33,7 @@
// *HWP Level: 3
// *HWP Consumed by: FSP:HB Memory Lab
+#include <lib/shared/nimbus_defaults.H>
#include <lib/workarounds/ccs_workarounds.H>
#include <lib/dimm/rank.H>
#include <p9_mc_scom_addresses.H>
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/dp16_workarounds.C b/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/dp16_workarounds.C
index d1f46b27f..386765b3d 100644
--- a/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/dp16_workarounds.C
+++ b/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/dp16_workarounds.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2016,2018 */
+/* Contributors Listed Below - COPYRIGHT 2016,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -35,6 +35,7 @@
// *HWP Level: 3
// *HWP Consumed by: FSP:HB
+#include <lib/shared/nimbus_defaults.H>
#include <fapi2.H>
#include <p9_mc_scom_addresses.H>
#include <p9_mc_scom_addresses_fld.H>
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/dqs_align_workarounds.C b/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/dqs_align_workarounds.C
index 1839d103c..1045776f7 100644
--- a/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/dqs_align_workarounds.C
+++ b/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/dqs_align_workarounds.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2017,2018 */
+/* Contributors Listed Below - COPYRIGHT 2017,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -23,6 +23,7 @@
/* */
/* IBM_PROLOG_END_TAG */
+#include <lib/shared/nimbus_defaults.H>
#include <fapi2.H>
#include <lib/workarounds/dqs_align_workarounds.H>
#include <p9_mc_scom_addresses.H>
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/draminit_workarounds.H b/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/draminit_workarounds.H
index 05b6ae9e2..1b43c1416 100644
--- a/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/draminit_workarounds.H
+++ b/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/draminit_workarounds.H
@@ -35,7 +35,6 @@
#include <fapi2.H>
-#include <mss.H>
#include <lib/dimm/rcd_load_ddr4.H>
#include <lib/dimm/ddr4/control_word_ddr4.H>
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/freq_workarounds.H b/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/freq_workarounds.H
index ac8afcb86..ea6035452 100644
--- a/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/freq_workarounds.H
+++ b/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/freq_workarounds.H
@@ -35,8 +35,6 @@
#include <fapi2.H>
-#include <mss.H>
-
namespace mss
{
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/mcbist_workarounds.C b/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/mcbist_workarounds.C
index e71ee2b29..9316abaa5 100644
--- a/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/mcbist_workarounds.C
+++ b/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/mcbist_workarounds.C
@@ -35,6 +35,7 @@
// *HWP Level: 3
// *HWP Consumed by: FSP:HB
+#include <lib/shared/nimbus_defaults.H>
#include <fapi2.H>
#include <p9_mc_scom_addresses.H>
#include <p9_mc_scom_addresses_fld.H>
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/wr_vref_workarounds.C b/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/wr_vref_workarounds.C
index 3fbc51f9a..3cabe109a 100644
--- a/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/wr_vref_workarounds.C
+++ b/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/wr_vref_workarounds.C
@@ -35,6 +35,7 @@
// *HWP Level: 3
// *HWP Consumed by: FSP:HB
+#include <lib/shared/nimbus_defaults.H>
#include <fapi2.H>
#include <lib/workarounds/dp16_workarounds.H>
#include <lib/workarounds/wr_vref_workarounds.H>
diff --git a/src/import/chips/p9/procedures/hwp/memory/mss.H b/src/import/chips/p9/procedures/hwp/memory/mss.H
index df176cee7..f8c5dabf9 100644
--- a/src/import/chips/p9/procedures/hwp/memory/mss.H
+++ b/src/import/chips/p9/procedures/hwp/memory/mss.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2016,2018 */
+/* Contributors Listed Below - COPYRIGHT 2016,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -42,6 +42,11 @@
#include <p9_mc_scom_addresses.H>
#include <p9_mc_scom_addresses_fld.H>
+// This is ok here so long as we don't include this header in any other header,
+// unless it's in a non-firmware path (lab, unit tests, etc).
+// This is to prevent our DEFAULTs from spilling over where we don't want them.
+#include <lib/shared/nimbus_defaults.H>
+
#include <lib/shared/mss_const.H>
#include <lib/shared/mss_kind.H>
diff --git a/src/import/chips/p9/procedures/hwp/memory/p9_mss_background_scrub.C b/src/import/chips/p9/procedures/hwp/memory/p9_mss_background_scrub.C
index d1f18a3ba..aaf7b6195 100644
--- a/src/import/chips/p9/procedures/hwp/memory/p9_mss_background_scrub.C
+++ b/src/import/chips/p9/procedures/hwp/memory/p9_mss_background_scrub.C
@@ -33,6 +33,7 @@
// *HWP Level: 2
// *HWP Consumed by: FSP:HB
+#include <lib/shared/nimbus_defaults.H>
#include <fapi2.H>
#include <p9_mss_background_scrub.H>
diff --git a/src/import/chips/p9/procedures/hwp/memory/p9_mss_draminit.C b/src/import/chips/p9/procedures/hwp/memory/p9_mss_draminit.C
index 4e102cd20..795107bfb 100644
--- a/src/import/chips/p9/procedures/hwp/memory/p9_mss_draminit.C
+++ b/src/import/chips/p9/procedures/hwp/memory/p9_mss_draminit.C
@@ -33,6 +33,7 @@
// *HWP Level: 3
// *HWP Consumed by: FSP:HB
+#include <lib/shared/nimbus_defaults.H>
#include <fapi2.H>
#include <mss.H>
diff --git a/src/import/chips/p9/procedures/hwp/memory/p9_mss_memdiag.C b/src/import/chips/p9/procedures/hwp/memory/p9_mss_memdiag.C
index dcaaef851..150f725a3 100644
--- a/src/import/chips/p9/procedures/hwp/memory/p9_mss_memdiag.C
+++ b/src/import/chips/p9/procedures/hwp/memory/p9_mss_memdiag.C
@@ -33,6 +33,7 @@
// *HWP Level: 2
// *HWP Consumed by: FSP:HB
+#include <lib/shared/nimbus_defaults.H>
#include <fapi2.H>
#include <p9_mss_memdiag.H>
diff --git a/src/import/chips/p9/procedures/hwp/memory/p9_mss_scominit.C b/src/import/chips/p9/procedures/hwp/memory/p9_mss_scominit.C
index cb03ee369..3ee15dc3b 100644
--- a/src/import/chips/p9/procedures/hwp/memory/p9_mss_scominit.C
+++ b/src/import/chips/p9/procedures/hwp/memory/p9_mss_scominit.C
@@ -33,6 +33,7 @@
// *HWP Level: 3
// *HWP Consumed by: FSP:HB
+#include <lib/shared/nimbus_defaults.H>
#include <fapi2.H>
#include <p9_mss_scominit.H>
#include <p9n_mca_scom.H>
diff --git a/src/import/chips/p9/procedures/hwp/memory/p9_mss_scrub.C b/src/import/chips/p9/procedures/hwp/memory/p9_mss_scrub.C
index cda0dd9f8..b6845295e 100644
--- a/src/import/chips/p9/procedures/hwp/memory/p9_mss_scrub.C
+++ b/src/import/chips/p9/procedures/hwp/memory/p9_mss_scrub.C
@@ -33,6 +33,7 @@
// *HWP Level: 3
// *HWP Consumed by: FSP:HB
+#include <lib/shared/nimbus_defaults.H>
#include <fapi2.H>
#include <p9_mss_scrub.H>
diff --git a/src/import/chips/p9a/procedures/hwp/memory/lib/shared/axone_consts.H b/src/import/chips/p9a/procedures/hwp/memory/lib/shared/axone_consts.H
index 9c81f7dbd..c2ef9aee8 100644
--- a/src/import/chips/p9a/procedures/hwp/memory/lib/shared/axone_consts.H
+++ b/src/import/chips/p9a/procedures/hwp/memory/lib/shared/axone_consts.H
@@ -39,11 +39,4 @@
#include <generic/memory/lib/utils/shared/mss_generic_consts.H>
-namespace mss
-{
-
-constexpr mss::proc_type DEFAULT_PROC_TYPE = mss::proc_type::AXONE;
-
-}// mss
-
#endif
diff --git a/src/import/chips/p9a/procedures/hwp/memory/lib/shared/axone_defaults.H b/src/import/chips/p9a/procedures/hwp/memory/lib/shared/axone_defaults.H
index 12052a3e7..831612e10 100644
--- a/src/import/chips/p9a/procedures/hwp/memory/lib/shared/axone_defaults.H
+++ b/src/import/chips/p9a/procedures/hwp/memory/lib/shared/axone_defaults.H
@@ -22,3 +22,28 @@
/* permissions and limitations under the License. */
/* */
/* IBM_PROLOG_END_TAG */
+
+///
+/// @file axone_defaults.H
+/// @brief default types associated with Nimbus system
+///
+// *HWP HWP Owner: Andre Marin <aamarin@us.ibm.com>
+// *HWP HWP Backup: Stephen Glancy <sglancy@us.ibm.com>
+// *HWP Team: Memory
+// *HWP Level: 3
+// *HWP Consumed by: HB:FSP
+
+#ifndef _MSS_AXONE_DEFAULTS_H_
+#define _MSS_AXONE_DEFAULTS_H_
+
+#include <generic/memory/lib/utils/shared/mss_generic_consts.H>
+
+namespace mss
+{
+
+constexpr mss::proc_type DEFAULT_PROC_TYPE = mss::proc_type::AXONE;
+constexpr mss::mc_type DEFAULT_MC_TYPE = mss::mc_type::EXPLORER;
+
+} // ns mss
+
+#endif
diff --git a/src/import/chips/p9a/procedures/hwp/memory/p9a_omi_train.C b/src/import/chips/p9a/procedures/hwp/memory/p9a_omi_train.C
index 2ade12916..70202d95f 100644
--- a/src/import/chips/p9a/procedures/hwp/memory/p9a_omi_train.C
+++ b/src/import/chips/p9a/procedures/hwp/memory/p9a_omi_train.C
@@ -33,6 +33,7 @@
// *HWP Level: 3
// *HWP Consumed by: Memory
+#include <lib/shared/axone_defaults.H>
#include <p9a_omi_train.H>
#include <fapi2.H>
diff --git a/src/import/chips/p9a/procedures/hwp/memory/p9a_omi_train_check.C b/src/import/chips/p9a/procedures/hwp/memory/p9a_omi_train_check.C
index cc9d8008d..50119a44d 100644
--- a/src/import/chips/p9a/procedures/hwp/memory/p9a_omi_train_check.C
+++ b/src/import/chips/p9a/procedures/hwp/memory/p9a_omi_train_check.C
@@ -33,6 +33,7 @@
// *HWP Level: 3
// *HWP Consumed by: Memory
+#include <lib/shared/axone_defaults.H>
#include <p9a_omi_train_check.H>
#include <fapi2.H>
diff --git a/src/import/generic/memory/lib/utils/freq/gen_mss_freq.H b/src/import/generic/memory/lib/utils/freq/gen_mss_freq.H
index 5abfbfc00..a70dcebb5 100644
--- a/src/import/generic/memory/lib/utils/freq/gen_mss_freq.H
+++ b/src/import/generic/memory/lib/utils/freq/gen_mss_freq.H
@@ -36,6 +36,7 @@
#ifndef _GEN_MSS_FREQ_H_
#define _GEN_MSS_FREQ_H_
+#include <generic/memory/lib/utils/pos.H>
#include <generic/memory/lib/utils/freq/gen_mss_freq_traits.H>
#include <generic/memory/lib/utils/find.H>
#include <generic/memory/lib/spd/spd_facade.H>
diff --git a/src/import/generic/memory/lib/utils/freq/mss_freq_scoreboard.C b/src/import/generic/memory/lib/utils/freq/mss_freq_scoreboard.C
index 6ee1e8056..a648fdadc 100644
--- a/src/import/generic/memory/lib/utils/freq/mss_freq_scoreboard.C
+++ b/src/import/generic/memory/lib/utils/freq/mss_freq_scoreboard.C
@@ -22,153 +22,3 @@
/* permissions and limitations under the License. */
/* */
/* IBM_PROLOG_END_TAG */
-
-///
-/// @file mss_freq_scoreboard.C
-/// @brief Frequency scoreboard class definitions
-///
-// *HWP HWP Owner: Stephen Glancy <sglancy@us.ibm.com>
-// *HWP HWP Backup: Louis Stermole <stermole@us.ibm.com>
-// *HWP Team: Memory
-// *HWP Level: 3
-// *HWP Consumed by: HB:FSP
-
-#include <vector>
-#include <fapi2.H>
-#include <generic/memory/lib/utils/freq/mss_freq_scoreboard.H>
-#include <generic/memory/lib/utils/c_str.H>
-#include <generic/memory/lib/utils/find.H>
-#include <generic/memory/lib/utils/shared/mss_generic_consts.H>
-
-namespace mss
-{
-
-///
-/// @brief Remove frequencies above a limit from the scoreboard
-/// @param[in] i_port_pos position index of port within parent MCBIST
-/// @param[in] i_freq_limit upper limit for frequency
-/// @return FAPI2_RC_SUCCESS if successful
-///
-fapi2::ReturnCode freq_scoreboard::remove_freqs_above_limit(const uint64_t i_port_pos,
- const uint32_t i_freq_limit)
-{
- FAPI_TRY( check_port_position(i_port_pos,
- generic_ffdc_codes::FREQ_SCOREBOARD_REMOVE_FREQS_ABOVE_LIMIT),
- "Invalid port index passed to remove_freqs_above_limit (%d)",
- i_port_pos);
-
- {
- auto& l_port_supported_freqs = iv_supported_port_freqs[i_port_pos];
-
- // Can't do a ranged for loop here because we need the index to get the frequency out of iv_freq_values
- for ( size_t l_index = 0; l_index < l_port_supported_freqs.size(); ++l_index )
- {
- const auto l_scoreboard_freq = iv_freq_values[l_index];
-
- if ( l_scoreboard_freq > i_freq_limit )
- {
- FAPI_INF("Removing freq %d on port %d since it's above the limit %d", l_scoreboard_freq, i_port_pos, i_freq_limit);
- l_port_supported_freqs[l_index] = false;
- }
- }
- }
-
- return fapi2::FAPI2_RC_SUCCESS;
-
-fapi_try_exit:
- return fapi2::current_err;
-}
-
-///
-/// @brief Remove frequencies above a limit from the scoreboard
-/// @param[in] i_port_pos position index of port within parent MCBIST
-/// @param[in] i_freq_limits reference to vector of upper limits for frequency per port
-/// @return FAPI2_RC_SUCCESS if successful
-///
-fapi2::ReturnCode freq_scoreboard::remove_freqs_above_limit(const uint64_t i_port_pos,
- const std::vector<uint32_t> i_freq_limits)
-{
- FAPI_TRY( check_port_position(i_port_pos,
- generic_ffdc_codes::FREQ_SCOREBOARD_REMOVE_FREQS_ABOVE_LIMIT_VECTOR),
- "Invalid port index passed to remove_freqs_above_limit (%d)",
- i_port_pos);
-
- FAPI_ASSERT(i_freq_limits.size() == iv_num_ports,
- fapi2::MSS_INVALID_FREQ_LIST_PASSED()
- .set_SIZE(i_freq_limits.size())
- .set_EXPECTED(iv_num_ports),
- "Invalid frequency list passed to remove_freqs_above_limit (size should be %d but got %d)",
- iv_num_ports, i_freq_limits.size());
-
- {
- const auto l_freq_limit = i_freq_limits[i_port_pos];
- FAPI_TRY( this->remove_freqs_above_limit(i_port_pos, l_freq_limit) );
- }
-
- return fapi2::FAPI2_RC_SUCCESS;
-
-fapi_try_exit:
- return fapi2::current_err;
-}
-
-///
-/// @brief Return the maximum supported frequency for a given port
-/// @param[in] i_port_pos position index of port within parent MCBIST
-/// @param[out] o_freq max supported frequency
-/// @return FAPI2_RC_SUCCESS if successful
-///
-fapi2::ReturnCode freq_scoreboard::max_supported_freq(const uint64_t i_port_pos,
- uint32_t& o_freq) const
-{
- FAPI_TRY( this->check_port_position(i_port_pos,
- generic_ffdc_codes::FREQ_SCOREBOARD_MAX_SUPPORTED_FREQ),
- "Invalid port index passed to max_supported_freq (%d)",
- i_port_pos);
-
- {
- std::vector<uint32_t> l_supported_freqs;
- FAPI_TRY( this->supported_freqs(i_port_pos, l_supported_freqs) );
-
- o_freq = l_supported_freqs.empty() ? 0 : l_supported_freqs.back();
- }
-
- return fapi2::FAPI2_RC_SUCCESS;
-
-fapi_try_exit:
- return fapi2::current_err;
-}
-
-///
-/// @brief Return a list of supported frequencies for a given port
-/// @param[in] i_port_pos position index of port within parent MCBIST
-/// @param[out] o_freq vector of supported frequencies
-/// @return FAPI2_RC_SUCCESS if successful
-///
-fapi2::ReturnCode freq_scoreboard::supported_freqs(const uint64_t i_port_pos,
- std::vector<uint32_t>& o_freqs) const
-{
- FAPI_TRY( check_port_position(i_port_pos,
- generic_ffdc_codes::FREQ_SCOREBOARD_SUPPORTED_FREQS),
- "Invalid port index passed to supported_freqs (%d)",
- i_port_pos);
-
- {
- o_freqs.clear();
- auto& l_port_supported_freqs = iv_supported_port_freqs[i_port_pos];
-
- for ( size_t l_index = 0; l_index < iv_freq_values.size(); ++l_index )
- {
- if (l_port_supported_freqs[l_index])
- {
- o_freqs.push_back(iv_freq_values[l_index]);
- }
- }
- }
-
- return fapi2::FAPI2_RC_SUCCESS;
-
-fapi_try_exit:
- return fapi2::current_err;
-}
-
-} // ns mss
diff --git a/src/import/generic/memory/lib/utils/freq/mss_freq_scoreboard.H b/src/import/generic/memory/lib/utils/freq/mss_freq_scoreboard.H
index 1cd31adc5..104bf38ca 100644
--- a/src/import/generic/memory/lib/utils/freq/mss_freq_scoreboard.H
+++ b/src/import/generic/memory/lib/utils/freq/mss_freq_scoreboard.H
@@ -39,6 +39,7 @@
#include <vector>
#include <fapi2.H>
#include <generic/memory/lib/utils/freq/gen_mss_freq_traits.H>
+#include <generic/memory/lib/utils/pos.H>
#include <generic/memory/lib/utils/c_str.H>
#include <generic/memory/lib/utils/find.H>
#include <generic/memory/lib/utils/pos.H>
@@ -132,7 +133,34 @@ class freq_scoreboard
/// @return FAPI2_RC_SUCCESS if successful
///
fapi2::ReturnCode remove_freqs_above_limit(const uint64_t i_port_pos,
- const uint32_t i_freq_limit);
+ const uint32_t i_freq_limit)
+ {
+ FAPI_TRY( check_port_position(i_port_pos,
+ generic_ffdc_codes::FREQ_SCOREBOARD_REMOVE_FREQS_ABOVE_LIMIT),
+ "Invalid port index passed to remove_freqs_above_limit (%d)",
+ i_port_pos);
+
+ {
+ auto& l_port_supported_freqs = iv_supported_port_freqs[i_port_pos];
+
+ // Can't do a ranged for loop here because we need the index to get the frequency out of iv_freq_values
+ for ( size_t l_index = 0; l_index < l_port_supported_freqs.size(); ++l_index )
+ {
+ const auto l_scoreboard_freq = iv_freq_values[l_index];
+
+ if ( l_scoreboard_freq > i_freq_limit )
+ {
+ FAPI_INF("Removing freq %d on port %d since it's above the limit %d", l_scoreboard_freq, i_port_pos, i_freq_limit);
+ l_port_supported_freqs[l_index] = false;
+ }
+ }
+ }
+
+ return fapi2::FAPI2_RC_SUCCESS;
+
+ fapi_try_exit:
+ return fapi2::current_err;
+ }
///
/// @brief Remove frequencies above a limit from the scoreboard
@@ -141,7 +169,30 @@ class freq_scoreboard
/// @return FAPI2_RC_SUCCESS if successful
///
fapi2::ReturnCode remove_freqs_above_limit(const uint64_t i_port_pos,
- const std::vector<uint32_t> i_freq_limits);
+ const std::vector<uint32_t> i_freq_limits)
+ {
+ FAPI_TRY( check_port_position(i_port_pos,
+ generic_ffdc_codes::FREQ_SCOREBOARD_REMOVE_FREQS_ABOVE_LIMIT_VECTOR),
+ "Invalid port index passed to remove_freqs_above_limit (%d)",
+ i_port_pos);
+
+ FAPI_ASSERT(i_freq_limits.size() == iv_num_ports,
+ fapi2::MSS_INVALID_FREQ_LIST_PASSED()
+ .set_SIZE(i_freq_limits.size())
+ .set_EXPECTED(iv_num_ports),
+ "Invalid frequency list passed to remove_freqs_above_limit (size should be %d but got %d)",
+ iv_num_ports, i_freq_limits.size());
+
+ {
+ const auto l_freq_limit = i_freq_limits[i_port_pos];
+ FAPI_TRY( this->remove_freqs_above_limit(i_port_pos, l_freq_limit) );
+ }
+
+ return fapi2::FAPI2_RC_SUCCESS;
+
+ fapi_try_exit:
+ return fapi2::current_err;
+ }
///
/// @brief Remove frequencies not on a given list from the scoreboard
@@ -185,7 +236,25 @@ class freq_scoreboard
/// @return FAPI2_RC_SUCCESS if successful
///
fapi2::ReturnCode max_supported_freq(const uint64_t i_port_pos,
- uint32_t& o_freq) const;
+ uint32_t& o_freq) const
+ {
+ FAPI_TRY( this->check_port_position(i_port_pos,
+ generic_ffdc_codes::FREQ_SCOREBOARD_MAX_SUPPORTED_FREQ),
+ "Invalid port index passed to max_supported_freq (%d)",
+ i_port_pos);
+
+ {
+ std::vector<uint32_t> l_supported_freqs;
+ FAPI_TRY( this->supported_freqs(i_port_pos, l_supported_freqs) );
+
+ o_freq = l_supported_freqs.empty() ? 0 : l_supported_freqs.back();
+ }
+
+ return fapi2::FAPI2_RC_SUCCESS;
+
+ fapi_try_exit:
+ return fapi2::current_err;
+ }
///
/// @brief Return a list of supported frequencies for a given port
@@ -194,7 +263,31 @@ class freq_scoreboard
/// @return FAPI2_RC_SUCCESS if successful
///
fapi2::ReturnCode supported_freqs(const uint64_t i_port_pos,
- std::vector<uint32_t>& o_freqs) const;
+ std::vector<uint32_t>& o_freqs) const
+ {
+ FAPI_TRY( check_port_position(i_port_pos,
+ generic_ffdc_codes::FREQ_SCOREBOARD_SUPPORTED_FREQS),
+ "Invalid port index passed to supported_freqs (%d)",
+ i_port_pos);
+
+ {
+ o_freqs.clear();
+ auto& l_port_supported_freqs = iv_supported_port_freqs[i_port_pos];
+
+ for ( size_t l_index = 0; l_index < iv_freq_values.size(); ++l_index )
+ {
+ if (l_port_supported_freqs[l_index])
+ {
+ o_freqs.push_back(iv_freq_values[l_index]);
+ }
+ }
+ }
+
+ return fapi2::FAPI2_RC_SUCCESS;
+
+ fapi_try_exit:
+ return fapi2::current_err;
+ }
///
/// @brief Resolve frequency scoreboard by deconfiguring any non-conforming ports
diff --git a/src/import/generic/memory/lib/utils/mss_math.H b/src/import/generic/memory/lib/utils/mss_math.H
index fc9a9eb7d..b60cbc2ae 100644
--- a/src/import/generic/memory/lib/utils/mss_math.H
+++ b/src/import/generic/memory/lib/utils/mss_math.H
@@ -31,6 +31,7 @@
#ifndef _MSS_MATH_H_
#define _MSS_MATH_H_
+#include <fapi2.H>
#include <cstdint>
namespace mss
diff --git a/src/import/generic/memory/lib/utils/voltage/gen_mss_volt.H b/src/import/generic/memory/lib/utils/voltage/gen_mss_volt.H
index 1b74f0028..d84c97dbe 100644
--- a/src/import/generic/memory/lib/utils/voltage/gen_mss_volt.H
+++ b/src/import/generic/memory/lib/utils/voltage/gen_mss_volt.H
@@ -37,9 +37,9 @@
#define _GEN_MSS_VOLT_H_
#include <fapi2.H>
-#include <generic/memory/lib/utils/shared/mss_generic_consts.H>
#include <generic/memory/lib/utils/find.H>
#include <generic/memory/lib/utils/c_str.H>
+#include <generic/memory/lib/utils/shared/mss_generic_consts.H>
#include <generic/memory/lib/utils/voltage/gen_mss_voltage_traits.H>
namespace mss
OpenPOWER on IntegriCloud