From 491ac02e84c7fcc32d28fbf80a0f4c2015589dc3 Mon Sep 17 00:00:00 2001 From: Andre Marin Date: Thu, 18 Jul 2019 07:18:31 -0400 Subject: Split nimbus and cumulus find API away from generic Helps ease porting for p10 by removing chip specific code and targets that doesn't exit in p10 master Change-Id: Iaae2dc44f48d208bcf6b80e9555f7cfec060b390 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/80607 Tested-by: FSP CI Jenkins Tested-by: Jenkins Server Reviewed-by: STEPHEN GLANCY Tested-by: Hostboot CI Tested-by: HWSV CI Reviewed-by: Mark Pizzutillo Dev-Ready: ANDRE A MARIN Reviewed-by: Jennifer A Stofer Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/81133 Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Reviewed-by: Christian R Geddes --- .../procedures/hwp/memory/lib/utils/cumulus_find.H | 102 +++++++++++++++ .../procedures/hwp/memory/lib/utils/mem_size.C | 4 +- .../procedures/hwp/memory/mss_dynamic_vid_utils.C | 4 +- .../hwp/memory/p9c_mss_bulk_pwr_throttles.C | 4 +- .../procedures/hwp/memory/p9c_mss_draminit_mc.C | 4 +- .../hwp/memory/p9c_mss_draminit_training.C | 2 +- .../hwp/memory/p9c_mss_eff_config_thermal.C | 4 +- .../procedures/hwp/memory/p9c_mss_rowRepairFuncs.C | 4 +- .../procedures/hwp/memory/p9c_mss_row_repair.C | 4 +- .../procedures/hwp/memory/p9c_mss_unmask_errors.C | 4 +- .../hwp/memory/p9c_mss_volt_dimm_count.C | 4 +- .../hwp/memory/p9c_mss_volt_vddr_offset.C | 4 +- .../hwp/memory/lib/dimm/ddr4/nvdimm_utils.H | 2 +- .../p9/procedures/hwp/memory/lib/dimm/ddr4/pba.C | 2 +- .../p9/procedures/hwp/memory/lib/dimm/ddr4/pba.H | 2 +- .../p9/procedures/hwp/memory/lib/dimm/ddr4/pda.C | 2 +- .../p9/procedures/hwp/memory/lib/dimm/ddr4/pda.H | 2 +- .../p9/procedures/hwp/memory/lib/dimm/eff_dimm.C | 2 +- .../p9/procedures/hwp/memory/lib/dimm/rcd_load.C | 2 +- .../memory/lib/ecc/nimbus_mbs_error_vector_trap.H | 2 +- .../hwp/memory/lib/eff_config/memory_size.C | 2 +- .../hwp/memory/lib/eff_config/nimbus_mss_voltage.C | 4 +- .../procedures/hwp/memory/lib/eff_config/timing.C | 2 +- .../procedures/hwp/memory/lib/eff_config/timing.H | 2 +- .../chips/p9/procedures/hwp/memory/lib/fir/check.C | 2 +- .../p9/procedures/hwp/memory/lib/fir/unmask.C | 2 +- .../chips/p9/procedures/hwp/memory/lib/freq/sync.C | 2 +- .../chips/p9/procedures/hwp/memory/lib/mc/mc.C | 2 +- .../p9/procedures/hwp/memory/lib/mc/perf_reg.C | 2 +- .../chips/p9/procedures/hwp/memory/lib/mc/xlate.C | 2 +- .../memory/lib/mss_attribute_accessors_manual.H | 4 +- .../p9/procedures/hwp/memory/lib/mss_vpd_decoder.H | 4 +- .../p9/procedures/hwp/memory/lib/phy/adr32s.C | 4 +- .../p9/procedures/hwp/memory/lib/phy/adr32s.H | 4 +- .../p9/procedures/hwp/memory/lib/phy/ddr_phy.C | 2 +- .../chips/p9/procedures/hwp/memory/lib/phy/dp16.H | 2 +- .../hwp/memory/lib/power_thermal/decoder.C | 2 +- .../p9/procedures/hwp/memory/lib/spd/spd_factory.C | 2 +- .../hwp/memory/lib/utils/mss_nimbus_conversions.H | 4 +- .../p9/procedures/hwp/memory/lib/utils/mss_pair.H | 4 +- .../procedures/hwp/memory/lib/utils/nimbus_find.H | 88 +++++++++++++ .../memory/lib/workarounds/adr32s_workarounds.C | 2 +- .../hwp/memory/lib/workarounds/ccs_workarounds.H | 2 +- .../hwp/memory/lib/workarounds/dll_workarounds.C | 4 +- .../lib/workarounds/quad_encode_workarounds.C | 2 +- .../lib/workarounds/quad_encode_workarounds.H | 2 +- src/import/chips/p9/procedures/hwp/memory/mss.H | 2 +- .../hwp/memory/p9_mss_bulk_pwr_throttles.C | 2 +- .../p9/procedures/hwp/memory/p9_mss_draminit_mc.C | 2 +- .../p9/procedures/hwp/memory/p9_mss_eff_config.C | 2 +- .../p9/procedures/hwp/memory/p9_mss_freq_system.C | 4 +- .../p9/procedures/hwp/memory/p9_mss_memdiag.C | 2 +- .../p9/procedures/hwp/memory/p9_mss_scominit.C | 2 +- .../p9/procedures/hwp/memory/p9_mss_thermal_init.C | 2 +- .../hwp/memory/p9_mss_utils_to_throttle.C | 2 +- .../p9/procedures/hwp/nest/p9_throttle_sync.C | 2 +- src/import/generic/memory/lib/utils/find.H | 142 --------------------- 57 files changed, 263 insertions(+), 215 deletions(-) (limited to 'src/import') diff --git a/src/import/chips/centaur/procedures/hwp/memory/lib/utils/cumulus_find.H b/src/import/chips/centaur/procedures/hwp/memory/lib/utils/cumulus_find.H index 20a890dfd..8adf99b3f 100644 --- a/src/import/chips/centaur/procedures/hwp/memory/lib/utils/cumulus_find.H +++ b/src/import/chips/centaur/procedures/hwp/memory/lib/utils/cumulus_find.H @@ -22,3 +22,105 @@ /* permissions and limitations under the License. */ /* */ /* IBM_PROLOG_END_TAG */ + +/// +/// @file cumulus_find.H +/// @brief Templates for finding things +/// +// *HWP HWP Owner: Andre Marin +// *HWP HWP Backup: Stephen Glancy +// *HWP Team: Memory +// *HWP Level: 3 +// *HWP Consumed by: HB:FSP + +#ifndef _MSS_CUMULUS_FIND_H +#define _MSS_CUMULUS_FIND_H + +#include +#include +#include + +namespace mss +{ + +/// +/// @brief find the DMI given an MBA +/// @param[in] i_target the fapi2 target MBA +/// @return a DMI target. +/// +template<> +inline fapi2::Target find_target(const fapi2::Target& i_target) +{ + return i_target.getParent().getParent(); +} + +/// +/// @brief find the PROC given a MEMBUF +/// @param[in] i_target the fapi2 target MEMBUF +/// @return a PROC target. +/// +template<> +inline fapi2::Target find_target(const fapi2::Target& + i_target) +{ + return i_target.getParent().getParent(); +} + +/// +/// @brief find the PROC_CHIP given a MBA +/// @param[in] i_target the fapi2 target MBA +/// @return a DMI target. +/// +template<> +inline fapi2::Target find_target(const fapi2::Target& i_target) +{ + return i_target.getParent() + .getParent() + .getParent(); +} + +/// +/// @brief find all the MBA connected to an DMI +/// @param[in] i_target a fapi2::Target DMI +/// @return a vector of fapi2::TARGET_TYPE_MBA +/// +template<> +inline std::vector< fapi2::Target > +find_targets( const fapi2::Target& i_target, + fapi2::TargetState i_state ) +{ + std::vector< fapi2::Target > l_mbas; + + for (const auto& membuf_chip : i_target.getChildren(i_state)) + { + auto l_these_mbas( membuf_chip.getChildren(i_state) ); + l_mbas.insert(l_mbas.end(), l_these_mbas.begin(), l_these_mbas.end()); + } + + return l_mbas; +} + +/// +/// @brief find all the DIMM connected to a centaur +/// @param[in] i_target a fapi2::Target TARGET_TYPE_MEMBUF_CHIP +/// @return a vector of fapi2::TARGET_TYPE_DIMM +/// +template<> +inline std::vector< fapi2::Target > +find_targets( const fapi2::Target& i_target, + fapi2::TargetState i_state ) +{ + std::vector< fapi2::Target > l_dimms; + + for (const auto& l_mba : i_target.getChildren(i_state)) + { + auto l_these_dimms( l_mba.getChildren(i_state) ); + l_dimms.insert(l_dimms.end(), l_these_dimms.begin(), l_these_dimms.end()); + } + + return l_dimms; +} + +}// mss + +#endif diff --git a/src/import/chips/centaur/procedures/hwp/memory/lib/utils/mem_size.C b/src/import/chips/centaur/procedures/hwp/memory/lib/utils/mem_size.C index 465e31779..507618ea1 100644 --- a/src/import/chips/centaur/procedures/hwp/memory/lib/utils/mem_size.C +++ b/src/import/chips/centaur/procedures/hwp/memory/lib/utils/mem_size.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2017 */ +/* Contributors Listed Below - COPYRIGHT 2017,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include /// diff --git a/src/import/chips/centaur/procedures/hwp/memory/mss_dynamic_vid_utils.C b/src/import/chips/centaur/procedures/hwp/memory/mss_dynamic_vid_utils.C index f8324bb84..7c05e9608 100644 --- a/src/import/chips/centaur/procedures/hwp/memory/mss_dynamic_vid_utils.C +++ b/src/import/chips/centaur/procedures/hwp/memory/mss_dynamic_vid_utils.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2018 */ +/* Contributors Listed Below - COPYRIGHT 2018,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -32,7 +32,7 @@ /// *HWP Consumed by: HB #include -#include +#include #include /// diff --git a/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_bulk_pwr_throttles.C b/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_bulk_pwr_throttles.C index 06c84da79..02f8a2a1d 100644 --- a/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_bulk_pwr_throttles.C +++ b/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_bulk_pwr_throttles.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016,2018 */ +/* Contributors Listed Below - COPYRIGHT 2016,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -67,7 +67,7 @@ #include #include #include -#include +#include #include //------------------------------------------------------------------------------ // Includes diff --git a/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_draminit_mc.C b/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_draminit_mc.C index d01c3ccb6..5f0233b2c 100644 --- a/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_draminit_mc.C +++ b/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_draminit_mc.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016,2018 */ +/* Contributors Listed Below - COPYRIGHT 2016,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -53,7 +53,7 @@ #include #include #include -#include +#include #include //---------------------------------------------------------------------- // Address Includes diff --git a/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_draminit_training.C b/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_draminit_training.C index f45a498fd..461d7c576 100755 --- a/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_draminit_training.C +++ b/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_draminit_training.C @@ -53,7 +53,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_eff_config_thermal.C b/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_eff_config_thermal.C index c613abb9f..c068389c5 100644 --- a/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_eff_config_thermal.C +++ b/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_eff_config_thermal.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016,2018 */ +/* Contributors Listed Below - COPYRIGHT 2016,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -45,7 +45,7 @@ #include #include #include -#include +#include //------------------------------------------------------------------------------ // Includes //------------------------------------------------------------------------------ diff --git a/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_rowRepairFuncs.C b/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_rowRepairFuncs.C index 8362380a7..8323cf8b6 100644 --- a/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_rowRepairFuncs.C +++ b/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_rowRepairFuncs.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2018 */ +/* Contributors Listed Below - COPYRIGHT 2018,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -23,7 +23,7 @@ /* */ /* IBM_PROLOG_END_TAG */ #include -#include +#include #include using namespace fapi2; diff --git a/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_row_repair.C b/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_row_repair.C index 19485c13b..c613eb50c 100644 --- a/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_row_repair.C +++ b/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_row_repair.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2018 */ +/* Contributors Listed Below - COPYRIGHT 2018,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_unmask_errors.C b/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_unmask_errors.C index d51b829be..868ae2234 100755 --- a/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_unmask_errors.C +++ b/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_unmask_errors.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016,2018 */ +/* Contributors Listed Below - COPYRIGHT 2016,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -42,7 +42,7 @@ #include #include #include -#include +#include /// /// @brief Sets action regs and mask settings for pervasive errors to their runtime settings. diff --git a/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_volt_dimm_count.C b/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_volt_dimm_count.C index c24fcf6fb..7617253a6 100644 --- a/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_volt_dimm_count.C +++ b/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_volt_dimm_count.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2018 */ +/* Contributors Listed Below - COPYRIGHT 2018,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -39,7 +39,7 @@ #include #include #include -#include +#include using fapi2::TARGET_TYPE_MBA; using fapi2::TARGET_TYPE_DIMM; diff --git a/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_volt_vddr_offset.C b/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_volt_vddr_offset.C index 2cd518ef0..f4d959eb4 100644 --- a/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_volt_vddr_offset.C +++ b/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_volt_vddr_offset.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2018 */ +/* Contributors Listed Below - COPYRIGHT 2018,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include extern "C" diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/dimm/ddr4/nvdimm_utils.H b/src/import/chips/p9/procedures/hwp/memory/lib/dimm/ddr4/nvdimm_utils.H index ad5fb0fa0..8345cae05 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/dimm/ddr4/nvdimm_utils.H +++ b/src/import/chips/p9/procedures/hwp/memory/lib/dimm/ddr4/nvdimm_utils.H @@ -34,7 +34,7 @@ // *HWP Consumed by: FSP:HB #include -#include +#include #include #include #include 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 0c858af4c..a864ea8d2 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 @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/dimm/ddr4/pba.H b/src/import/chips/p9/procedures/hwp/memory/lib/dimm/ddr4/pba.H index 147b6de02..c2d47fed3 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/dimm/ddr4/pba.H +++ b/src/import/chips/p9/procedures/hwp/memory/lib/dimm/ddr4/pba.H @@ -39,7 +39,7 @@ #include #include -#include +#include #include #include #include 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 e947e13ba..8eb698a62 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 @@ -41,7 +41,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/dimm/ddr4/pda.H b/src/import/chips/p9/procedures/hwp/memory/lib/dimm/ddr4/pda.H index fcad0bf4f..c28dcceac 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/dimm/ddr4/pda.H +++ b/src/import/chips/p9/procedures/hwp/memory/lib/dimm/ddr4/pda.H @@ -42,7 +42,7 @@ #include #include -#include +#include #include #include #include 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 74e3182ee..5074a5b4d 100644 --- 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 @@ -44,7 +44,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/dimm/rcd_load.C b/src/import/chips/p9/procedures/hwp/memory/lib/dimm/rcd_load.C index 9e894b10f..17bba3a88 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/dimm/rcd_load.C +++ b/src/import/chips/p9/procedures/hwp/memory/lib/dimm/rcd_load.C @@ -38,7 +38,7 @@ #include #include #include -#include +#include using fapi2::TARGET_TYPE_MCBIST; using fapi2::TARGET_TYPE_MCA; diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/ecc/nimbus_mbs_error_vector_trap.H b/src/import/chips/p9/procedures/hwp/memory/lib/ecc/nimbus_mbs_error_vector_trap.H index c15672d45..fe6525231 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/ecc/nimbus_mbs_error_vector_trap.H +++ b/src/import/chips/p9/procedures/hwp/memory/lib/ecc/nimbus_mbs_error_vector_trap.H @@ -38,7 +38,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/eff_config/memory_size.C b/src/import/chips/p9/procedures/hwp/memory/lib/eff_config/memory_size.C index 35e1dd62e..61326898d 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/eff_config/memory_size.C +++ b/src/import/chips/p9/procedures/hwp/memory/lib/eff_config/memory_size.C @@ -38,7 +38,7 @@ #include #include #include -#include +#include namespace mss { diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/eff_config/nimbus_mss_voltage.C b/src/import/chips/p9/procedures/hwp/memory/lib/eff_config/nimbus_mss_voltage.C index d895897ca..df3390257 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/eff_config/nimbus_mss_voltage.C +++ b/src/import/chips/p9/procedures/hwp/memory/lib/eff_config/nimbus_mss_voltage.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2018 */ +/* Contributors Listed Below - COPYRIGHT 2018,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -42,7 +42,7 @@ // Generic libraries #include -#include +#include #include #include #include diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/eff_config/timing.C b/src/import/chips/p9/procedures/hwp/memory/lib/eff_config/timing.C index 1f2920c7b..ebf1650ea 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/eff_config/timing.C +++ b/src/import/chips/p9/procedures/hwp/memory/lib/eff_config/timing.C @@ -31,7 +31,7 @@ #include #include -#include +#include #include namespace mss diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/eff_config/timing.H b/src/import/chips/p9/procedures/hwp/memory/lib/eff_config/timing.H index d748400cb..e09fa1a17 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/eff_config/timing.H +++ b/src/import/chips/p9/procedures/hwp/memory/lib/eff_config/timing.H @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/fir/check.C b/src/import/chips/p9/procedures/hwp/memory/lib/fir/check.C index df352f489..224dfc050 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/fir/check.C +++ b/src/import/chips/p9/procedures/hwp/memory/lib/fir/check.C @@ -43,7 +43,7 @@ #include #include #include -#include +#include using fapi2::TARGET_TYPE_MCBIST; using fapi2::TARGET_TYPE_MCA; 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 10a5ef4d3..798ae3b08 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 @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/freq/sync.C b/src/import/chips/p9/procedures/hwp/memory/lib/freq/sync.C index 8c9b1ccc5..277847f73 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/freq/sync.C +++ b/src/import/chips/p9/procedures/hwp/memory/lib/freq/sync.C @@ -46,7 +46,7 @@ // Generic libraries #include -#include +#include #include #include #include diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/mc/mc.C b/src/import/chips/p9/procedures/hwp/memory/lib/mc/mc.C index e745fe736..73575f52d 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/mc/mc.C +++ b/src/import/chips/p9/procedures/hwp/memory/lib/mc/mc.C @@ -38,7 +38,7 @@ #include #include #include -#include +#include using fapi2::TARGET_TYPE_MCA; using fapi2::TARGET_TYPE_MCS; diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/mc/perf_reg.C b/src/import/chips/p9/procedures/hwp/memory/lib/mc/perf_reg.C index c796a3872..84ae50e3c 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/mc/perf_reg.C +++ b/src/import/chips/p9/procedures/hwp/memory/lib/mc/perf_reg.C @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include using fapi2::TARGET_TYPE_MCA; diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/mc/xlate.C b/src/import/chips/p9/procedures/hwp/memory/lib/mc/xlate.C index e57e593fa..cc13cd96c 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/mc/xlate.C +++ b/src/import/chips/p9/procedures/hwp/memory/lib/mc/xlate.C @@ -44,7 +44,7 @@ #include #include #include -#include +#include #include using fapi2::TARGET_TYPE_MCA; diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/mss_attribute_accessors_manual.H b/src/import/chips/p9/procedures/hwp/memory/lib/mss_attribute_accessors_manual.H index 201b1ee39..cf0884182 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/mss_attribute_accessors_manual.H +++ b/src/import/chips/p9/procedures/hwp/memory/lib/mss_attribute_accessors_manual.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016,2018 */ +/* Contributors Listed Below - COPYRIGHT 2016,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -40,7 +40,7 @@ #define MSS_ATTR_ACCESS_MANUAL_H_ #include -#include +#include #include namespace mss diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/mss_vpd_decoder.H b/src/import/chips/p9/procedures/hwp/memory/lib/mss_vpd_decoder.H index d33f69a26..fd6485d83 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/mss_vpd_decoder.H +++ b/src/import/chips/p9/procedures/hwp/memory/lib/mss_vpd_decoder.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016,2017 */ +/* Contributors Listed Below - COPYRIGHT 2016,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include namespace mss diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/phy/adr32s.C b/src/import/chips/p9/procedures/hwp/memory/lib/phy/adr32s.C index f68b7dab9..c12adbab8 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/phy/adr32s.C +++ b/src/import/chips/p9/procedures/hwp/memory/lib/phy/adr32s.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016,2017 */ +/* Contributors Listed Below - COPYRIGHT 2016,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include using fapi2::TARGET_TYPE_MCA; diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/phy/adr32s.H b/src/import/chips/p9/procedures/hwp/memory/lib/phy/adr32s.H index 0de3f350e..ee8e54121 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/phy/adr32s.H +++ b/src/import/chips/p9/procedures/hwp/memory/lib/phy/adr32s.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016,2017 */ +/* Contributors Listed Below - COPYRIGHT 2016,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -42,7 +42,7 @@ #include #include #include -#include +#include namespace mss { diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/phy/ddr_phy.C b/src/import/chips/p9/procedures/hwp/memory/lib/phy/ddr_phy.C index a799a5c16..82769de0f 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/phy/ddr_phy.C +++ b/src/import/chips/p9/procedures/hwp/memory/lib/phy/ddr_phy.C @@ -58,7 +58,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/phy/dp16.H b/src/import/chips/p9/procedures/hwp/memory/lib/phy/dp16.H index 73e011b94..1f9f9714d 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/phy/dp16.H +++ b/src/import/chips/p9/procedures/hwp/memory/lib/phy/dp16.H @@ -42,7 +42,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/power_thermal/decoder.C b/src/import/chips/p9/procedures/hwp/memory/lib/power_thermal/decoder.C index 981432a30..8855a30f7 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/power_thermal/decoder.C +++ b/src/import/chips/p9/procedures/hwp/memory/lib/power_thermal/decoder.C @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/spd/spd_factory.C b/src/import/chips/p9/procedures/hwp/memory/lib/spd/spd_factory.C index dfd090449..2d6aef4c8 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/spd/spd_factory.C +++ b/src/import/chips/p9/procedures/hwp/memory/lib/spd/spd_factory.C @@ -53,7 +53,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/utils/mss_nimbus_conversions.H b/src/import/chips/p9/procedures/hwp/memory/lib/utils/mss_nimbus_conversions.H index 1b7f749fd..9a560f72a 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/utils/mss_nimbus_conversions.H +++ b/src/import/chips/p9/procedures/hwp/memory/lib/utils/mss_nimbus_conversions.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2018 */ +/* Contributors Listed Below - COPYRIGHT 2018,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -36,7 +36,7 @@ #define _MSS_NIMBUS_CONVERSIONS_H_ #include -#include +#include #include namespace mss diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/utils/mss_pair.H b/src/import/chips/p9/procedures/hwp/memory/lib/utils/mss_pair.H index 9b2a7a1af..ddea7c7fd 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/utils/mss_pair.H +++ b/src/import/chips/p9/procedures/hwp/memory/lib/utils/mss_pair.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016,2017 */ +/* Contributors Listed Below - COPYRIGHT 2016,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -38,7 +38,7 @@ #define _MSS_PAIR_CONST_H_ #include -#include +#include #include namespace mss diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/utils/nimbus_find.H b/src/import/chips/p9/procedures/hwp/memory/lib/utils/nimbus_find.H index ec7909b66..b922938d4 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/utils/nimbus_find.H +++ b/src/import/chips/p9/procedures/hwp/memory/lib/utils/nimbus_find.H @@ -22,3 +22,91 @@ /* permissions and limitations under the License. */ /* */ /* IBM_PROLOG_END_TAG */ + +/// +/// @file nimbus_find.H +/// @brief Nimbus templates specialization for finding things +/// +// *HWP HWP Owner: Andre Marin +// *HWP HWP Backup: Stephen Glancy +// *HWP Team: Memory +// *HWP Level: 3 +// *HWP Consumed by: HB:FSP + +#ifndef _MSS_NIMBUS_FIND_H +#define _MSS_NIMBUS_FIND_H + +#include +#include +#include + +namespace mss +{ + +/// +/// @brief find the McBIST given a DIMM +/// @param[in] i_target the fapi2 target DIMM +/// @return a McBIST target. +/// +template<> +inline fapi2::Target find_target(const fapi2::Target& i_target) +{ + return i_target.getParent().getParent(); +} + +/// +/// @brief find all the dimm connected to an MCS +/// @param[in] i_target a fapi2::Target MCS +/// @return a vector of fapi2::TARGET_TYPE_DIMM +/// +template<> +inline std::vector< fapi2::Target > +find_targets( const fapi2::Target& i_target, + fapi2::TargetState i_state ) +{ + std::vector< fapi2::Target > l_dimms; + + for (const auto& p : i_target.getChildren(i_state)) + { + auto l_these_dimms( p.getChildren(i_state) ); + l_dimms.insert(l_dimms.end(), l_these_dimms.begin(), l_these_dimms.end()); + } + + return l_dimms; +} + +/// +/// @brief find all the dimms connected to an MCBIST +/// @param[in] i_target a fapi2::Target MCBIST +/// @return a vector of fapi2::TARGET_TYPE_DIMM +/// +template<> +inline std::vector< fapi2::Target > +find_targets( const fapi2::Target& i_target, + fapi2::TargetState i_state ) +{ + std::vector< fapi2::Target > l_dimms; + + for (const auto& p : i_target.getChildren(i_state)) + { + auto l_these_dimms( p.getChildren(i_state) ); + l_dimms.insert(l_dimms.end(), l_these_dimms.begin(), l_these_dimms.end()); + } + + return l_dimms; +} + +/// +/// @brief find the MCS given a DIMM +/// @param[in] i_target the fapi2 target DIMM +/// @return a MCS target. +/// +template<> +inline fapi2::Target find_target( const fapi2::Target& i_target) +{ + return i_target.getParent().getParent(); +} + +}// 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 cb9e22594..107cca50c 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 @@ -48,7 +48,7 @@ #include #include #include -#include +#include using fapi2::TARGET_TYPE_MCA; using fapi2::TARGET_TYPE_SYSTEM; diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/ccs_workarounds.H b/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/ccs_workarounds.H index 8a4773321..5cb57295b 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/ccs_workarounds.H +++ b/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/ccs_workarounds.H @@ -41,7 +41,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/dll_workarounds.C b/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/dll_workarounds.C index 4e73323f2..584dc36c8 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/dll_workarounds.C +++ b/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/dll_workarounds.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2017 */ +/* Contributors Listed Below - COPYRIGHT 2017,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/quad_encode_workarounds.C b/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/quad_encode_workarounds.C index 9d68afdc0..cf13e917a 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/quad_encode_workarounds.C +++ b/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/quad_encode_workarounds.C @@ -38,7 +38,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/quad_encode_workarounds.H b/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/quad_encode_workarounds.H index 6ed2316c5..1d7ea180f 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/quad_encode_workarounds.H +++ b/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/quad_encode_workarounds.H @@ -41,7 +41,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/import/chips/p9/procedures/hwp/memory/mss.H b/src/import/chips/p9/procedures/hwp/memory/mss.H index 9f291c73c..47200a2eb 100644 --- a/src/import/chips/p9/procedures/hwp/memory/mss.H +++ b/src/import/chips/p9/procedures/hwp/memory/mss.H @@ -58,7 +58,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/import/chips/p9/procedures/hwp/memory/p9_mss_bulk_pwr_throttles.C b/src/import/chips/p9/procedures/hwp/memory/p9_mss_bulk_pwr_throttles.C index a586eda62..e88962861 100644 --- a/src/import/chips/p9/procedures/hwp/memory/p9_mss_bulk_pwr_throttles.C +++ b/src/import/chips/p9/procedures/hwp/memory/p9_mss_bulk_pwr_throttles.C @@ -38,7 +38,7 @@ #include #include -#include +#include #include #include diff --git a/src/import/chips/p9/procedures/hwp/memory/p9_mss_draminit_mc.C b/src/import/chips/p9/procedures/hwp/memory/p9_mss_draminit_mc.C index cf8819ed3..b65c0ac00 100644 --- a/src/import/chips/p9/procedures/hwp/memory/p9_mss_draminit_mc.C +++ b/src/import/chips/p9/procedures/hwp/memory/p9_mss_draminit_mc.C @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/import/chips/p9/procedures/hwp/memory/p9_mss_eff_config.C b/src/import/chips/p9/procedures/hwp/memory/p9_mss_eff_config.C index 1966947b8..9a8217e52 100755 --- a/src/import/chips/p9/procedures/hwp/memory/p9_mss_eff_config.C +++ b/src/import/chips/p9/procedures/hwp/memory/p9_mss_eff_config.C @@ -46,7 +46,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/import/chips/p9/procedures/hwp/memory/p9_mss_freq_system.C b/src/import/chips/p9/procedures/hwp/memory/p9_mss_freq_system.C index cba559c16..7721c724d 100644 --- a/src/import/chips/p9/procedures/hwp/memory/p9_mss_freq_system.C +++ b/src/import/chips/p9/procedures/hwp/memory/p9_mss_freq_system.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016,2018 */ +/* Contributors Listed Below - COPYRIGHT 2016,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -39,7 +39,7 @@ #include #include -#include +#include #include #include 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 27f590c55..80b54d1ff 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 @@ -39,7 +39,7 @@ #include #include -#include +#include #include #include #include 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 1980f2374..9dc8d134c 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 @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/import/chips/p9/procedures/hwp/memory/p9_mss_thermal_init.C b/src/import/chips/p9/procedures/hwp/memory/p9_mss_thermal_init.C index 8167cd63a..45ea4392d 100644 --- a/src/import/chips/p9/procedures/hwp/memory/p9_mss_thermal_init.C +++ b/src/import/chips/p9/procedures/hwp/memory/p9_mss_thermal_init.C @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include using fapi2::TARGET_TYPE_MCS; diff --git a/src/import/chips/p9/procedures/hwp/memory/p9_mss_utils_to_throttle.C b/src/import/chips/p9/procedures/hwp/memory/p9_mss_utils_to_throttle.C index 56e2dbc42..8efba3f4b 100644 --- a/src/import/chips/p9/procedures/hwp/memory/p9_mss_utils_to_throttle.C +++ b/src/import/chips/p9/procedures/hwp/memory/p9_mss_utils_to_throttle.C @@ -46,7 +46,7 @@ // mss lib #include #include -#include +#include #include #include #include diff --git a/src/import/chips/p9/procedures/hwp/nest/p9_throttle_sync.C b/src/import/chips/p9/procedures/hwp/nest/p9_throttle_sync.C index 99b98b778..3ed9cc44c 100644 --- a/src/import/chips/p9/procedures/hwp/nest/p9_throttle_sync.C +++ b/src/import/chips/p9/procedures/hwp/nest/p9_throttle_sync.C @@ -43,7 +43,7 @@ //------------------------------------------------------------------------------ #include #include -#include +#include #include ///---------------------------------------------------------------------------- diff --git a/src/import/generic/memory/lib/utils/find.H b/src/import/generic/memory/lib/utils/find.H index 3e67e765a..f96252913 100644 --- a/src/import/generic/memory/lib/utils/find.H +++ b/src/import/generic/memory/lib/utils/find.H @@ -147,30 +147,6 @@ inline fapi2::Target find_target( const fapi2::Target& i_target) return find_target_impl(i_target, std::integral_constant {}); } -/// -/// @brief find the McBIST given a DIMM -/// @param[in] i_target the fapi2 target DIMM -/// @return a McBIST target. -/// -template<> -inline fapi2::Target find_target(const fapi2::Target& i_target) -{ - return i_target.getParent().getParent(); -} - -/// -/// @brief find the PROC_CHIP given a MBA -/// @param[in] i_target the fapi2 target MBA -/// @return a DMI target. -/// -template<> -inline fapi2::Target find_target(const fapi2::Target& i_target) -{ - return i_target.getParent() - .getParent() - .getParent(); -} - /// /// @brief find the PROC_CHIP given a OCMB_CHIP /// @param[in] i_target the fapi2 target OCMB_CHIP @@ -185,29 +161,6 @@ inline fapi2::Target find_target(const fapi2::Targ .getParent(); } -/// -/// @brief find the DMI given an MBA -/// @param[in] i_target the fapi2 target MBA -/// @return a DMI target. -/// -template<> -inline fapi2::Target find_target(const fapi2::Target& i_target) -{ - return i_target.getParent().getParent(); -} - -/// -/// @brief find the PROC given a MEMBUF -/// @param[in] i_target the fapi2 target MEMBUF -/// @return a PROC target. -/// -template<> -inline fapi2::Target find_target(const fapi2::Target& - i_target) -{ - return i_target.getParent().getParent(); -} - /// /// @brief find all the OCMB_CHIPs connected to a PROC_CHIP /// @param[in] i_target a fapi2::Target PROC_CHIP @@ -304,101 +257,6 @@ find_targets( const fapi2::Target& i_target, return l_ports; } -/// -/// @brief find all the MBA connected to an DMI -/// @param[in] i_target a fapi2::Target DMI -/// @return a vector of fapi2::TARGET_TYPE_MBA -/// -template<> -inline std::vector< fapi2::Target > -find_targets( const fapi2::Target& i_target, - fapi2::TargetState i_state ) -{ - std::vector< fapi2::Target > l_mbas; - - for (const auto& membuf_chip : i_target.getChildren(i_state)) - { - auto l_these_mbas( membuf_chip.getChildren(i_state) ); - l_mbas.insert(l_mbas.end(), l_these_mbas.begin(), l_these_mbas.end()); - } - - return l_mbas; -} - -/// -/// @brief find all the DIMM connected to a centaur -/// @param[in] i_target a fapi2::Target TARGET_TYPE_MEMBUF_CHIP -/// @return a vector of fapi2::TARGET_TYPE_DIMM -/// -template<> -inline std::vector< fapi2::Target > -find_targets( const fapi2::Target& i_target, - fapi2::TargetState i_state ) -{ - std::vector< fapi2::Target > l_dimms; - - for (const auto& l_mba : i_target.getChildren(i_state)) - { - auto l_these_dimms( l_mba.getChildren(i_state) ); - l_dimms.insert(l_dimms.end(), l_these_dimms.begin(), l_these_dimms.end()); - } - - return l_dimms; -} - -/// -/// @brief find all the dimm connected to an MCS -/// @param[in] i_target a fapi2::Target MCS -/// @return a vector of fapi2::TARGET_TYPE_DIMM -/// -template<> -inline std::vector< fapi2::Target > -find_targets( const fapi2::Target& i_target, - fapi2::TargetState i_state ) -{ - std::vector< fapi2::Target > l_dimms; - - for (const auto& p : i_target.getChildren(i_state)) - { - auto l_these_dimms( p.getChildren(i_state) ); - l_dimms.insert(l_dimms.end(), l_these_dimms.begin(), l_these_dimms.end()); - } - - return l_dimms; -} - -/// -/// @brief find all the dimms connected to an MCBIST -/// @param[in] i_target a fapi2::Target MCBIST -/// @return a vector of fapi2::TARGET_TYPE_DIMM -/// -template<> -inline std::vector< fapi2::Target > -find_targets( const fapi2::Target& i_target, - fapi2::TargetState i_state ) -{ - std::vector< fapi2::Target > l_dimms; - - for (const auto& p : i_target.getChildren(i_state)) - { - auto l_these_dimms( p.getChildren(i_state) ); - l_dimms.insert(l_dimms.end(), l_these_dimms.begin(), l_these_dimms.end()); - } - - return l_dimms; -} - -/// -/// @brief find the MCS given a DIMM -/// @param[in] i_target the fapi2 target DIMM -/// @return a MCS target. -/// -template<> -inline fapi2::Target find_target( const fapi2::Target& i_target) -{ - return i_target.getParent().getParent(); -} - /// /// @brief find a key value from a vector of STL pairs /// @tparam T input type -- cgit v1.2.1