summaryrefslogtreecommitdiffstats
path: root/src/import/generic/memory/lib/data_engine/data_engine_traits_def.H
diff options
context:
space:
mode:
authorAndre Marin <aamarin@us.ibm.com>2019-07-09 15:50:06 -0400
committerDaniel M Crowell <dcrowell@us.ibm.com>2019-07-19 09:07:03 -0500
commit831f9e0d8b3297f38acd3f059b853f5711877530 (patch)
treea9b405fc568edca26ce2239fc15adc442c520794 /src/import/generic/memory/lib/data_engine/data_engine_traits_def.H
parentdd6aa0faadde7069f8bf628b5557b98206730c2c (diff)
downloadtalos-hostboot-831f9e0d8b3297f38acd3f059b853f5711877530.tar.gz
talos-hostboot-831f9e0d8b3297f38acd3f059b853f5711877530.zip
Fix HB error with -Os compile flag due to eff_config
Top level template is NOT unique between the two files when using the -Os compile flag. The linker just picks the wrong file template definition between p9a and p9n. In -O3 everything is left in place, inline so it just works which is why we didn't hit this error before in HB Change-Id: I529f93fc91684ae14a132d96f518a5f66f036d4b Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/80167 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: STEPHEN GLANCY <sglancy@us.ibm.com> Reviewed-by: Louis Stermole <stermole@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Dev-Ready: STEPHEN GLANCY <sglancy@us.ibm.com> Reviewed-by: Jennifer A Stofer <stofer@us.ibm.com> Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/80229 Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/import/generic/memory/lib/data_engine/data_engine_traits_def.H')
-rw-r--r--src/import/generic/memory/lib/data_engine/data_engine_traits_def.H54
1 files changed, 33 insertions, 21 deletions
diff --git a/src/import/generic/memory/lib/data_engine/data_engine_traits_def.H b/src/import/generic/memory/lib/data_engine/data_engine_traits_def.H
index 702e0db9a..14c6bc518 100644
--- a/src/import/generic/memory/lib/data_engine/data_engine_traits_def.H
+++ b/src/import/generic/memory/lib/data_engine/data_engine_traits_def.H
@@ -45,7 +45,7 @@ namespace mss
///
/// @brief enum list of preliminary data fields needed before eff_config
///
-enum pre_data_init_fields
+enum class pre_data_init_fields
{
// Template recursive base case
ATTR_PRE_DATA_ENGINE_CASE = 0,
@@ -60,7 +60,7 @@ enum pre_data_init_fields
DIMM_RANKS_CNFG = 7,
// Dispatcher set to last enum value
- ATTR_PRE_DATA_ENG_DISPATCHER = DIMM_RANKS_CNFG,
+ DISPATCHER = DIMM_RANKS_CNFG,
};
///
@@ -70,7 +70,7 @@ enum pre_data_init_fields
/// (e.g. Nimbus vs Axone)
/// @warning these depend on pre_data_init_fields fields being set
///
-enum generic_metadata_fields
+enum class generic_metadata_fields
{
// Template recursive base case
ATTR_METADATA_BASE_CASE = 0,
@@ -81,13 +81,13 @@ enum generic_metadata_fields
DIMM_POS_METADATA = 3,
// Dispatcher set to last enum value
- ATTR_METADATA_DISPATCHER = DIMM_POS_METADATA,
+ DISPATCHER = DIMM_POS_METADATA,
};
///
/// @brief enum list of SPD based attr fields to set
///
-enum attr_eff_engine_fields
+enum class attr_eff_engine_fields
{
// Template recursive base case
ATTR_EFF_BASE_CASE = 0,
@@ -117,13 +117,13 @@ enum attr_eff_engine_fields
ROW_ADDR_BITS = 22,
// Dispatcher set to last enum value
- ATTR_EFF_DISPATCHER = ROW_ADDR_BITS,
+ DISPATCHER = ROW_ADDR_BITS,
};
///
/// @brief enum list of SI attr fields to set from EFD
///
-enum attr_si_engine_fields
+enum class attr_si_engine_fields
{
// Template recursive base case
ATTR_SI_BASE_CASE = 0,
@@ -149,7 +149,7 @@ enum attr_si_engine_fields
SI_GEARDOWN_MODE = 18,
// Dispatcher set to last enum value
- ATTR_SI_DISPATCHER = SI_GEARDOWN_MODE,
+ DISPATCHER = SI_GEARDOWN_MODE,
};
///
@@ -157,7 +157,7 @@ enum attr_si_engine_fields
/// @note these are attributes that are derived from other
/// attributes or other APIs.
///
-enum attr_engine_derived_fields
+enum class attr_engine_derived_fields
{
// Attributes are set recursively from the bottom up.
// When adding attrs that depend on other attrs
@@ -173,22 +173,22 @@ enum attr_engine_derived_fields
LOGICAL_RANKS = 3,
// Dispatcher set to last enum value
- ATTR_DERIVED_DISPATCHER = LOGICAL_RANKS,
+ DISPATCHER = LOGICAL_RANKS,
};
///
/// @brief Forward declartion of traits for pre_data_engine
/// @class preDataInitTraits
-/// @tparam T proc_type (e.g. Nimbus, Axone, etc.)
+/// @tparam P processor type (e.g. Nimbus, Axone, etc.)
/// @tparam TT pre_data_init_fields (e.g. DIMM_TYPE, MRANK, etc.)
///
-template< proc_type T, pre_data_init_fields TT >
+template< proc_type P, pre_data_init_fields TT >
class preDataInitTraits;
///
/// @brief Traits associated with DIMM positioning
/// @class dimmPosTraits
-/// @tparam MC the MC type
+/// @tparam MC the memory controller type
///
template< mss::mc_type MC >
class dimmPosTraits;
@@ -196,10 +196,11 @@ class dimmPosTraits;
///
/// @brief Forward declartion of traits for attrEngineTraits
/// @class attrEngineTraits
+/// @tparam P processor type (e.g. Nimbus, Axone, etc.)
/// @tparam ET enum type
/// @tparam T enum value
///
-template < typename ET, ET T>
+template < proc_type P, typename ET, ET T = ET::DISPATCHER>
struct attrEngineTraits;
///
@@ -211,14 +212,25 @@ struct attrEngineTraits;
template < typename ET, ET T >
struct setTimingTraits;
+namespace gen
+{
///
-/// @brief Forward declartion of traits for attrEnumTraits
-/// @class attrEnumTraits
-/// @tparam ET enum type
-///
-template < typename ET >
-struct attrEnumTraits;
-
+/// @brief Template recursive algorithm for setting attrs
+/// @class attr_engine
+/// @tparam P processor type (e.g. Nimbus, Axone, etc.)
+/// @tparam ET enum type - conceptually a list of attrs to set
+/// @tparam F enum value - the specific attr value from ET to set
+/// @tparam TT associated traits for attr_engine
+/// @tparam B dispatch tag - defaulted to false
+///
+template < proc_type P,
+ typename ET,
+ ET F = ET::DISPATCHER,
+ typename TT = attrEngineTraits<P, ET, F>,
+ bool B = false>
+struct attr_engine;
+
+}// gen
}// mss
#endif
OpenPOWER on IntegriCloud