diff options
author | Mike Baiocchi <mbaiocch@us.ibm.com> | 2018-03-21 09:27:49 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2018-03-26 13:10:16 -0400 |
commit | fe61cf0701e0208c6fd32e328a90b1061654372c (patch) | |
tree | cfc6cb2d86d69e4c82bd8f797fbfcef7a290faa6 /src/usr/targeting | |
parent | a7decd2eeff585cf534c2aeb1293a1ac02e3f049 (diff) | |
download | talos-hostboot-fe61cf0701e0208c6fd32e328a90b1061654372c.tar.gz talos-hostboot-fe61cf0701e0208c6fd32e328a90b1061654372c.zip |
Setup Node-Level Attributes for Multinode TCE Support
This commit establishes a TCE Table and allocates the necessary
TCEs for each node in a multinode (ie, Fleetwood) system. It then
sets the corresponding node-level TCE attributes such that the FSP
can use these TCEs for PSI Diagnostics and DMAing-via-TCEs the
PAYLOAD and HDAT content.
Change-Id: Ibd06675ea68a9c630987765b51fdd9db631f6425
RTC:187335
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/56129
CI-Ready: Michael Baiocchi <mbaiocch@us.ibm.com>
Reviewed-by: ILYA SMIRNOV <ismirno@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Reviewed-by: Marshall J. Wilks <mjwilks@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/targeting')
-rw-r--r-- | src/usr/targeting/targplatutil.C | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/usr/targeting/targplatutil.C b/src/usr/targeting/targplatutil.C index becdbe40f..3c4369e09 100644 --- a/src/usr/targeting/targplatutil.C +++ b/src/usr/targeting/targplatutil.C @@ -123,6 +123,31 @@ bool isCurrentMasterNode() return (isMaster == 1); } +#ifndef __HOSTBOOT_RUNTIME +Target* getCurrentNodeTarget(void) +{ + // Get node target + TargetHandleList l_nodelist; + getEncResources(l_nodelist, TARGETING::TYPE_NODE, + TARGETING::UTIL_FILTER_FUNCTIONAL); + assert(l_nodelist.size() == 1, "ERROR, only expect one node."); + + Target* pTgt = l_nodelist[0]; + assert(pTgt != nullptr, "getCurrentNodeTarget found nullptr"); + + return pTgt; +} + +uint8_t getCurrentNodePhysId(void) +{ + Target* pNodeTgt = getCurrentNodeTarget(); + EntityPath epath = pNodeTgt->getAttr<TARGETING::ATTR_PHYS_PATH>(); + const TARGETING::EntityPath::PathElement pe = + epath.pathElementOfType(TARGETING::TYPE_NODE); + return pe.instance; +} +#endif + // return the sensor number from the passed in target uint32_t getSensorNumber( const TARGETING::Target* i_pTarget, TARGETING::SENSOR_NAME i_name ) |