diff options
Diffstat (limited to 'src/import/chips/ocmb/explorer')
-rw-r--r-- | src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/dimm/exp_rank.H | 21 | ||||
-rw-r--r-- | src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/shared/exp_defaults.H | 9 |
2 files changed, 22 insertions, 8 deletions
diff --git a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/dimm/exp_rank.H b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/dimm/exp_rank.H index 01f6c0fd1..8ffe98097 100644 --- a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/dimm/exp_rank.H +++ b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/dimm/exp_rank.H @@ -23,17 +23,29 @@ /* */ /* IBM_PROLOG_END_TAG */ - #ifndef _MSS_EXP_RANK_H_ #define _MSS_EXP_RANK_H_ #include <fapi2.H> +#include <generic/memory/lib/utils/mss_rank.H> namespace mss { - namespace rank { + +/// +/// @brief Rank traits for explorer +/// +template <> +class rankTraits<mss::mc_type::EXPLORER> +{ + public: + static constexpr uint8_t MAX_DIMMS_PER_PORT = 2; + static constexpr uint8_t MAX_RANKS_PER_DIMM = 4; + static constexpr uint8_t RANK_INDEX_STEP = 4; +}; + /// /// @brief Return a vector of rank numbers which represent the primary rank pairs for this port or dimm /// @tparam T the target type @@ -51,13 +63,12 @@ inline fapi2::ReturnCode primary_ranks( const fapi2::Target<T>& i_target, std::v /// @brief Return the *port relative position* of the DIMM which posesses this rank /// @param[in] i_rank the rank number. /// @return the relative position of the DIMM which contains this rank. -///TODO: Need to implement this inline size_t get_dimm_from_rank(const uint64_t i_rank) { - return 0; + using TT = rankTraits<mss::mc_type::EXPLORER>; + return i_rank / TT::MAX_RANKS_PER_DIMM; } - } // namespace rank } // namespace mss #endif 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 999e93425..42648c785 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 @@ -25,7 +25,7 @@ /// /// @file exp_defaults.H -/// @brief default types associated with Nimbus system +/// @brief default types associated with Explorer system /// // *HWP HWP Owner: Andre A. Marin <aamarin@us.ibm.com> // *HWP HWP Backup: Louis Stermole <stermole@us.ibm.com> @@ -33,14 +33,17 @@ // *HWP Level: 2 // *HWP Consumed by: CI -#ifndef _MSS_NIMBUS_DEFAULTS_H_ -#define _MSS_NIMBUS_DEFAULTS_H_ +#ifndef _MSS_EXPLORER_DEFAULTS_H_ +#define _MSS_EXPLORER_DEFAULTS_H_ +#include <fapi2.H> #include <generic/memory/lib/utils/shared/mss_generic_consts.H> namespace mss { +constexpr fapi2::TargetType DEFAULT_MEM_PORT_TARGET = fapi2::TARGET_TYPE_MEM_PORT; + constexpr mss::mc_type DEFAULT_MC_TYPE = mss::mc_type::EXPLORER; } // ns mss |