summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorCorey Swenson <cswenson@us.ibm.com>2016-11-08 15:15:57 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2016-11-09 17:58:08 -0500
commit8053357f7fe7c6be1c624e3df04b608d2d4e765d (patch)
tree07bb42489fc4d381a4b79838eac45045f7ede075 /src
parent4241f7c81cf4b8e5776d72df11b606c187ae32c6 (diff)
downloadtalos-hostboot-8053357f7fe7c6be1c624e3df04b608d2d4e765d.tar.gz
talos-hostboot-8053357f7fe7c6be1c624e3df04b608d2d4e765d.zip
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 <mjvance@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@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')
-rw-r--r--src/include/runtime/interface.h23
-rw-r--r--src/include/usr/runtime/rt_targeting.H5
-rw-r--r--src/usr/runtime/customize_attrs_for_payload.C11
3 files changed, 26 insertions, 13 deletions
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 '<procid>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 <targeting/common/util.H>
#include <errl/errludtarget.H>
#include <runtime/customize_attrs_for_payload.H>
+#include <runtime/interface.h>
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;
OpenPOWER on IntegriCloud