diff options
author | Andre Marin <aamarin@us.ibm.com> | 2016-04-19 20:15:17 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2016-05-12 11:10:06 -0400 |
commit | 26753f805150fca2ada15f8527b4433a7a4edaa0 (patch) | |
tree | 9cbec57bd369c16a21f4deee8223ccb203d0663b /src/import/chips/p9/procedures/hwp/memory/lib/utils/conversions.H | |
parent | effcd0c0d34e5e4032324e57a4d6d8d881167e32 (diff) | |
download | talos-hostboot-26753f805150fca2ada15f8527b4433a7a4edaa0.tar.gz talos-hostboot-26753f805150fca2ada15f8527b4433a7a4edaa0.zip |
Fix throttle procedure & MSS attribute clean up
Change-Id: Iccebe2f5bbad9d4fed2de914e0b65dba0b0b4662
Original-Change-Id: I7b545b65aaf9cdfea08ab2c5142898f5c971a74b
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/23486
Tested-by: Jenkins Server
Tested-by: Hostboot CI
Reviewed-by: Louis Stermole <stermole@us.ibm.com>
Reviewed-by: JACOB L. HARVEY <jlharvey@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: Brian R. Silver <bsilver@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/24407
Tested-by: FSP CI Jenkins
Diffstat (limited to 'src/import/chips/p9/procedures/hwp/memory/lib/utils/conversions.H')
-rw-r--r-- | src/import/chips/p9/procedures/hwp/memory/lib/utils/conversions.H | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/utils/conversions.H b/src/import/chips/p9/procedures/hwp/memory/lib/utils/conversions.H index b273deff0..34926062c 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/utils/conversions.H +++ b/src/import/chips/p9/procedures/hwp/memory/lib/utils/conversions.H @@ -30,12 +30,23 @@ #ifndef _MSS_CONVERSIONS_H_ #define _MSS_CONVERSIONS_H_ +#include <vector> #include <fapi2.H> #include <lib/mss_attribute_accessors.H> - #include <lib/shared/mss_const.H> #include <lib/utils/find.H> +/// +/// @brief Dereferences pointer of the vector's underlying data +// and casts it to uint8_t[Y] that FAPI_ATTR_SET is expecting by deduction +/// @param[in] X is the input vector +/// @param[in] Y is the size of the vector +/// +#define UINT8_VECTOR_TO_1D_ARRAY(X, Y)\ + {\ + reinterpret_cast<uint8_t(&)[Y]>(*X.data())\ + } + // Mutiplication factor to go from clocks to simcycles. // Is this just 2400 speed or does this hold for all? BRS static const uint64_t SIM_CYCLES_PER_CYCLE = 8; @@ -268,6 +279,7 @@ inline T ps_to_ns(const T i_time_in_ps) return l_time_in_ns + ( remainder == 0 ? 0 : 1 ); } + };// mss namespace #endif |