diff options
Diffstat (limited to 'src/usr')
-rw-r--r-- | src/usr/isteps/istep07/host_mss_attr_cleanup.C | 113 | ||||
-rw-r--r-- | src/usr/isteps/istep07/makefile | 3 | ||||
-rw-r--r-- | src/usr/isteps/istep10/call_proc_cen_ref_clk_enable.C | 102 | ||||
-rw-r--r-- | src/usr/isteps/istep10/makefile | 3 | ||||
-rw-r--r-- | src/usr/targeting/common/xmltohb/hb_customized_attrs.xml | 4 |
5 files changed, 168 insertions, 57 deletions
diff --git a/src/usr/isteps/istep07/host_mss_attr_cleanup.C b/src/usr/isteps/istep07/host_mss_attr_cleanup.C new file mode 100644 index 000000000..f63fb25f8 --- /dev/null +++ b/src/usr/isteps/istep07/host_mss_attr_cleanup.C @@ -0,0 +1,113 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/isteps/istep07/host_mss_attr_cleanup.C $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2016,2017 */ +/* [+] 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 */ +/** + * @file call_mss_attr_update.C + * Contains the wrapper for istep 7.5 + */ + +/******************************************************************************/ +// Includes +/******************************************************************************/ +#include <stdint.h> +#include <map> +#include <arch/pirformat.H> + +#include <trace/interface.H> +#include <initservice/taskargs.H> +#include <errl/errlentry.H> +#include <errl/errlmanager.H> + +#include <isteps/hwpisteperror.H> + +#include <errl/errludtarget.H> +#include <initservice/isteps_trace.H> +#include <initservice/initserviceif.H> + +#include <hwas/common/hwasCallout.H> //@fixme-RTC:149250-Remove + +// targeting support +#include <targeting/common/commontargeting.H> +#include <targeting/common/utilFilter.H> + +// fapi2 support +#include <fapi2.H> +#include <fapi2/target.H> +#include <fapi2/plat_hwp_invoker.H> + +#include <config.h> + +// HWP +#include <p9c_mss_attr_cleanup.H> + +namespace ISTEP_07 +{ + +using namespace ISTEP; +using namespace ISTEP_ERROR; +using namespace ERRORLOG; +using namespace TARGETING; + +// +// Wrapper function to call mss_attr_update +// +void* host_mss_attr_cleanup( void *io_pArgs ) +{ + IStepError l_StepError; + errlHndl_t l_err = NULL; + + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "host_mss_attr_cleanup entry"); + // errlHndl_t l_err = NULL; + + TargetHandleList l_funcDimmList; + // Get all the functional Dimms + TARGETING::getAllLogicalCards(l_funcDimmList, TYPE_DIMM, true); + + for (const auto & l_Dimm: l_funcDimmList) + { + const fapi2::Target<fapi2::TARGET_TYPE_DIMM> + l_fapi2_dimm_target(l_Dimm); + + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "Running p9c_mss_attr_cleanup HWP on " + "DIMM target HUID %.8X", TARGETING::get_huid(l_Dimm)); + FAPI_INVOKE_HWP(l_err, p9c_mss_attr_cleanup, l_fapi2_dimm_target); + if(l_err) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR 0x%.8X : p9c_mss_attr_cleanup HWP returned " + "error for HUID %.8x", + l_err->reasonCode(), TARGETING::get_huid(l_Dimm)); + l_StepError.addErrorDetails(l_err); + errlCommit( l_err, HWPF_COMP_ID ); + } + } + + + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "host_mss_attr_cleanup exit" ); + + return l_StepError.getErrorHandle(); +} + +}; // end namespace diff --git a/src/usr/isteps/istep07/makefile b/src/usr/isteps/istep07/makefile index c48fe7efe..8fd4c7521 100644 --- a/src/usr/isteps/istep07/makefile +++ b/src/usr/isteps/istep07/makefile @@ -34,6 +34,7 @@ OBJS += call_mss_volt.o OBJS += call_mss_freq.o OBJS += call_mss_eff_config.o OBJS += call_mss_attr_update.o +OBJS += host_mss_attr_cleanup.o #Add all the extra include paths EXTRAINCDIR += ${ROOTPATH}/src/include/usr/fapi2/ @@ -85,6 +86,8 @@ include $(HWP_PATH_2)/p9c_mss_eff_config.mk include $(HWP_PATH_2)/p9c_mss_eff_config_thermal.mk include $(HWP_PATH_2)/p9c_mss_bulk_pwr_throttles.mk include $(HWP_PATH_2)/p9c_mss_eff_mb_interleave.mk +#host_mss_attr_cleanup : MSS ATTR Cleanup +include $(HWP_PATH_2)/p9c_mss_attr_cleanup.mk #mss_attr_update : MSS ATTR Overrides include $(HWP_PATH_1)/p9_mss_attr_update.mk diff --git a/src/usr/isteps/istep10/call_proc_cen_ref_clk_enable.C b/src/usr/isteps/istep10/call_proc_cen_ref_clk_enable.C index 3a1ebc45c..5f17b3173 100644 --- a/src/usr/isteps/istep10/call_proc_cen_ref_clk_enable.C +++ b/src/usr/isteps/istep10/call_proc_cen_ref_clk_enable.C @@ -44,6 +44,7 @@ #include <sys/time.h> #include <devicefw/userif.H> #include <i2c/i2cif.H> +#include <p9_cen_ref_clk_enable.H> // targeting support #include <targeting/common/commontargeting.H> @@ -51,6 +52,9 @@ #include <targeting/namedtarget.H> #include <targeting/attrsync.H> +// fapi support +#include <fapi2.H> +#include <plat_hwp_invoker.H> #include <isteps/hwpisteperror.H> #include <errl/errludtarget.H> @@ -80,7 +84,7 @@ void* call_proc_cen_ref_clk_enable(void *io_pArgs ) IStepError l_stepError; - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_proc_cen_ref_clock_enable enter" ); TARGETING::TargetHandleList functionalProcChipList; @@ -88,7 +92,7 @@ void* call_proc_cen_ref_clk_enable(void *io_pArgs ) getAllChips(functionalProcChipList, TYPE_PROC, true); // loop thru the list of processors - for (TargetHandleList::const_iterator + for (TARGETING::TargetHandleList::const_iterator l_proc_iter = functionalProcChipList.begin(); l_proc_iter != functionalProcChipList.end(); ++l_proc_iter) @@ -97,11 +101,6 @@ void* call_proc_cen_ref_clk_enable(void *io_pArgs ) "target HUID %.8X", TARGETING::get_huid( *l_proc_iter )); - uint8_t l_membufsAttached = 0; - // get a bit mask of present/functional dimms assocated with - // this processor - l_membufsAttached = getMembufsAttachedBitMask( *l_proc_iter ); - //Perform a workaround for GA1 to raise fences on centaurs //to prevent FSP from analyzing if HB TIs for recoverable //errors @@ -109,46 +108,39 @@ void* call_proc_cen_ref_clk_enable(void *io_pArgs ) fenceAttachedMembufs( *l_proc_iter ); TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, - "passing target HUID %.8X and 0x%x mask", - TARGETING::get_huid( *l_proc_iter ), l_membufsAttached ); + "passing target HUID %.8X ", + TARGETING::get_huid( *l_proc_iter ) ); + + // Cumulus only + fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP> l_fapiProcTarget( *l_proc_iter ); - if( l_membufsAttached ) + // Invoke the HWP passing in the proc target and + // a bit mask indicating connected centaurs + // Cumulus only + FAPI_INVOKE_HWP(l_errl, + p9_cen_ref_clk_enable, + l_fapiProcTarget); + + if (l_errl) { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR : proc_cen_ref_clk_enable", + "failed, returning errorlog" ); - // Cumulus only - // @TODO RTC:144076 - //fapi::Target l_fapiProcTarget( fapi::TARGET_TYPE_PROC_CHIP, - // *l_proc_iter ); - - // Invoke the HWP passing in the proc target and - // a bit mask indicating connected centaurs - // Cumulus only - //@TODO RTC:144076 - //FAPI_INVOKE_HWP(l_errl, - // p9_proc_cen_ref_clk_enable, - // l_fapiProcTarget, l_membufsAttached ); - - if (l_errl) - { - TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, - "ERROR : proc_cen_ref_clk_enable", - "failed, returning errorlog" ); - - // capture the target data in the elog - ErrlUserDetailsTarget( *l_proc_iter ).addToLog( l_errl ); - - // Create IStep error log and cross ref error that occurred - l_stepError.addErrorDetails( l_errl ); - - // Commit error log - errlCommit( l_errl, HWPF_COMP_ID ); - } - else - { - TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, - "SUCCESS : proc_cen_ref_clk_enable", - "completed ok"); - } + // capture the target data in the elog + ErrlUserDetailsTarget( *l_proc_iter ).addToLog( l_errl ); + + // Create IStep error log and cross ref error that occurred + l_stepError.addErrorDetails( l_errl ); + + // Commit error log + errlCommit( l_errl, HWPF_COMP_ID ); + } + else + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : proc_cen_ref_clk_enable", + "completed ok"); } } // endfor @@ -164,7 +156,7 @@ void* call_proc_cen_ref_clk_enable(void *io_pArgs ) //****************************************************************************** uint8_t getMembufsAttachedBitMask( TARGETING::Target * i_procTarget ) { - const uint8_t MCS_WITH_ATTACHED_CENTAUR_MASK = 0x80; + const uint8_t DMI_WITH_ATTACHED_CENTAUR_MASK = 0x80; TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "Finding functional membuf chips downstream from " @@ -189,35 +181,35 @@ uint8_t getMembufsAttachedBitMask( TARGETING::Target * i_procTarget ) pTargetItr != functionalMembufChipList.end(); pTargetItr++) { - // Find each functional membuf chip's upstream functional MCS + // Find each functional membuf chip's upstream functional DMI // unit, if any, and accumulate it into the attached membuf // chips mask - TARGETING::TargetHandleList functionalMcsUnitList; + TARGETING::TargetHandleList functionalDmiUnitList; - getParentAffinityTargets( functionalMcsUnitList, *pTargetItr, - TARGETING::CLASS_UNIT, TARGETING::TYPE_MCS, + getParentAffinityTargets( functionalDmiUnitList, *pTargetItr, + TARGETING::CLASS_UNIT, TARGETING::TYPE_DMI, true ); - if(functionalMcsUnitList.empty()) + if(functionalDmiUnitList.empty()) { TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "Functional membuf chip with HUID of 0x%08X " - "is not attached to an upstream functional MCS", + "is not attached to an upstream functional DMI", (*pTargetItr)->getAttr< TARGETING::ATTR_HUID>()); continue; } TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, - "Found functional MCS unit with HUID of 0x%08X " + "Found functional DMI unit with HUID of 0x%08X " "upstream from functional membuf chip with HUID of 0x%08X", - ((*functionalMcsUnitList.begin())->getAttr< + ((*functionalDmiUnitList.begin())->getAttr< TARGETING::ATTR_CHIP_UNIT>()), (*pTargetItr)->getAttr< TARGETING::ATTR_HUID>()); l_attachedMembufs |= - ((MCS_WITH_ATTACHED_CENTAUR_MASK) >> - ((*functionalMcsUnitList.begin())->getAttr< + ((DMI_WITH_ATTACHED_CENTAUR_MASK) >> + ((*functionalDmiUnitList.begin())->getAttr< TARGETING::ATTR_CHIP_UNIT>())); } diff --git a/src/usr/isteps/istep10/makefile b/src/usr/isteps/istep10/makefile index cf19d8929..cb5b85efa 100644 --- a/src/usr/isteps/istep10/makefile +++ b/src/usr/isteps/istep10/makefile @@ -116,6 +116,9 @@ include ${PROCEDURES_PATH}/hwp/nest/p9_rng_init_phase1.mk include ${PROCEDURES_PATH}/hwp/pm/p9_setup_evid.mk include ${PROCEDURES_PATH}/hwp/lib/p9_avsbus_lib.mk +#p9_cen_ref_clk_enable : Centaur Ref Clock Enable +include $(PERV_HWP_PATH)/p9_cen_ref_clk_enable.mk + # p9_avsbus_lib.mk sets MODULE, reset here to istep10 MODULE = istep10 diff --git a/src/usr/targeting/common/xmltohb/hb_customized_attrs.xml b/src/usr/targeting/common/xmltohb/hb_customized_attrs.xml index ae388e78a..5c5cc73eb 100644 --- a/src/usr/targeting/common/xmltohb/hb_customized_attrs.xml +++ b/src/usr/targeting/common/xmltohb/hb_customized_attrs.xml @@ -156,7 +156,7 @@ <attribute> <id>ATTR_DMI_REFCLOCK_SWIZZLE</id> - <default>0</default> + <default>0xD</default> </attribute> <attribute> @@ -596,4 +596,4 @@ <!-- ===================================================================== End of customizations definitions ================================================================= --> -</attributes>
\ No newline at end of file +</attributes> |