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/include/usr/targeting/common/iterators | |
| 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/include/usr/targeting/common/iterators')
3 files changed, 166 insertions, 22 deletions
diff --git a/src/include/usr/targeting/common/iterators/iterators.H b/src/include/usr/targeting/common/iterators/iterators.H index 5339b33dd..85742c63c 100644 --- a/src/include/usr/targeting/common/iterators/iterators.H +++ b/src/include/usr/targeting/common/iterators/iterators.H @@ -1,25 +1,25 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/include/usr/targeting/common/iterators/iterators.H $ -// -// IBM CONFIDENTIAL -// -// COPYRIGHT International Business Machines Corp. 2012 -// -// 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 other- -// wise divested of its trade secrets, irrespective of what has -// been deposited with the U.S. Copyright Office. -// -// Origin: 30 -// -// IBM_PROLOG_END +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/usr/targeting/common/iterators/iterators.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2012,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 */ #ifndef __TARGETING_COMMON_ITERATORS_H #define __TARGETING_COMMON_ITERATORS_H @@ -31,6 +31,7 @@ */ #include <targeting/common/iterators/targetiterator.H> +#include <targeting/common/iterators/rawtargetiterator.H> #include <targeting/common/iterators/rangefilter.H> // please keep up to date... diff --git a/src/include/usr/targeting/common/iterators/rawtargetiterator.H b/src/include/usr/targeting/common/iterators/rawtargetiterator.H new file mode 100644 index 000000000..f7e9f192e --- /dev/null +++ b/src/include/usr/targeting/common/iterators/rawtargetiterator.H @@ -0,0 +1,140 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/usr/targeting/common/iterators/rawtargetiterator.H $ */ +/* */ +/* 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 */ + +#ifndef __RAW_TARGETING_COMMON_TARGETITERATOR_H +#define __RAW_TARGETING_COMMON_TARGETITERATOR_H + +/** + * @file targeting/common/iterators/rawtargetiterator.H + * + * @brief Interface describing rawiterator/const rawiterator used to iterate + * through all target service targets + */ + +//****************************************************************************** +// Includes +//****************************************************************************** + +// STD +#include <stddef.h> + +// Other Host Boot Components +#include <builtins.h> + +// Targeting Component +#include <targeting/common/iterators/targetiterator.H> + +//****************************************************************************** +// Macros +//****************************************************************************** + +#undef TARG_NAMESPACE +#undef TARG_CLASS +#undef TARG_FUNC + +//****************************************************************************** +// Interface +//****************************************************************************** + +namespace TARGETING +{ + +#define TARG_NAMESPACE "TARGETING::" + +#define TARG_CLASS "_TargetRawIterator<T>::" + +class Target; + +/** + * @brief Class which iterates through targets managed by the target service. + * Provides "Target*" and "const Target*" versions via templates + */ +template<typename T> +class _TargetRawIterator : public _TargetIterator<T> +{ + public: + + /** + * @brief Maps type of iterated element to common alias (Target* or + * const Target*) + */ + typedef T iterator; + typedef T value_type; + + /** + * @brief Create an iterator to a (const/non-const) target handle. + * Defaults to end() + */ + ALWAYS_INLINE + _TargetRawIterator() + : iv_pCurrent(NULL) + { + } + + /** + * @brief Create an iterator to a (const/non-const) target handle + * + * @param[in] i_pTarget Target handle (pointer or const pointer + * depending on flavor) the iterator should reference + */ + ALWAYS_INLINE + explicit _TargetRawIterator(T i_pTarget) + : iv_pCurrent(i_pTarget) + { + } + + /** + * @brief Destroy an iterator to a (const/non-const) target handle + * + * @note Iterator does not own any resources to destroy + */ + ALWAYS_INLINE + ~_TargetRawIterator() + { + } + + + private: + + /** + * @brief Advance the iterator to point to the next item maintained by + * the target service (or end() if end of list) + */ + void advance(); + + T iv_pCurrent; // Pointer to current target +}; + +/** + * @brief Type aliases to simplify user code + */ +typedef _TargetRawIterator<Target*> TargetRawIterator; +typedef _TargetRawIterator<const Target*> ConstTargetRawIterator; + +#undef TARG_CLASS +#undef TARG_NAMESPACE + +} // End namespace TARGETING + +#endif // __RAW_TARGETING_COMMON_TARGETITERATOR_H + diff --git a/src/include/usr/targeting/common/iterators/targetiterator.H b/src/include/usr/targeting/common/iterators/targetiterator.H index 8b3463f70..65e80b8b5 100644 --- a/src/include/usr/targeting/common/iterators/targetiterator.H +++ b/src/include/usr/targeting/common/iterators/targetiterator.H @@ -95,6 +95,9 @@ class _TargetIterator * * @param[in] i_pTarget Target handle (pointer or const pointer * depending on flavor) the iterator should reference + * + * @note User should not assign a hidden system target to the iterator, + * as it does not support hidden targets */ ALWAYS_INLINE inline explicit _TargetIterator(T i_pTarget) |

