summaryrefslogtreecommitdiffstats
path: root/src/usr/lpc
diff options
context:
space:
mode:
authorDan Crowell <dcrowell@us.ibm.com>2017-02-13 22:46:45 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-02-16 14:31:39 -0500
commit6f93bd233e0f1ffddc7b97cb4be83a944d4483d1 (patch)
treec68765612bca6478b0e18b4b3d172d3d44232bc6 /src/usr/lpc
parent1987418a47791b77d59c5f231078bfb39ca2b045 (diff)
downloadtalos-hostboot-6f93bd233e0f1ffddc7b97cb4be83a944d4483d1.tar.gz
talos-hostboot-6f93bd233e0f1ffddc7b97cb4be83a944d4483d1.zip
XSCOM/LPC Workaround for Nimbus DD1
There is a shared resource between the XSCOM and LPC logic that leads to errors at the XSCOM level causing errors to be detected during LPC operations. This commit adds an external interface to access block LPC operations while an XSCOM operation is in flight. Change-Id: I571094dfb666aa9198fabec5280a0f45c62c90ba RTC: 167291 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/36399 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Thi N. Tran <thi@us.ibm.com> Reviewed-by: Dean Sanner <dsanner@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/lpc')
-rw-r--r--src/usr/lpc/lpcdd.C15
-rw-r--r--src/usr/lpc/lpcdd.H15
2 files changed, 28 insertions, 2 deletions
diff --git a/src/usr/lpc/lpcdd.C b/src/usr/lpc/lpcdd.C
index a8a23fde1..81577a5b0 100644
--- a/src/usr/lpc/lpcdd.C
+++ b/src/usr/lpc/lpcdd.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2014,2016 */
+/* Contributors Listed Below - COPYRIGHT 2014,2017 */
/* [+] Google Inc. */
/* [+] International Business Machines Corp. */
/* */
@@ -363,6 +363,19 @@ errlHndl_t create_altmaster_objects( bool i_create,
return l_err;
}
+
+/**
+ * @brief Block/unblock all LPC operations
+ * @param[in] i_block true: block ops, false: allow ops
+ *
+ */
+void block_lpc_ops( bool i_block )
+{
+ // Note: this is ignoring the alt-master because the usecase for
+ // this function is only applicable for DD1
+ Singleton<LpcDD>::instance().lock(i_block);
+}
+
}; //namespace LPC
///////////////////////////////////////////////////////////////////////////////
diff --git a/src/usr/lpc/lpcdd.H b/src/usr/lpc/lpcdd.H
index 1b4e3c5bd..f4bd04176 100644
--- a/src/usr/lpc/lpcdd.H
+++ b/src/usr/lpc/lpcdd.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2014,2016 */
+/* Contributors Listed Below - COPYRIGHT 2014,2017 */
/* [+] Google Inc. */
/* [+] International Business Machines Corp. */
/* */
@@ -132,6 +132,19 @@ class LpcDD
};
/**
+ * @brief Block/unblock all LPC operations
+ * @param[in] i_block true: block ops, false: allow ops
+ */
+ void lock( bool i_block )
+ {
+ if( i_block ) {
+ mutex_lock(ivp_mutex);
+ } else {
+ mutex_unlock(ivp_mutex);
+ }
+ };
+
+ /**
* @brief Constructor
* @param[in] Processor target associated with the ECCB logic
*/
OpenPOWER on IntegriCloud