diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/include/usr/targeting/common/pointer.H | 61 | ||||
-rw-r--r-- | src/usr/targeting/common/targetservice.C | 17 |
2 files changed, 51 insertions, 27 deletions
diff --git a/src/include/usr/targeting/common/pointer.H b/src/include/usr/targeting/common/pointer.H index e42c59218..11c11ea28 100644 --- a/src/include/usr/targeting/common/pointer.H +++ b/src/include/usr/targeting/common/pointer.H @@ -1,26 +1,25 @@ -/* IBM_PROLOG_BEGIN_TAG - * This is an automatically generated prolog. - * - * $Source: src/include/usr/targeting/common/pointer.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_TAG - */ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/usr/targeting/common/pointer.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_POINTER_H #define __TARGETING_COMMON_POINTER_H @@ -41,11 +40,25 @@ namespace TARGETING * and FSP */ template<typename T> -union AbstractPointer +union AbstractPointer { uint64_t raw; ///< Raw value of the container /** + * @brief Specialized address format to support encoding address of + * a target/etc. outside a given node. This is used by platforms with + * address translation to traverse associations, and presumes that + * byte 0 of any virtual address is never set. + */ + struct { + uint64_t nodeId : 8; ///< Node ID indexed to 1. Value of 0 + ///< indicates node ID should not be used + ///< for address translation + uint64_t ptr : 56; ///< Address to translate + + } TranslationEncoded; + + /** * @brief Returns the AbstractPointer as a platform specific pointer * * @return Platform specific pointer whose type matches the underlying diff --git a/src/usr/targeting/common/targetservice.C b/src/usr/targeting/common/targetservice.C index 923b46459..fd95ea9ff 100644 --- a/src/usr/targeting/common/targetservice.C +++ b/src/usr/targeting/common/targetservice.C @@ -842,9 +842,20 @@ void TargetService::_getAssociationsViaDfs( if(TARG_ADDR_TRANSLATION_REQUIRED) { - pDestinationTarget = static_cast<Target*>( - TARG_GET_SINGLETON(TARGETING::theAttrRP).translateAddr( - pDestinationTarget, i_pSourceTarget)); + NODE_ID node = (*pDestinationTargetItr).TranslationEncoded.nodeId; + if(!node) + { + pDestinationTarget = static_cast<Target*>( + TARG_GET_SINGLETON(TARGETING::theAttrRP).translateAddr( + pDestinationTarget, i_pSourceTarget)); + } + else + { + // Node IDs indexed from 1, so decrement to compensate + pDestinationTarget = static_cast<Target*>( + TARG_GET_SINGLETON(TARGETING::theAttrRP).translateAddr( + pDestinationTarget, --node)); + } } if( (!i_pPredicate) |