summaryrefslogtreecommitdiffstats
path: root/src/include/usr/htmgt
diff options
context:
space:
mode:
authorChris Cain <cjcain@us.ibm.com>2014-09-29 11:18:13 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-11-18 09:59:50 -0600
commit58fb1308bfdf6cd8546cf3187a8d9f7831ade552 (patch)
tree1e4d86a8d82a093c7fe431858e6fa483e5c229dc /src/include/usr/htmgt
parent36282dfad11d98c0d71ff8c0714b4fdf975c1163 (diff)
downloadtalos-hostboot-58fb1308bfdf6cd8546cf3187a8d9f7831ade552.tar.gz
talos-hostboot-58fb1308bfdf6cd8546cf3187a8d9f7831ade552.zip
HTMGT Base Communication
Change-Id: Ie1d9401128d6cfe21a6be1be1760c3ddb0059148 RTC: 115442 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/13863 Tested-by: Jenkins Server Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/usr/htmgt')
-rwxr-xr-xsrc/include/usr/htmgt/htmgt.H88
-rw-r--r--src/include/usr/htmgt/htmgt_reasoncodes.H74
2 files changed, 162 insertions, 0 deletions
diff --git a/src/include/usr/htmgt/htmgt.H b/src/include/usr/htmgt/htmgt.H
new file mode 100755
index 000000000..9ae8d78e4
--- /dev/null
+++ b/src/include/usr/htmgt/htmgt.H
@@ -0,0 +1,88 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/usr/htmgt/htmgt.H $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2014 */
+/* [+] 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 HTMGT_H
+#define HTMGT_H
+
+
+#include <targeting/common/commontargeting.H>
+
+
+namespace HTMGT
+{
+
+ /**
+ * @brief Move the OCCs into active state or on a failure leave the system
+ * in safe mode.
+ *
+ * @details After all of the OCCs are loaded and started, HB/HBRT will
+ * call this interface to notify HTMGT of the operation status.
+ * Normally called by HB during the IPL, but can also happen
+ * at runtime, when the OCCs get reset/reloaded.
+ * On success status, the OCCs will be moved to active state.
+ * If the load/start failed, or the OCCs do not go active,
+ * an unrecoverable error will be committed and the system
+ * will remain in safe mode.
+ *
+ * @param[in] i_startCompleted true is OCC load and start was successful
+ * @param[in] i_failedOccTarget OCC target of the failed OCC (only used
+ * if i_startCompleted was set to false)
+ */
+ void processOccStartStatus(const bool i_startCompleted,
+ TARGETING::Target * i_failedOccTarget = NULL);
+
+
+
+ /**
+ * @brief Notify HTMGT that an OCC has an error to report
+ *
+ * @details When an OCC has encountered an error that it wants to
+ * be reported, this interface will be called to trigger
+ * HTMGT to collect and commit the error.
+ *
+ * @param[in] i_occTarget OCC target reporting the error
+ */
+ void processOccError(TARGETING::Target * i_occTarget);
+
+
+
+ /**
+ * @brief Notify HTMGT that an OCC has failed and needs to be reset
+ *
+ * @details When BMC detects an OCC failure that requires a reset,
+ * this interface will be called to trigger the OCC reset.
+ * HTMGT maintains a reset count and if there are additional
+ * resets available, the OCCs get reset/reloaded.
+ * If the recovery attempts have been exhauseted or the OCC
+ * fails to go active, an unrecoverable error will be logged
+ * and the system will remain in safe mode.
+ *
+ * @param[in] i_failedOccTarget OCC target of the failed OCC
+ */
+ void processOccReset(TARGETING::Target * i_failedOccTarget);
+
+}
+
+#endif // HTMGT_H
diff --git a/src/include/usr/htmgt/htmgt_reasoncodes.H b/src/include/usr/htmgt/htmgt_reasoncodes.H
new file mode 100644
index 000000000..c830df27d
--- /dev/null
+++ b/src/include/usr/htmgt/htmgt_reasoncodes.H
@@ -0,0 +1,74 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/usr/htmgt/htmgtreasoncodes.H $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2014 */
+/* [+] 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 __HTMGT_REASONCODES_H
+#define __HTMGT_REASONCODES_H
+
+#include <hbotcompid.H>
+
+namespace HTMGT
+{
+ enum htmgtModuleId
+ {
+ HTMGT_MOD_LOAD_START_STATUS = 0x00,
+ HTMGT_MOD_WAIT_FOR_OCC_ACTIVE = 0x01,
+ HTMGT_MOD_WAIT_FOR_OCC_READY = 0x02,
+ HTMGT_MOD_OCC_POLL = 0x76,
+ HTMGT_MOD_READ_OCC_SRAM = 0x85,
+ HTMGT_MOD_SEND_OCC_CMD = 0x90,
+ HTMGT_MOD_WRITE_OCC_CMD = 0x91,
+ HTMGT_MOD_CHECK_OCC_RSP = 0x92,
+ HTMGT_MOD_PARSE_OCC_RSP = 0x94,
+ HTMGT_MOD_HANLDE_OCC_EXCEPTION = 0xE0,
+ };
+
+ enum htmgtReasonCode
+ {
+ HTMGT_RC_INTERNAL_ERROR = HTMGT_COMP_ID | 0x01,
+ HTMGT_RC_NO_SUPPORT = HTMGT_COMP_ID | 0x0F,
+ HTMGT_RC_OCC_RESET = HTMGT_COMP_ID | 0x15,
+ HTMGT_RC_OCC_CRIT_FAILURE = HTMGT_COMP_ID | 0x16,
+ HTMGT_RC_SEND_FAIL = HTMGT_COMP_ID | 0x18,
+ HTMGT_RC_CHECKSUM_FAIL = HTMGT_COMP_ID | 0x19,
+ HTMGT_RC_OCC_CMD_FAIL = HTMGT_COMP_ID | 0x1B,
+ HTMGT_RC_INVALID_LENGTH = HTMGT_COMP_ID | 0x1C,
+ HTMGT_RC_OCC_ERROR_LOG = HTMGT_COMP_ID | 0x1D,
+ HTMGT_RC_INVALID_DATA = HTMGT_COMP_ID | 0x23,
+ HTMGT_RC_OCC_UNAVAILABLE = HTMGT_COMP_ID | 0x24,
+ HTMGT_RC_OCC_START_FAIL = HTMGT_COMP_ID | 0x25,
+ HTMGT_RC_PRESENT_STATE_PROHIBITS = HTMGT_COMP_ID | 0x28,
+ HTMGT_RC_PARAMETER_OUT_OF_RANGE = HTMGT_COMP_ID | 0x29,
+ HTMGT_RC_OVERSUBSCRIBED = HTMGT_COMP_ID | 0x2D,
+ HTMGT_RC_TIMEOUT = HTMGT_COMP_ID | 0x35,
+ HTMGT_RC_COMMAND_IN_PROGRESS = HTMGT_COMP_ID | 0x36,
+ HTMGT_RC_INVALID_PARAMETER = HTMGT_COMP_ID | 0x45,
+ HTMGT_RC_MISSING_DATA = HTMGT_COMP_ID | 0x4F,
+ HTMGT_RC_ECMD_DBUF_COPY_FAIL = HTMGT_COMP_ID | 0x53,
+ HTMGT_RC_TARGET_NOT_FUNCTIONAL = HTMGT_COMP_ID | 0x54,
+ HTMGT_RC_PCAP_CALC_COMPLETE = HTMGT_COMP_ID | 0xB9,
+ HTMGT_RC_ENERGYSCALE_FFDC = HTMGT_COMP_ID | 0xFD,
+ };
+};
+
+#endif
OpenPOWER on IntegriCloud