diff options
| author | Santosh Puranik <santosh.puranik@in.ibm.com> | 2015-12-07 01:15:39 -0600 |
|---|---|---|
| committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2016-02-22 09:40:28 -0600 |
| commit | f6700762b490d9caf3a62f5d078859ca242701b6 (patch) | |
| tree | 75a151d61c80400212360cd10a10e39e4521f046 /src/import/hwpf/fapi2/include | |
| parent | b8f1f5e6418f39186742345c87ac1394a62923fa (diff) | |
| download | talos-hostboot-f6700762b490d9caf3a62f5d078859ca242701b6.tar.gz talos-hostboot-f6700762b490d9caf3a62f5d078859ca242701b6.zip | |
FAPI2 Filtering for Pervasive Targets
-Add support for filtered version of getChildren
allows caller to obtain vector of child chiplets
based on a filter type.
Change-Id: I6ad95a42330829412709817e80c6df2bdba0a66d
RTC:142582
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/22428
Tested-by: Jenkins Server
Reviewed-by: Brian Silver <bsilver@us.ibm.com>
Reviewed-by: Johannes Koesters <koesters@de.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://gfw160.aus.stglabs.ibm.com:8080/gerrit/24517
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/import/hwpf/fapi2/include')
| -rw-r--r-- | src/import/hwpf/fapi2/include/fapi2_target.H | 16 | ||||
| -rw-r--r-- | src/import/hwpf/fapi2/include/target_types.H | 59 |
2 files changed, 73 insertions, 2 deletions
diff --git a/src/import/hwpf/fapi2/include/fapi2_target.H b/src/import/hwpf/fapi2/include/fapi2_target.H index 372757749..0d4bd5715 100644 --- a/src/import/hwpf/fapi2/include/fapi2_target.H +++ b/src/import/hwpf/fapi2/include/fapi2_target.H @@ -33,6 +33,7 @@ namespace fapi2 { + /// /// @brief Class representing a FAPI2 Target /// @tparam K the type (Kind) of target @@ -254,6 +255,19 @@ class Target getChildren(const TargetState i_state = TARGET_STATE_FUNCTIONAL) const; /// + /// @brief Get this target's children, filtered + /// @tparam T The type of the parent + /// @param[in], i_filter The desired chiplet filter + /// @param[in] i_state The desired TargetState of the children + /// @return std::vector<Target<T> > a vector of present/functional + /// children + /// + template< TargetType T> + inline std::vector<Target<T> > + getChildren(const TargetFilter i_filter, + const TargetState i_state = TARGET_STATE_FUNCTIONAL) const; + + /// /// @brief Get the target at the other end of a bus - dimm included /// @tparam T The type of the parent /// @param[in] i_state The desired TargetState of the children @@ -485,8 +499,6 @@ inline constexpr bool is_same(void) { return (K & T) != 0; } - - } #endif diff --git a/src/import/hwpf/fapi2/include/target_types.H b/src/import/hwpf/fapi2/include/target_types.H index 9f22a6913..4c15dee59 100644 --- a/src/import/hwpf/fapi2/include/target_types.H +++ b/src/import/hwpf/fapi2/include/target_types.H @@ -98,6 +98,65 @@ enum TargetType TARGET_TYPE_ABUS_ENDPOINT = TARGET_TYPE_ABUS, }; +/// +/// @brief Enumeration of chiplet filters +/// +enum TargetFilter +{ + TARGET_FILTER_TP = 0x80000000, // Pervasive 1 + TARGET_FILTER_NEST_NORTH = 0x40000000, // Pervasive 2 + TARGET_FILTER_NEST_SOUTH = 0x20000000, // Pervasive 3 + TARGET_FILTER_NEST_EAST = 0x10000000, // Pervasive 4 + TARGET_FILTER_NEST_WEST = 0x08000000, // Pervasive 5 + TARGET_FILTER_XBUS = 0x04000000, // Pervasive 6 + TARGET_FILTER_MC_WEST = 0x02000000, // Pervasive 7 + TARGET_FILTER_MC_EAST = 0x01000000, // Pervasive 8 + TARGET_FILTER_OBUS0 = 0x00800000, // Pervasive 9 + TARGET_FILTER_OBUS1 = 0x00400000, // Pervasive 10 + TARGET_FILTER_OBUS2 = 0x00200000, // Pervasive 11 + TARGET_FILTER_OBUS3 = 0x00100000, // Pervasive 12 + TARGET_FILTER_PCI0 = 0x00080000, // Pervasive 13 + TARGET_FILTER_PCI1 = 0x00040000, // Pervasive 14 + TARGET_FILTER_PCI2 = 0x00020000, // Pervasive 15 + + // Composite filters follow + + // Pervasive 2-5 (eg N0-N3) < req'd + TARGET_FILTER_ALL_NEST = (TARGET_FILTER_NEST_NORTH | + TARGET_FILTER_NEST_SOUTH | TARGET_FILTER_NEST_EAST | + TARGET_FILTER_NEST_WEST), + + // Pervasive 2-4 (eg N0-N2) < req'd + TARGET_FILTER_NEST_SLAVES = + (TARGET_FILTER_NEST_NORTH | TARGET_FILTER_NEST_SOUTH | + TARGET_FILTER_NEST_EAST), + + // Pervasive 5 (eg N32) < req'd + TARGET_FILTER_NEST_MASTER = TARGET_FILTER_NEST_WEST, + + // Pervasive 7-8 (eg MC0-MC1) + TARGET_FILTER_ALL_MC = + (TARGET_FILTER_MC_WEST | TARGET_FILTER_MC_EAST), + + // Pervasive 9-12 (OB0-OB3) + TARGET_FILTER_ALL_OBUS = + (TARGET_FILTER_OBUS0 | TARGET_FILTER_OBUS1 | TARGET_FILTER_OBUS2 | + TARGET_FILTER_OBUS3), + + // Pervasive 13-15 (PCI0-PCI2) + TARGET_FILTER_ALL_PCI = + (TARGET_FILTER_PCI0 | TARGET_FILTER_PCI1 | TARGET_FILTER_PCI2), + + // Sync mode filter = All NEST + All MCS + TARGET_FILTER_SYNC_MODE_NEST = + (TARGET_FILTER_ALL_NEST | TARGET_FILTER_ALL_MC), + + // All IO Targets except NEST + TARGET_FILTER_ALL_IO_EXCEPT_NEST = + (TARGET_FILTER_XBUS | TARGET_FILTER_ALL_PCI | TARGET_FILTER_ALL_OBUS), +}; + + /// @cond constexpr TargetType operator|(TargetType x, TargetType y) { |

