summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPrachi Gupta <pragupta@us.ibm.com>2015-09-01 11:01:06 -0500
committerMartin Peschke <mpeschke@de.ibm.com>2015-10-01 10:11:10 +0200
commiteb63d22a8c2194a64de1c32b1003add3bcd3ff29 (patch)
tree59e9d68fd1ca5eb439c4c16d7c9d734c28c11400
parent4a8d9bca5cc0f145146c42e44ff4e5c2299cae5c (diff)
downloadtalos-sbe-eb63d22a8c2194a64de1c32b1003add3bcd3ff29.tar.gz
talos-sbe-eb63d22a8c2194a64de1c32b1003add3bcd3ff29.zip
Build Sequencer for one initfile, parse attr ovd, target resolution
Change-Id: I815e70686b066016cf6576c8a644cd27684bd05a Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/19211 Tested-by: Jenkins Server Reviewed-by: STEPHEN M. CPREK <smcprek@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
-rw-r--r--import/hwpf/fapi2/include/fapi2_hw_access.H5
-rw-r--r--import/hwpf/fapi2/include/plat/hw_access.H29
-rw-r--r--import/hwpf/fapi2/include/target_types.H136
3 files changed, 112 insertions, 58 deletions
diff --git a/import/hwpf/fapi2/include/fapi2_hw_access.H b/import/hwpf/fapi2/include/fapi2_hw_access.H
index e0b42c5e..fe310df7 100644
--- a/import/hwpf/fapi2/include/fapi2_hw_access.H
+++ b/import/hwpf/fapi2/include/fapi2_hw_access.H
@@ -363,6 +363,11 @@ template< TargetType K >
inline ReturnCode putSpy(const Target<K>& i_target,
const char* const i_spyId,
const variable_buffer& i_data);
+
+template< TargetType K >
+inline ReturnCode putSpy(const Target<K>& i_target,
+ const char* const i_spyId,
+ const char* i_enum);
#endif
/// @brief Writes spy data into a buffer holding ring data image
diff --git a/import/hwpf/fapi2/include/plat/hw_access.H b/import/hwpf/fapi2/include/plat/hw_access.H
index 56c3f22b..d86dce17 100644
--- a/import/hwpf/fapi2/include/plat/hw_access.H
+++ b/import/hwpf/fapi2/include/plat/hw_access.H
@@ -34,6 +34,10 @@
#include <plat_hw_access.H>
#include <fapi2_hw_access.H>
+//@TODO remove with RTC: 133089
+#ifdef TEMPORARY_FOR_INITFILE
+ #include <SpyInterface.H>
+#endif
namespace fapi2
{
//--------------------------------------------------------------------------
@@ -483,8 +487,33 @@ inline ReturnCode putSpy(const Target<K>& i_target,
const char* const i_spyId,
const variable_buffer& i_data)
{
+//@TODO remove with RTC: 133089
+#ifdef TEMPORARY_FOR_INITFILE
+ uint32_t l_chipId = strtol(getenv("CHIPID"), NULL, 16);
+ uint32_t l_chipEc = strtol(getenv("CHIPEC"), NULL, 16);
+
+ return (SPY::PutSpy(l_chipId, l_chipEc, i_spyId, i_data ));
+#else
static_assert(K == 0, "implement putSpy (string)");
return ~FAPI2_RC_SUCCESS;
+#endif
+}
+
+template< TargetType K >
+inline ReturnCode putSpy(const Target<K>& i_target,
+ const char* const i_spyId,
+ const char* i_enum)
+{
+//@TODO remove with RTC: 133089
+#ifdef TEMPORARY_FOR_INITFILE
+ uint32_t l_chipId = strtol(getenv("CHIPID"), NULL, 16);
+ uint32_t l_chipEc = strtol(getenv("CHIPEC"), NULL, 16);
+
+ return (SPY::PutSpy(l_chipId, l_chipEc, i_spyId, i_enum ));
+#else
+ static_assert(K == 0, "implement putSpy (string)");
+ return ~FAPI2_RC_SUCCESS;
+#endif
}
#endif
/// @brief Writes spy data into a buffer holding ring data image
diff --git a/import/hwpf/fapi2/include/target_types.H b/import/hwpf/fapi2/include/target_types.H
index 7fd959f5..d75d5e45 100644
--- a/import/hwpf/fapi2/include/target_types.H
+++ b/import/hwpf/fapi2/include/target_types.H
@@ -1,3 +1,21 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: hwpf/fapi2/include/target_types.H $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* EKB Project */
+/* */
+/* COPYRIGHT 2015 */
+/* [+] International Business Machines Corp. */
+/* */
+/* */
+/* 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. */
+/* */
+/* IBM_PROLOG_END_TAG */
/**
* @file target_types.H
* @brief definitions for fapi2 target types
@@ -5,77 +23,79 @@
#ifndef __FAPI2_TARGET_TYPES__
#define __FAPI2_TARGET_TYPES__
-
+#include <stdint.h>
/// FAPI namespace
namespace fapi2
{
- ///
- /// @enum fapi::TargetType
- /// @brief Types, kinds, of targets
- /// @note TYPE_NONE is used to represent empty/NULL targets in lists
- /// or tables. TYPE_ALL is used to pass targets to methods which
- /// can act generally on any type of target
- ///
+///
+/// @enum fapi::TargetType
+/// @brief Types, kinds, of targets
+/// @note TYPE_NONE is used to represent empty/NULL targets in lists
+/// or tables. TYPE_ALL is used to pass targets to methods which
+/// can act generally on any type of target
+///
- /// Target Kind
- enum TargetType
- {
- TARGET_TYPE_NONE = 0x00000000, ///< No type
- TARGET_TYPE_SYSTEM = 0x00000001, ///< System type
- TARGET_TYPE_DIMM = 0x00000002, ///< DIMM type
- TARGET_TYPE_PROC_CHIP = 0x00000004, ///< Processor type
- TARGET_TYPE_MEMBUF_CHIP = 0x00000008, ///< Membuf type
- TARGET_TYPE_EX = 0x00000010, ///< EX - 2x Core, L2, L3 - can be deconfigured
- TARGET_TYPE_MBA = 0x00000020, ///< MBA type
- TARGET_TYPE_MCS = 0x00000040, ///< MCS type
- TARGET_TYPE_XBUS = 0x00000080, ///< XBUS type
- TARGET_TYPE_ABUS = 0x00000100, ///< ABUS type
- TARGET_TYPE_L4 = 0x00000200, ///< L4 type
- TARGET_TYPE_CORE = 0x00000400, ///< Core - 4x threads(?) - can be deconfigured
- TARGET_TYPE_EQ = 0x00000800, ///< EQ - 4x core, 2x L2, 2x L3 - can be deconfigured
- TARGET_TYPE_MCA = 0x00001000, ///< MCA type
- TARGET_TYPE_MCBIST = 0x00002000, ///< MCBIST type
- TARGET_TYPE_MI = 0x00004000, ///< MI Memory Interface (Cumulus)
- TARGET_TYPE_CAPP = 0x00008000, ///< CAPP target
- TARGET_TYPE_DMI = 0x00010000, ///< DMI type
- TARGET_TYPE_OBUS = 0x00020000, ///< OBUS type
- TARGET_TYPE_NV = 0x00040000, ///< NV bus type
- TARGET_TYPE_SBE = 0x00080000, ///< SBE type
- TARGET_TYPE_PPE = 0x00100000, ///< PPE type
- TARGET_TYPE_PERV = 0x00200000, ///< Pervasive type
- TARGET_TYPE_PEC = 0x00400000, ///< PEC type
- TARGET_TYPE_PHB = 0x00800000, ///< PHB type
+/// Target Kind
+enum TargetType
+{
+ TARGET_TYPE_NONE = 0x00000000, ///< No type
+ TARGET_TYPE_SYSTEM = 0x00000001, ///< System type
+ TARGET_TYPE_DIMM = 0x00000002, ///< DIMM type
+ TARGET_TYPE_PROC_CHIP = 0x00000004, ///< Processor type
+ TARGET_TYPE_MEMBUF_CHIP = 0x00000008, ///< Membuf type
+ TARGET_TYPE_EX = 0x00000010, ///< EX - 2x Core, L2, L3 - can be deconfigured
+ TARGET_TYPE_MBA = 0x00000020, ///< MBA type
+ TARGET_TYPE_MCS = 0x00000040, ///< MCS type
+ TARGET_TYPE_XBUS = 0x00000080, ///< XBUS type
+ TARGET_TYPE_ABUS = 0x00000100, ///< ABUS type
+ TARGET_TYPE_L4 = 0x00000200, ///< L4 type
+ TARGET_TYPE_CORE = 0x00000400, ///< Core - 4x threads(?) - can be deconfigured
+ TARGET_TYPE_EQ = 0x00000800, ///< EQ - 4x core, 2x L2, 2x L3 - can be deconfigured
+ TARGET_TYPE_MCA = 0x00001000, ///< MCA type
+ TARGET_TYPE_MCBIST = 0x00002000, ///< MCBIST type
+ TARGET_TYPE_MI = 0x00004000, ///< MI Memory Interface (Cumulus)
+ TARGET_TYPE_CAPP = 0x00008000, ///< CAPP target
+ TARGET_TYPE_DMI = 0x00010000, ///< DMI type
+ TARGET_TYPE_OBUS = 0x00020000, ///< OBUS type
+ TARGET_TYPE_NV = 0x00040000, ///< NV bus type
+ TARGET_TYPE_SBE = 0x00080000, ///< SBE type
+ TARGET_TYPE_PPE = 0x00100000, ///< PPE type
+ TARGET_TYPE_PERV = 0x00200000, ///< Pervasive type
+ TARGET_TYPE_PEC = 0x00400000, ///< PEC type
+ TARGET_TYPE_PHB = 0x00800000, ///< PHB type
- TARGET_TYPE_ALL = 0xFFFFFFFF, ///< Any/All types
+ TARGET_TYPE_ALL = 0xFFFFFFFF, ///< Any/All types
- // Mappings to target types found in the error xml files
- TARGET_TYPE_EX_CHIPLET = TARGET_TYPE_EX,
- TARGET_TYPE_MBA_CHIPLET = TARGET_TYPE_MBA,
- TARGET_TYPE_MCS_CHIPLET = TARGET_TYPE_MCS,
- TARGET_TYPE_XBUS_ENDPOINT = TARGET_TYPE_XBUS,
- TARGET_TYPE_ABUS_ENDPOINT = TARGET_TYPE_ABUS,
- };
+ // Mappings to target types found in the error xml files
+ TARGET_TYPE_EX_CHIPLET = TARGET_TYPE_EX,
+ TARGET_TYPE_MBA_CHIPLET = TARGET_TYPE_MBA,
+ TARGET_TYPE_MCS_CHIPLET = TARGET_TYPE_MCS,
+ TARGET_TYPE_XBUS_ENDPOINT = TARGET_TYPE_XBUS,
+ TARGET_TYPE_ABUS_ENDPOINT = TARGET_TYPE_ABUS,
+};
- /// @cond
- constexpr TargetType operator|(TargetType x, TargetType y)
- {
- return static_cast<TargetType>(static_cast<int>(x) |
- static_cast<int>(y));
- }
+/// @cond
+constexpr TargetType operator|(TargetType x, TargetType y)
+{
+ return static_cast<TargetType>(static_cast<int>(x) |
+ static_cast<int>(y));
+}
- template<uint64_t V>
- class bitCount {
+template<uint64_t V>
+class bitCount
+{
public:
// Don't use enums, too hard to compare
- static const uint8_t count = bitCount<(V >> 1)>::count + (V & 1);
- };
+ static const uint8_t count = bitCount < (V >> 1) >::count + (V & 1);
+};
- template<>
- class bitCount<0> {
+template<>
+class bitCount<0>
+{
public:
static const uint8_t count = 0;
- };
- /// @endcond
+};
+/// @endcond
}
OpenPOWER on IntegriCloud