diff options
author | Lateef Quraishi <lateef@us.ibm.com> | 2016-07-21 13:27:17 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2016-07-30 19:11:45 -0400 |
commit | 5df2675372b378275cfe7e3b83d3663fed2fd21a (patch) | |
tree | 9a8f33625b8e00542158f825969664f1c63bb458 /src/include | |
parent | dec28fb2f89a231ae8a7e954e3d387fb878a8b27 (diff) | |
download | talos-hostboot-5df2675372b378275cfe7e3b83d3663fed2fd21a.tar.gz talos-hostboot-5df2675372b378275cfe7e3b83d3663fed2fd21a.zip |
Add getChipletNumber to Target Class
Chiplet Ids are as follows:
- EQ 0-5 Ids: 0x10 - 0x15
- EX 0-11 Ids: 0x10, 0x10, 0x11, 0x11, --- (parent's id)
- Cores 0-23 Ids: 0x20 - 0x37
- Pervasive Id: 0x01
- Xbus Id: 0x06
- Mcbist 0-1 Ids: 0x07 - 0x08
- Mcs 0-3 Ids: 0x07, 0x07, 0x08, 0x08 (parent's id)
- Mca 0-3 Ids: 0x07, 0x07, 0x07, 0x07 (parent's id)
- Mca 4-7 Ids: 0x08, 0x08, 0x08, 0x08 (parent's id)
- Obus0 Id: 0x09
- Obus3 Id: 0x0C
Change-Id: I89be032654c191b8930fac07a1b64061e381fe14
RTC: 156120
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/27339
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/usr/fapi2/target.H | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/include/usr/fapi2/target.H b/src/include/usr/fapi2/target.H index 3aa7e9342..623783acc 100644 --- a/src/include/usr/fapi2/target.H +++ b/src/include/usr/fapi2/target.H @@ -1022,6 +1022,26 @@ inline Target<T> getTarget(uint64_t Ordinal) return Target<T>(Ordinal); } +/// +/// @brief Returns the chiplet number associated with the Target +/// @return The chiplet number for the Target. 0 is returned if the +/// Target does not have a chiplet number (for ex, the PROC_CHIP Target) +/// @note For logical targets such as the EX, the chiplet number of +/// their immediate parent chiplet is returned +/// +template< TargetType K, typename V > +inline uint8_t Target< K, V >::getChipletNumber(void) const +{ + const TARGETING::Target * l_pTarget = + static_cast<TARGETING::Target*>(this->get()); + uint8_t l_chiplet_id = 0; + if(!l_pTarget->tryGetAttr<TARGETING::ATTR_CHIPLET_ID>(l_chiplet_id)) + { + FAPI_ERR("ERROR: getChipletNumber: Can not read CHIPLET_ID attribute"); + } + return l_chiplet_id; +} + } // End namespace fapi2 #endif // End __FAPI2_TARGET__ |