diff options
author | Nick Bofferding <bofferdn@us.ibm.com> | 2013-09-06 16:25:14 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2013-10-08 16:37:41 -0500 |
commit | 31a07e2cc87a0a24099b6e8d7ccc5cb3d0729b67 (patch) | |
tree | c0d1847802950d4ff41cdc1bc4eed8933a1f5774 /src/usr/targeting/targplatutil.C | |
parent | 6b7a65cc7ec85b4937c444dd7f3bb8424b9255ab (diff) | |
download | talos-hostboot-31a07e2cc87a0a24099b6e8d7ccc5cb3d0729b67.tar.gz talos-hostboot-31a07e2cc87a0a24099b6e8d7ccc5cb3d0729b67.zip |
Support multinode targeting
- Added support for master processor type attributes
- Made attribute sync multinode aware
- Added platform properties constants
- Added multinode iterator support
- Extended default iterator to skip hidden system targets
- Added raw iterator to "see" hidden system targets
- Updated target service to be multinode aware
- Added new API to query master proc per node
- Modified MRW parser to support cross node peers
- Modified MRW parser to default master proc per node
- Removed cross node peer workarounds in node splitter script
- Added common support for master system targets
- Updated attribute compiler to serialize cross node peer targets
- Updated attribute compiler to generate attribute size map
- Updated attribute compiler to impose special ordering on target layout
- Inhibited XML merge script from merging itself in xmltohb makefile
- Inhibited duplicate weak symbol errors in trace statements
Change-Id: I661eca12f3a7cc16c0ff5476a7ae66cea3bad7d3
RTC: 63940
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/6103
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/targeting/targplatutil.C')
-rw-r--r-- | src/usr/targeting/targplatutil.C | 110 |
1 files changed, 110 insertions, 0 deletions
diff --git a/src/usr/targeting/targplatutil.C b/src/usr/targeting/targplatutil.C new file mode 100644 index 000000000..f913030e2 --- /dev/null +++ b/src/usr/targeting/targplatutil.C @@ -0,0 +1,110 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/targeting/targplatutil.C $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2013 */ +/* */ +/* p1 */ +/* */ +/* Object Code Only (OCO) source materials */ +/* Licensed Internal Code Source Materials */ +/* IBM HostBoot Licensed Internal Code */ +/* */ +/* The source code for this program is not published or otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* Origin: 30 */ +/* */ +/* IBM_PROLOG_END_TAG */ + +/** + * @file targeting/targplatutil.C + * + * @brief Provides implementation for general platform specific utilities + * to support core functions + */ + +//****************************************************************************** +// Includes +//****************************************************************************** + +// STD +#include <stdlib.h> + +// TARG +#include <targeting/targplatutil.H> +#include <targeting/common/predicates/predicates.H> +#include <errl/errlmanager.H> + +namespace TARGETING +{ + +namespace UTIL +{ + +#define TARG_NAMESPACE "TARGETING::UTIL" +#define TARG_CLASS "" + +//****************************************************************************** +// createTracingError +//****************************************************************************** + +void createTracingError( + const uint8_t i_modId, + const uint16_t i_reasonCode, + const uint32_t i_userData1, + const uint32_t i_userData2, + const uint32_t i_userData3, + const uint32_t i_userData4, + errlHndl_t& io_pError) +{ + errlHndl_t pNewError = new ERRORLOG::ErrlEntry( + ERRORLOG::ERRL_SEV_INFORMATIONAL, + i_modId, + i_reasonCode, + static_cast<uint64_t>(i_userData1) << 32 + | (i_userData2 & (0xFFFFFFFF)), + static_cast<uint64_t>(i_userData3) << 32 + | (i_userData4 & (0xFFFFFFFF))); + if(io_pError != NULL) + { + // Tie logs together; existing log primary, new log as secondary + pNewError->plid(io_pError->plid()); + errlCommit(pNewError,TARG_COMP_ID); + } + else + { + io_pError = pNewError; + pNewError = NULL; + } + + return; +} + +void getMasterNodeTarget(Target*& o_masterNodeTarget) +{ + Target* masterNodeTarget = NULL; + PredicateCTM nodeFilter(CLASS_ENC, TYPE_NODE); + TargetRangeFilter localBlueprintNodes( + targetService().begin(), + targetService().end(), + &nodeFilter); + if(localBlueprintNodes) + { + masterNodeTarget = *localBlueprintNodes; + } + + o_masterNodeTarget = masterNodeTarget; +} + +#undef TARG_NAMESPACE +#undef TARG_CLASS + +} // End namespace TARGETING::UTIL + +} // End namespace TARGETING + |