From 8053357f7fe7c6be1c624e3df04b608d2d4e765d Mon Sep 17 00:00:00 2001 From: Corey Swenson Date: Tue, 8 Nov 2016 15:15:57 -0600 Subject: Add chip_id_type comments to the runtime interface file Change-Id: I87c49627a1dca804e3e491a15fa362199b795c6d CQ:SW370892 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/32391 Reviewed-by: Michael J. Vance Tested-by: Jenkins Server Tested-by: FSP CI Jenkins Reviewed-by: Daniel M. Crowell --- src/include/runtime/interface.h | 23 ++++++++++++++++++++--- src/include/usr/runtime/rt_targeting.H | 5 ----- src/usr/runtime/customize_attrs_for_payload.C | 11 ++++++----- 3 files changed, 26 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/include/runtime/interface.h b/src/include/runtime/interface.h index a697c62af..6681e49ca 100644 --- a/src/include/runtime/interface.h +++ b/src/include/runtime/interface.h @@ -107,6 +107,15 @@ enum MemoryError_t #define HBRT_WKUP_FORCE_AWAKE 0 #define HBRT_WKUP_CLEAR_FORCE 1 +/** + * Chip ID types included in the chip_id / proc_id / core_id + * passed to the host in several interfaces + */ +#define HBRT_PROC_TYPE 0x00000000 //!< PROC chip id type +#define HBRT_MEMBUF_TYPE 0x80000000 //!< MEMBUF chip id type +#define HBRT_CORE_TYPE 0x40000000 //!< CORE chip id type +#define HBRT_CHIPID_TYPE_MASK 0xFF000000 //!< TYPE field + /** @typedef hostInterfaces_t * @brief Interfaces provided by the underlying environment (ex. Sapphire). * @@ -178,7 +187,8 @@ typedef struct hostInterfaces /** * @brief Scan communication read - * @param[in] i_chipId from devtree defn + * @param[in] i_chipId processor chip ID + plus ID type, see defines at top * @param[in] i_scomAddr scom address to read * @param[out] o_scomData pointer to 8-byte data buffer * @return 0 on success else return code @@ -189,7 +199,8 @@ typedef struct hostInterfaces /** * @brief Scan communication write - * @param[in] i_chipId from devtree defn + * @param[in] i_chipId processor chip ID + plus ID type, see defines at top * @param[in] i_scomAddr scom address to write * @param[in] i_scomData pointer to 8-byte data buffer * @return 0 on success else return code @@ -228,7 +239,8 @@ typedef struct hostInterfaces /** * @brief Force a core to be awake, or clear the force - * @param[in] i_core Core to wake (based on devtree defn) + * @param[in] i_core Core to wake + plus ID type, see defines at top * @param[in] i_mode HBRT_WKUP_FORCE_AWAKE * HBRT_WKUP_CLEAR_FORCE * @return non-zero return code on error @@ -249,6 +261,7 @@ typedef struct hostInterfaces * @brief Report an OCC error to the host * @param[in] Failing status that identifies the nature of the fail * @param[in] Identifier that specifies the failing part + plus ID type, see defines at top * @platform FSP */ void (*report_failure)( uint64_t i_status, uint64_t i_partId ); @@ -268,6 +281,7 @@ typedef struct hostInterfaces /** * @brief Read Pnor * @param[in] i_proc processor Id + * plus ID type, see defines at top * @param[in] i_partitionName name of the partition to read * @param[in] i_offset offset within the partition * @param[out] o_data pointer to the data read @@ -283,6 +297,7 @@ typedef struct hostInterfaces /** * @brief Write Pnor * @param[in] i_proc processor Id + * plus ID type, see defines at top * @param[in] i_partitionName name of the partition to write * @param[in] i_offset offset withing the partition * @param[in] i_data pointer to the data to write @@ -298,6 +313,7 @@ typedef struct hostInterfaces * @brief Read data from an i2c device * @param[in] i_master chip, engine and port packed into * a single 64-bit argument + * chip includes ID type, see defines at top * --------------------------------------------------- * | chip | reserved | eng | port | * | (32) | (16) | (8) | (8) | @@ -318,6 +334,7 @@ typedef struct hostInterfaces * @brief Write data to an i2c device * @param[in] i_master chip, engine and port packed into * a single 64-bit argument + * chip includes ID type, see defines at top * --------------------------------------------------- * | chip | reserved | eng | port | * | (32) | (16) | (8) | (8) | diff --git a/src/include/usr/runtime/rt_targeting.H b/src/include/usr/runtime/rt_targeting.H index e26ea5fe4..5895c9fad 100644 --- a/src/include/usr/runtime/rt_targeting.H +++ b/src/include/usr/runtime/rt_targeting.H @@ -40,11 +40,6 @@ namespace RT_TARG { MEMBUF_ID_SHIFT = 4, //!< CHIPID for MEMBUF is 'MMMM'b MEMBUF_ID_MASK = 0x0000000F, //!< valid position bits for MEMBUF - - PROC_TYPE = 0x00000000, //!< PROC chip id type - MEMBUF_TYPE = 0x80000000, //!< MEMBUF chip id type - CORE_TYPE = 0x40000000, //!< CORE chip id type - CHIPID_TYPE_MASK = 0xFF000000, //!< TYPE field }; diff --git a/src/usr/runtime/customize_attrs_for_payload.C b/src/usr/runtime/customize_attrs_for_payload.C index e1c0ddba2..792392961 100644 --- a/src/usr/runtime/customize_attrs_for_payload.C +++ b/src/usr/runtime/customize_attrs_for_payload.C @@ -44,6 +44,7 @@ #include #include #include +#include extern trace_desc_t *g_trac_runtime; @@ -202,7 +203,7 @@ errlHndl_t computeNonPhypRtTarget( o_rtTargetId = (o_rtTargetId << RT_TARG::MEMBUF_ID_SHIFT); o_rtTargetId += pos; - o_rtTargetId |= RT_TARG::MEMBUF_TYPE; + o_rtTargetId |= HBRT_MEMBUF_TYPE; } else if(targetingTargetType == TARGETING::TYPE_CORE) { @@ -224,7 +225,7 @@ errlHndl_t computeNonPhypRtTarget( } o_rtTargetId = PIR_t::createCoreId(o_rtTargetId,pos); - o_rtTargetId |= RT_TARG::CORE_TYPE; + o_rtTargetId |= HBRT_CORE_TYPE; } else { @@ -294,13 +295,13 @@ errlHndl_t getRtTypeForTarget( switch(targetingTargetType) { case TARGETING::TYPE_PROC: - rtType = RT_TARG::PROC_TYPE; + rtType = HBRT_PROC_TYPE; break; case TARGETING::TYPE_MEMBUF: - rtType = RT_TARG::MEMBUF_TYPE; + rtType = HBRT_MEMBUF_TYPE; break; case TARGETING::TYPE_CORE: - rtType = RT_TARG::CORE_TYPE; + rtType = HBRT_CORE_TYPE; break; default: found = false; -- cgit v1.2.1