summaryrefslogtreecommitdiffstats
path: root/src/occ_gpe0/firdata/scom_trgt.h
diff options
context:
space:
mode:
authorPrachi Gupta <pragupta@us.ibm.com>2017-07-14 08:15:16 -0500
committerWilliam A. Bryan <wilbryan@us.ibm.com>2017-07-21 16:26:20 -0400
commitf301809e56b82fe61260a15f437183976db9ef75 (patch)
treedaf1faba0c01d7e0c6ca818b05dddfcc987047d0 /src/occ_gpe0/firdata/scom_trgt.h
parentfda31eb85acb9aa8dee9741848ad9740f54e2f63 (diff)
downloadtalos-occ-f301809e56b82fe61260a15f437183976db9ef75.tar.gz
talos-occ-f301809e56b82fe61260a15f437183976db9ef75.zip
rt_xstop_analysis: move firdata code from occ_405 to occ_gpe0
Change-Id: Idaafd3bd9d40cfce4afd7b5d3308cd376f443967 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/43242 Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com> Reviewed-by: ILYA SMIRNOV <ismirno@us.ibm.com> Reviewed-by: Brian J. Stegmiller <bjs@us.ibm.com> Reviewed-by: William A. Bryan <wilbryan@us.ibm.com> Tested-by: William A. Bryan <wilbryan@us.ibm.com>
Diffstat (limited to 'src/occ_gpe0/firdata/scom_trgt.h')
-rw-r--r--src/occ_gpe0/firdata/scom_trgt.h89
1 files changed, 89 insertions, 0 deletions
diff --git a/src/occ_gpe0/firdata/scom_trgt.h b/src/occ_gpe0/firdata/scom_trgt.h
new file mode 100644
index 0000000..4ffe8b5
--- /dev/null
+++ b/src/occ_gpe0/firdata/scom_trgt.h
@@ -0,0 +1,89 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/occ/firdata/scom.H $ */
+/* */
+/* OpenPOWER OnChipController Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2015 */
+/* [+] International Business Machines Corp. */
+/* */
+/* */
+/* Licensed under the Apache License, Version 2.0 (the "License"); */
+/* you may not use this file except in compliance with the License. */
+/* You may obtain a copy of the License at */
+/* */
+/* http://www.apache.org/licenses/LICENSE-2.0 */
+/* */
+/* Unless required by applicable law or agreed to in writing, software */
+/* distributed under the License is distributed on an "AS IS" BASIS, */
+/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
+/* implied. See the License for the specific language governing */
+/* permissions and limitations under the License. */
+/* */
+/* IBM_PROLOG_END_TAG */
+
+#ifndef __scom_trgt_h
+#define __scom_trgt_h
+
+#include <firDataConst_common.h>
+#include <native.h>
+
+typedef struct
+{
+ /** See enum TrgtType_t. NOTE: This value is not consistant with Hostboot
+ * target types. */
+ TrgtType_t type;
+
+ /** Absolute position of the connected PROC within the node. This value
+ * should be consistant with the Hostboot target positions. */
+ uint8_t procPos;
+
+ /** Unit position relative to the connected PROC. This value should be
+ * consistant with the Hostboot target positions. */
+ uint8_t procUnitPos;
+
+ /** Indicates this target is, or is connected to, the master processor. */
+ bool isMaster;
+
+ /** This target's FSI base address. */
+ uint32_t fsiBaseAddr;
+
+} SCOM_Trgt_t;
+
+/** @param i_type See enum Type.
+ * @param i_procPos Absolute position within the node of the connected
+ * PROC target.
+ * @param i_procUnitPos Unit position relative to the connected PROC. Will be
+ * explicitly set to 0 for PROC targets.
+ * @param i_fsiBaseAddr For EX and MCS, the FSI base address for the
+ * connected PROC. For MEMB and MBA, the FSI base
+ * address for the connected MEMB.
+ * @param i_isMaster True, if this target is, or is connected to, the
+ * master processor. False, otherwise. Will be explicitly
+ * set to false for MEMB and MBA targets.
+ * @return A SCOM_Trgt_t struct.
+ */
+SCOM_Trgt_t SCOM_Trgt_getTrgt( TrgtType_t i_type, uint8_t i_procPos,
+ uint8_t i_procUnitPos, uint32_t i_fsiBaseAddr,
+ bool i_isMaster );
+
+/** @param i_trgt The SCOM target.
+ * @return This target's absolute position of the parent chip (PROC or
+ * MEMB) within the node.
+ */
+uint8_t SCOM_Trgt_getChipPos( SCOM_Trgt_t i_trgt );
+
+/** @param i_trgt The SCOM target.
+ * @return This target's unit position relative to the parent chip. Only
+ * valid for EX, MCS, and MBA units. Will return 0 for PROC and
+ * MEMB chips.
+ */
+uint8_t SCOM_Trgt_getChipUnitPos( SCOM_Trgt_t i_trgt );
+
+/** @param i_trgt The SCOM target.
+ * @return A target for the containing parent chip (PROC or MEMB).
+ */
+SCOM_Trgt_t SCOM_Trgt_getParentChip( SCOM_Trgt_t i_trgt );
+
+#endif /* __scom_trgt_h */
OpenPOWER on IntegriCloud