diff options
Diffstat (limited to 'src/import/chips/ocmb/explorer')
13 files changed, 290 insertions, 28 deletions
diff --git a/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_background_scrub.C b/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_background_scrub.C index 45d6c535c..e451cc669 100644 --- a/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_background_scrub.C +++ b/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_background_scrub.C @@ -22,3 +22,37 @@ /* permissions and limitations under the License. */ /* */ /* IBM_PROLOG_END_TAG */ + +/// +/// @file exp_background_scrub.C +/// @brief Begin background scrub +/// +// *HWP HWP Owner: Andre Marin <aamarin@us.ibm.com> +// *HWP HWP Backup: Stephen Glancy <sglancy@us.ibm.com> +// *HWP Team: Memory +// *HWP Level: 2 +// *HWP Consumed by: FSP:HB + +#include <lib/shared/exp_defaults.H> +#include <exp_background_scrub.H> +#include <lib/mcbist/exp_memdiags.H> + +extern "C" +{ + + /// + /// @brief Begin background scrub + /// @param[in] i_target OCMB chip + /// @return FAPI2_RC_SUCCESS iff ok + /// + fapi2::ReturnCode exp_background_scrub(const fapi2::Target<fapi2::TARGET_TYPE_OCMB_CHIP>& i_target) + { + FAPI_INF("Start exp background scrub for %s", mss::c_str(i_target)); + FAPI_TRY(mss::memdiags::mss_background_scrub_helper(i_target)); + + fapi_try_exit: + FAPI_INF("End exp background scrub for %s", mss::c_str(i_target)); + return fapi2::current_err; + } + +} diff --git a/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_background_scrub.H b/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_background_scrub.H index fa218e3ec..2e95cf6f9 100644 --- a/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_background_scrub.H +++ b/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_background_scrub.H @@ -22,3 +22,34 @@ /* permissions and limitations under the License. */ /* */ /* IBM_PROLOG_END_TAG */ + +/// +/// @file exp_background_scrub.H +/// @brief Procedure declaration to begin background scrub +/// +// *HWP HWP Owner: Andre Marin <aamarin@us.ibm.com> +// *HWP HWP Backup: Stephen Glancy <sglancy@us.ibm.com> +// *HWP Team: Memory +// *HWP Level: 2 +// *HWP Consumed by: FSP:HB + +#ifndef __MSS_EXP_BACKGROUND_SCRUB__ +#define __MSS_EXP_BACKGROUND_SCRUB__ + +#include <fapi2.H> + +// Required for Cronus +typedef fapi2::ReturnCode (*exp_background_scrub_FP_t) (const fapi2::Target<fapi2::TARGET_TYPE_OCMB_CHIP>&); + +extern "C" +{ + + /// + /// @brief Begin background scrub + /// @param[in] i_target the controller + /// @return FAPI2_RC_SUCCESS iff ok + /// + fapi2::ReturnCode exp_background_scrub(const fapi2::Target<fapi2::TARGET_TYPE_OCMB_CHIP>& i_target); + +}// extern C +#endif diff --git a/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_background_scrub.mk b/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_background_scrub.mk index b6bdf9998..bf8e5f44a 100644 --- a/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_background_scrub.mk +++ b/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_background_scrub.mk @@ -22,3 +22,10 @@ # permissions and limitations under the License. # # IBM_PROLOG_END_TAG + +# Include the macros and things for MSS EXP procedures +-include 00exp_common.mk + +PROCEDURE=exp_background_scrub +$(eval $(call ADD_EXP_MEMORY_INCDIRS,$(PROCEDURE))) +$(call BUILD_PROCEDURE) diff --git a/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_scrub.C b/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_scrub.C index 6f6ee8caf..45cd07ee0 100644 --- a/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_scrub.C +++ b/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_scrub.C @@ -22,3 +22,37 @@ /* permissions and limitations under the License. */ /* */ /* IBM_PROLOG_END_TAG */ + +/// +/// @file exp_scrub.C +/// @brief Begin background scrub +/// +// *HWP HWP Owner: Andre Marin <aamarin@us.ibm.com> +// *HWP HWP Backup: Stephen Glancy <sglancy@us.ibm.com> +// *HWP Team: Memory +// *HWP Level: 2 +// *HWP Consumed by: FSP:HB + +#include <lib/shared/exp_defaults.H> +#include <exp_scrub.H> +#include <lib/mcbist/exp_memdiags.H> + +extern "C" +{ + + /// + /// @brief Begin background scrub + /// @param[in] i_target OCMB chip + /// @return FAPI2_RC_SUCCESS iff ok + /// + fapi2::ReturnCode exp_scrub(const fapi2::Target<fapi2::TARGET_TYPE_OCMB_CHIP>& i_target) + { + FAPI_INF("Start exp scrub for %s", mss::c_str(i_target)); + FAPI_TRY(mss::memdiags::mss_scrub_helper(i_target)); + + fapi_try_exit: + FAPI_INF("End exp scrub for %s", mss::c_str(i_target)); + return fapi2::current_err; + } + +} diff --git a/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_scrub.H b/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_scrub.H index d3e650254..73affcb60 100644 --- a/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_scrub.H +++ b/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_scrub.H @@ -22,3 +22,34 @@ /* permissions and limitations under the License. */ /* */ /* IBM_PROLOG_END_TAG */ + +/// +/// @file exp_scrub.H +/// @brief Procedure declaration to begin background scrub +/// +// *HWP HWP Owner: Andre Marin <aamarin@us.ibm.com> +// *HWP HWP Backup: Stephen Glancy <sglancy@us.ibm.com> +// *HWP Team: Memory +// *HWP Level: 2 +// *HWP Consumed by: FSP:HB + +#ifndef __MSS_EXP_SCRUB__ +#define __MSS_EXP_SCRUB__ + +#include <fapi2.H> + +// Required for Cronus +typedef fapi2::ReturnCode (*exp_scrub_FP_t) (const fapi2::Target<fapi2::TARGET_TYPE_OCMB_CHIP>&); + +extern "C" +{ + + /// + /// @brief Begin background scrub + /// @param[in] i_target the controller + /// @return FAPI2_RC_SUCCESS iff ok + /// + fapi2::ReturnCode exp_scrub(const fapi2::Target<fapi2::TARGET_TYPE_OCMB_CHIP>& i_target); + +}// extern C +#endif diff --git a/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_scrub.mk b/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_scrub.mk index ef1c8a17d..9067611e3 100644 --- a/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_scrub.mk +++ b/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_scrub.mk @@ -22,3 +22,10 @@ # permissions and limitations under the License. # # IBM_PROLOG_END_TAG + +# Include the macros and things for MSS EXP procedures +-include 00exp_common.mk + +PROCEDURE=exp_scrub +$(eval $(call ADD_EXP_MEMORY_INCDIRS,$(PROCEDURE))) +$(call BUILD_PROCEDURE) diff --git a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/fir/exp_fir.H b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/fir/exp_fir.H index 182dad7e6..905013b66 100644 --- a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/fir/exp_fir.H +++ b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/fir/exp_fir.H @@ -22,3 +22,27 @@ /* permissions and limitations under the License. */ /* */ /* IBM_PROLOG_END_TAG */ +/// +/// @file exp_fir.H +/// @brief Memory subsystem FIR support +/// +// *HWP HWP Owner: Stephen Glancy <sglancy@us.ibm.com> +// *HWP HWP Backup: Andre Marin <aamarin@us.ibm.com> +// *HWP Team: Memory +// *HWP Level: 3 +// *HWP Consumed by: FSP:HB + +#ifndef _MSS_EXP_FIR_H_ +#define _MSS_EXP_FIR_H_ + +#include <fapi2.H> +#include <generic/memory/lib/utils/fir/gen_mss_fir.H> +#include <generic/memory/lib/utils/shared/mss_generic_consts.H> + +namespace mss +{ + +// FIR Register Traits for Explorer will be here sooner or later. + +} +#endif diff --git a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/fir/exp_unmask.C b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/fir/exp_unmask.C index 701a0d87e..2d35dd256 100644 --- a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/fir/exp_unmask.C +++ b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/fir/exp_unmask.C @@ -22,3 +22,98 @@ /* permissions and limitations under the License. */ /* */ /* IBM_PROLOG_END_TAG */ +/// +/// @file unmask.C +/// @brief Subroutines for unmasking and setting up MSS FIR +/// +// *HWP HWP Owner: Stephen Glancy <sglancy@us.ibm.com> +// *HWP HWP Backup: Andre Marin <aamarin@us.ibm.com> +// *HWP Team: Memory +// *HWP Level: 3 +// *HWP Consumed by: FSP:HB + +#include <lib/shared/exp_defaults.H> +#include <fapi2.H> +#include <explorer_scom_addresses.H> +#include <explorer_scom_addresses_fld.H> +#include <generic/memory/lib/utils/scom.H> +#include <lib/fir/exp_fir.H> +#include <generic/memory/lib/utils/fir/gen_mss_unmask.H> + +namespace mss +{ + +namespace unmask +{ + +/// +/// @brief Unmask and setup actions performed after draminit_mc +/// @param[in] i_target the fapi2::Target +/// @return fapi2::ReturnCode FAPI2_RC_SUCCESS iff ok +/// TODO: Need to implement this function +template<> +fapi2::ReturnCode after_draminit_mc<mss::mc_type::EXPLORER>( const fapi2::Target<fapi2::TARGET_TYPE_OCMB_CHIP>& + i_target ) +{ + return fapi2::FAPI2_RC_SUCCESS; +} + +/// +/// @brief Unmask and setup actions performed after draminit_training +/// @param[in] i_target the fapi2::Target +/// @return fapi2::ReturnCode FAPI2_RC_SUCCESS iff ok +/// TODO: Need to implement this function +template<> +fapi2::ReturnCode after_draminit_training<mss::mc_type::EXPLORER>( const fapi2::Target<fapi2::TARGET_TYPE_OCMB_CHIP>& + i_target ) +{ + return fapi2::FAPI2_RC_SUCCESS; +} + +/// +/// @brief Unmask and setup actions performed after mss_scominit +/// @param[in] i_target the fapi2::Target +/// @return fapi2::ReturnCode FAPI2_RC_SUCCESS iff ok +/// TODO: Need to implement this function +template<> +fapi2::ReturnCode after_scominit<mss::mc_type::EXPLORER>( const fapi2::Target<fapi2::TARGET_TYPE_OCMB_CHIP>& i_target ) +{ + return fapi2::FAPI2_RC_SUCCESS; +} + +/// +/// @brief Unmask and setup actions performed after mss_ddr_phy_reset +/// @param[in] i_target the fapi2::Target +/// @return fapi2::ReturnCode FAPI2_RC_SUCCESS iff ok +/// TODO: Need to implement this function +template<> +fapi2::ReturnCode after_phy_reset<mss::mc_type::EXPLORER>( const fapi2::Target<fapi2::TARGET_TYPE_OCMB_CHIP>& i_target ) +{ + return fapi2::FAPI2_RC_SUCCESS; +} + +/// +/// @brief Unmask and setup actions for memdiags related FIR +/// @param[in] i_target the fapi2::Target +/// @return fapi2::ReturnCode FAPI2_RC_SUCCESS iff ok +/// TODO: Need to implement this function +template<> +fapi2::ReturnCode after_memdiags<mss::mc_type::EXPLORER>( const fapi2::Target<fapi2::TARGET_TYPE_OCMB_CHIP>& i_target ) +{ + return fapi2::FAPI2_RC_SUCCESS; +} + +/// +/// @brief Unmask and setup actions for scrub related FIR +/// @param[in] i_target the fapi2::Target +/// @return fapi2::ReturnCode FAPI2_RC_SUCCESS iff ok +/// TODO: Need to implement this function +template<> +fapi2::ReturnCode after_background_scrub<mss::mc_type::EXPLORER>( const fapi2::Target<fapi2::TARGET_TYPE_OCMB_CHIP>& + i_target ) +{ + return fapi2::FAPI2_RC_SUCCESS; +} + +} +} diff --git a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/fir/exp_unmask.H b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/fir/exp_unmask.H deleted file mode 100644 index d147a4096..000000000 --- a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/fir/exp_unmask.H +++ /dev/null @@ -1,24 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/fir/exp_unmask.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* Contributors Listed Below - COPYRIGHT 2019 */ -/* [+] International Business Machines Corp. */ -/* */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); */ -/* you may not use this file except in compliance with the License. */ -/* You may obtain a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ -/* implied. See the License for the specific language governing */ -/* permissions and limitations under the License. */ -/* */ -/* IBM_PROLOG_END_TAG */ diff --git a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/mcbist/exp_mcbist.C b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/mcbist/exp_mcbist.C index a02d4445e..946334c78 100644 --- a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/mcbist/exp_mcbist.C +++ b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/mcbist/exp_mcbist.C @@ -62,7 +62,7 @@ fapi2::ReturnCode freq<mss::mc_type::EXPLORER, fapi2::TARGET_TYPE_OCMB_CHIP>( return attr::get_freq(l_port, o_value); } - // Should never reach here + o_value = 0; return ~fapi2::FAPI2_RC_SUCCESS; } diff --git a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/mcbist/exp_mcbist_traits.H b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/mcbist/exp_mcbist_traits.H index 5fb590f23..4edee3caf 100644 --- a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/mcbist/exp_mcbist_traits.H +++ b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/mcbist/exp_mcbist_traits.H @@ -77,7 +77,7 @@ class mcbistTraits< mss::mc_type::EXPLORER, fapi2::TARGET_TYPE_OCMB_CHIP> // Multi-ports, dimms static constexpr mss::states MULTI_PORTS = mss::states::NO; - static constexpr mss::states MULTI_DIMMS = mss::states::NO; + static constexpr mss::states MULTI_DIMMS = mss::states::YES; // Subtest static constexpr size_t SUBTEST_PER_REG = 4; @@ -85,8 +85,8 @@ class mcbistTraits< mss::mc_type::EXPLORER, fapi2::TARGET_TYPE_OCMB_CHIP> static constexpr size_t BITS_IN_SUBTEST = 16; // 2 Bytes static constexpr size_t LEFT_SHIFT = (sizeof(uint64_t) * 8) - BITS_IN_SUBTEST; - // LARGEST_ADDRESS. port select (bit0~1) and dimm select (bit2) are always 0 so shift 3 more bits. - static constexpr uint64_t LARGEST_ADDRESS = ~0 >> (mss::mcbist::address::MAGIC_PAD + 3); + // LARGEST_ADDRESS. port select (bit0~1) are always 0 so shift 2 more bits. + static constexpr uint64_t LARGEST_ADDRESS = ~0 >> (mss::mcbist::address::MAGIC_PAD + 2); /// MCBIST "memory registers" - config for subtests. static constexpr uint64_t MCBMR0_REG = EXPLR_MCBIST_MCBMR0Q; @@ -134,6 +134,7 @@ class mcbistTraits< mss::mc_type::EXPLORER, fapi2::TARGET_TYPE_OCMB_CHIP> static constexpr uint64_t RANDOM_DATA_SEED0 = EXPLR_MCBIST_MCBRDS0Q; static constexpr uint64_t RANDOM_DATA_SEED1 = EXPLR_MCBIST_MCBRDS1Q; + static constexpr uint64_t MBSTRQ_CFG_PAUSE_ON_MPE = EXPLR_MCBIST_MBSTRQ_CFG_PAUSE_ON_MPE; // MCBIST Compare Masks, used to setup the ECC traps static constexpr uint64_t COMPARE_MASK = EXPLR_RDF_MCBCM; @@ -250,6 +251,8 @@ class mcbistTraits< mss::mc_type::EXPLORER, fapi2::TARGET_TYPE_OCMB_CHIP> UE_COUNT = EXPLR_MCBIST_MBSEC1Q_UE_COUNT, UE_COUNT_LEN = EXPLR_MCBIST_MBSEC1Q_UE_COUNT_LEN, + MBSTRQ_CFG_MAINT_RCE_WITH_CE = EXPLR_MCBIST_MBSTRQ_CFG_MAINT_RCE_WITH_CE, + CFG_AMAP_DIMM_SELECT = EXPLR_MCBIST_MCBAMR0A0Q_CFG_AMAP_DIMM_SELECT, CFG_AMAP_DIMM_SELECT_LEN = EXPLR_MCBIST_MCBAMR0A0Q_CFG_AMAP_DIMM_SELECT_LEN, CFG_AMAP_MRANK0 = EXPLR_MCBIST_MCBAMR0A0Q_CFG_AMAP_MRANK0, @@ -407,6 +410,10 @@ class mcbistTraits< mss::mc_type::EXPLORER, fapi2::TARGET_TYPE_OCMB_CHIP> ERROR_LOG_BEAT_LEN = 2, ERROR_LOG_TYPE = 46, ERROR_LOG_TYPE_LEN = 2, + + //MCBIST FIR mask + MCB_PROGRAM_COMPLETE = EXPLR_MCBIST_MCBISTFIRQ_MCBIST_PROGRAM_COMPLETE, + MCB_WAT_DEBUG_ATTN = EXPLR_MCBIST_MCBISTFIRQ_WAT_DEBUG_ATTN, }; // MCBIST error log related registers diff --git a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/mcbist/exp_memdiags.C b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/mcbist/exp_memdiags.C index 9fd173ca6..ba40143c5 100644 --- a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/mcbist/exp_memdiags.C +++ b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/mcbist/exp_memdiags.C @@ -39,6 +39,7 @@ #include <p9_mc_scom_addresses.H> #include <p9_mc_scom_addresses_fld.H> +#include <lib/dimm/exp_rank.H> #include <lib/mcbist/exp_memdiags.H> #include <lib/mcbist/exp_mcbist.H> #include <generic/memory/lib/utils/count_dimm.H> diff --git a/src/import/chips/ocmb/explorer/procedures/xml/attribute_info/exp_attributes.xml b/src/import/chips/ocmb/explorer/procedures/xml/attribute_info/exp_attributes.xml index c8a72cb0a..06da415d4 100644 --- a/src/import/chips/ocmb/explorer/procedures/xml/attribute_info/exp_attributes.xml +++ b/src/import/chips/ocmb/explorer/procedures/xml/attribute_info/exp_attributes.xml @@ -259,6 +259,21 @@ <mssAccessorName>exp_firmware_emulation_mode</mssAccessorName> </attribute> + <attribute> + <id>ATTR_MSS_EXP_REORDER_QUEUE_SETTING</id> + <targetType>TARGET_TYPE_OCMB_CHIP</targetType> + <description> + Contains the settings for write/read reorder queue + </description> + <default>REORDER</default> + <initToZero></initToZero> + <writeable/> + <enum>REORDER = 0, FIFO = 1</enum> + <valueType>uint8</valueType> + <writeable/> + <mssAccessorName>exp_reorder_queue_setting</mssAccessorName> + </attribute> + <attribute> <id>ATTR_MSS_OCMB_EXP_STRUCT_MMIO_ENDIAN_CTRL</id> <targetType>TARGET_TYPE_SYSTEM</targetType> |