diff options
author | Joe McGill <jmcgill@us.ibm.com> | 2016-12-15 00:12:48 -0600 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-01-04 16:34:47 -0500 |
commit | 102eab796fbfb6b72d90bcfc4496088066a78575 (patch) | |
tree | bc050a4fba8b3f403891cabfa5efb78c37a25689 /src/import/chips/p9/procedures/hwp/memory/lib/mc | |
parent | 1265dcb0cdcad11de8849bd9c78334b2d3864b07 (diff) | |
download | talos-hostboot-102eab796fbfb6b72d90bcfc4496088066a78575.tar.gz talos-hostboot-102eab796fbfb6b72d90bcfc4496088066a78575.zip |
Add MSS customization support from CRP0 Lx MVPD
Keyword V0 offsets are the same as V1
Move bad-bits error processing to 1.03
Change-Id: I01e44c83f775b77e4ecc7afd7a5d92db524dfc98
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/34073
Dev-Ready: Joseph J. McGill <jmcgill@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com>
Reviewed-by: Martin Gloff <mgloff@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: Matt K. Light <mklight@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/34135
Reviewed-by: Hostboot Team <hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Diffstat (limited to 'src/import/chips/p9/procedures/hwp/memory/lib/mc')
-rw-r--r-- | src/import/chips/p9/procedures/hwp/memory/lib/mc/port.C | 5 | ||||
-rw-r--r-- | src/import/chips/p9/procedures/hwp/memory/lib/mc/port.H | 31 |
2 files changed, 35 insertions, 1 deletions
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 1ee2353bb..907655022 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 @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016 */ +/* Contributors Listed Below - COPYRIGHT 2016,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -93,11 +93,14 @@ fapi2::ReturnCode enable_periodic_cal( const fapi2::Target<fapi2::TARGET_TYPE_MC FAPI_TRY( mss::eff_memcal_interval(i_target, l_memcal_interval) ); FAPI_TRY( mss::eff_zqcal_interval(i_target, l_zqcal_interval) ); + // TODO RTC: 166433 Leave periodics off (0's) by default for the time being +#ifdef TODO_166433_PERIODICS FAPI_TRY( mss::mrw_periodic_memcal_mode_options(l_per_memcal_mode_options) ); FAPI_INF("mrw_periodic_memcal_mode_options: 0x%02x", l_per_memcal_mode_options); FAPI_TRY( mss::mrw_periodic_zqcal_mode_options(l_per_zqcal_mode_options) ); FAPI_INF("mrw_periodic_zqcal_mode_options: 0x%02x", l_per_memcal_mode_options); +#endif // TODO RTC:155854 We haven't done the work for calculating init cal periods // in effective config yet, and the MC setup below is hard wired for sim diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/mc/port.H b/src/import/chips/p9/procedures/hwp/memory/lib/mc/port.H index c5edddf9f..48a75d431 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/mc/port.H +++ b/src/import/chips/p9/procedures/hwp/memory/lib/mc/port.H @@ -40,6 +40,7 @@ #include <p9_mc_scom_addresses.H> #include <p9_mc_scom_addresses_fld.H> +#include <lib/mss_attribute_accessors.H> #include <lib/shared/mss_const.H> #include <lib/utils/scom.H> @@ -507,5 +508,35 @@ fapi_try_exit: return fapi2::current_err; } +/// +/// @brief Apply mark store bits from module VPD +/// @tparam T, the fapi2 target type of the target +/// @tparam TT, the class traits for the port +/// @param[in] i_target A target representing a port +/// @return FAPI2_RC_SUCCESS if and only if ok +/// +template< fapi2::TargetType T, typename TT = portTraits<T> > +fapi2::ReturnCode apply_mark_store( const fapi2::Target<T>& i_target ) +{ + FAPI_INF("Enable marks from MVPD"); + + uint32_t l_fwms[MARK_STORE_COUNT]; + + FAPI_TRY( mss::mvpd_fwms(i_target, &(l_fwms[0])) ); + + for (size_t l_mark = 0; l_mark < MARK_STORE_COUNT; ++l_mark) + { + if (l_fwms[l_mark] != 0) + { + fapi2::buffer<uint64_t> l_fwms_data; + l_fwms_data.insertFromRight < MCA_FWMS0_MARK, MCA_FWMS0_EXIT_1 - MCA_FWMS0_MARK + 1 > (l_fwms[l_mark]); + FAPI_TRY( mss::putScom(i_target, MCA_FWMS0 + l_mark, l_fwms_data) ); + } + } + +fapi_try_exit: + return fapi2::current_err; +} + } #endif |