summaryrefslogtreecommitdiffstats
path: root/src/import/hwpf/fapi2
diff options
context:
space:
mode:
authorJoachim Fenkes <fenkes@de.ibm.com>2019-03-19 18:21:51 +0100
committerRAJA DAS <rajadas2@in.ibm.com>2019-04-02 21:55:40 -0500
commit6a7478da76d16cd3bb4f25e43f3261ff0c83542a (patch)
treed39f7069163e75ae93600d86d688cecde303d1b7 /src/import/hwpf/fapi2
parent2d663084a8605ce9cf07b2da89bb15bf433451d8 (diff)
downloadtalos-sbe-6a7478da76d16cd3bb4f25e43f3261ff0c83542a.tar.gz
talos-sbe-6a7478da76d16cd3bb4f25e43f3261ff0c83542a.zip
FAPI2: Add method to Target to query core select vector from CORE targets
Add fapi2::Target::getCoreSelect() which will return the core select bits for a TARGET_TYPE_CORE target or a TARGET_TYPE_CORE|TARGET_TYPE_MULTICAST target. Other target types don't have the notion of a core select value, so attempting to call getCoreSelect() will result in a compile-time error. Change-Id: I427028876b18126493192db53686707c662bafd7 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/74675 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Matt K. Light <mklight@us.ibm.com> Reviewed-by: Gregory S. Still <stillgs@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/75431 Reviewed-by: RAJA DAS <rajadas2@in.ibm.com>
Diffstat (limited to 'src/import/hwpf/fapi2')
-rw-r--r--src/import/hwpf/fapi2/include/fapi2_target.H18
-rw-r--r--src/import/hwpf/fapi2/include/plat/target.H8
2 files changed, 25 insertions, 1 deletions
diff --git a/src/import/hwpf/fapi2/include/fapi2_target.H b/src/import/hwpf/fapi2/include/fapi2_target.H
index 8dd1cc13..e8c7877d 100644
--- a/src/import/hwpf/fapi2/include/fapi2_target.H
+++ b/src/import/hwpf/fapi2/include/fapi2_target.H
@@ -379,6 +379,19 @@ class Target
getChipletNumber(void) const;
///
+ /// @brief Returns the core select vector associated with a Core target
+ /// @return The core select value for the target. For unicast core targets
+ /// the return value will have exactly one bit set. For multicast core
+ /// targets it will have between one and four bits set.
+ ///
+ inline MulticastCoreSelect
+ getCoreSelect(void) const
+ {
+ static_assert(K & TARGET_TYPE_CORE, "getCoreSelect is only applicable to TARGET_TYPE_CORE targets");
+ return _getCoreSelect();
+ }
+
+ ///
/// @brief Copy from a Target<O, MO> to a Target<K, M>
/// @tparam O the target type of the other
/// @tparam MO the multicast type of the other
@@ -410,7 +423,10 @@ class Target
V iv_handle;
/// @brief if iv_handle is a multicast target, update its multicast type to M
- inline void mcUpdateHandle();
+ inline void mcUpdateHandle(void);
+
+ /// @brief Internal implementation of getCoreSelect, filtered for CORE targets
+ inline MulticastCoreSelect _getCoreSelect(void) const;
};
// EX threads map to CORE threads:
diff --git a/src/import/hwpf/fapi2/include/plat/target.H b/src/import/hwpf/fapi2/include/plat/target.H
index 62e57f8d..884b60e5 100644
--- a/src/import/hwpf/fapi2/include/plat/target.H
+++ b/src/import/hwpf/fapi2/include/plat/target.H
@@ -198,6 +198,14 @@ Target<K, M, V>::getChipletNumber(void) const
return 0;
}
+template<TargetType K, MulticastType M, typename V>
+inline MulticastCoreSelect
+Target<K, M, V>::_getCoreSelect(void) const
+{
+ // Platform can return the core select value stored in it's Target handle
+ return MCCORE_0;
+}
+
///
/// @brief Return the string interpretation of this target
/// @tparam T The type of the target
OpenPOWER on IntegriCloud