summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorMatt Derksen <mderkse1@us.ibm.com>2018-01-31 10:28:57 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2018-02-07 17:40:16 -0500
commitd5bdfe28f46fe9b68994b77212497c25bddcdc93 (patch)
treea776781b9c35bc7ca6abfae3c8e2725bbec71522 /src/include
parent975d6f745c830cb54cff7a2cf751d57b44db83c0 (diff)
downloadtalos-hostboot-d5bdfe28f46fe9b68994b77212497c25bddcdc93.tar.gz
talos-hostboot-d5bdfe28f46fe9b68994b77212497c25bddcdc93.zip
Initialize SBE message communication on HBRT start
Need to clear first 2 bits in CFAM register 0x283B. This basically resets our SBE communication stream just incase HBRT restarts after processing SBE interrupt. Clearing these bits tells the sender to resend the command. Change-Id: I1a1c5b80cc99414649d38c06b93428c87299f242 RTC:186334 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/53225 Reviewed-by: Martin Gloff <mgloff@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Brian E. Bakke <bbakke@us.ibm.com> Reviewed-by: Roland Veloz <rveloz@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/include')
-rw-r--r--src/include/runtime/interface.h6
-rw-r--r--src/include/usr/sbeio/runtime/sbe_msg_passing.H26
2 files changed, 31 insertions, 1 deletions
diff --git a/src/include/runtime/interface.h b/src/include/runtime/interface.h
index 2fa93a398..158e331dd 100644
--- a/src/include/runtime/interface.h
+++ b/src/include/runtime/interface.h
@@ -936,6 +936,12 @@ struct postInitCalls_t
*/
void (*callApplyTempOverrides)();
+ /**
+ * @brief Clear pending SBE messages
+ *
+ */
+ void (*callClearPendingSbeMsgs)();
+
};
extern hostInterfaces_t* g_hostInterfaces;
diff --git a/src/include/usr/sbeio/runtime/sbe_msg_passing.H b/src/include/usr/sbeio/runtime/sbe_msg_passing.H
index 53899d9f5..e50b4493e 100644
--- a/src/include/usr/sbeio/runtime/sbe_msg_passing.H
+++ b/src/include/usr/sbeio/runtime/sbe_msg_passing.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2017 */
+/* Contributors Listed Below - COPYRIGHT 2017,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -168,6 +168,30 @@ namespace SBE_MSG
* @return int Return code.
*/
int eraseProcessCmdFunction(enum passThruCmds i_command);
+
+ //------------------------------------------------------------------------
+ // Constants for setting/clearing bits in SCOM_ADDR_5003B
+ //------------------------------------------------------------------------
+ const uint32_t SCOM_ADDR_5003B = 0x0005003B; // CFAM Reg 0x283B
+ const uint32_t SBE_MESSAGE_PROCESSING_IN_PROGRESS = 0x40000000;
+ const uint32_t SBE_MESSAGE_PROCESSING_COMPLETE = 0x80000000;
+
+ /**
+ * @brief SBE message update bit(s) in CFAM register
+ *
+ * @details This is a call that will update bit(s) in CFAM register 0x283B
+ * or SCOM_ADDR_5003B.
+ *
+ * @param[in] i_proc HB processor target
+ * @param[in] i_set_mask CFAM register mask (mark bits to set)
+ * @param[in] i_clear_mask CFAM register mask (mark bits to clear)
+ *
+ * @returns errlHndl_t NULL on success
+ */
+ errlHndl_t process_sbe_msg_update_cfam(TARGETING::TargetHandle_t i_proc,
+ const uint32_t i_set_mask,
+ const uint32_t i_clear_mask);
+
} // namespace SBE_MSG
OpenPOWER on IntegriCloud