summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@us.ibm.com>2012-08-17 22:54:42 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-09-16 14:41:33 -0500
commitd529059e6f21842c7ee74edd91c7abb33ca1eb35 (patch)
treec3a6503783c9bb4ee0cf542e953477892baef4a2 /src/usr
parentf9e0d7e083a4345e6a82358a099344e9026eaafa (diff)
downloadblackbird-hostboot-d529059e6f21842c7ee74edd91c7abb33ca1eb35.tar.gz
blackbird-hostboot-d529059e6f21842c7ee74edd91c7abb33ca1eb35.zip
Temporary attention handler workaround.
Of missing simics support for p8 global firs. RTC: 46448 Change-Id: I1493e86af73ac9c511ee6f6a5689be8d79488b3a Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1560 Tested-by: Jenkins Server Reviewed-by: Zane Shelley <zshelle@us.ibm.com> Reviewed-by: Prashanth S. Acharya <prashanthacharya@in.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/diag/attn/attn.C29
-rw-r--r--src/usr/diag/attn/attnfwd.H16
-rw-r--r--src/usr/diag/attn/attnproc.C5
-rw-r--r--src/usr/diag/attn/attnproc.H39
-rw-r--r--src/usr/diag/attn/attnsvc.C4
-rw-r--r--src/usr/diag/attn/test/attntestproc.H2
-rw-r--r--src/usr/diag/attn/test/attntestsvc.H2
7 files changed, 95 insertions, 2 deletions
diff --git a/src/usr/diag/attn/attn.C b/src/usr/diag/attn/attn.C
index da79a6ee1..10ef61f3c 100644
--- a/src/usr/diag/attn/attn.C
+++ b/src/usr/diag/attn/attn.C
@@ -34,14 +34,33 @@
#include "attnsvc.H"
#include "attnproc.H"
#include "attnmem.H"
+#include <util/singleton.H>
using namespace std;
using namespace PRDF;
using namespace TARGETING;
+using namespace Util;
namespace ATTN
{
+/**
+ * @brief DisableProcResolver
+ *
+ * FIXME: Temp turn off the proc
+ * resolver until the proc global
+ * FIRs can be scomed in simics.
+ * RTC: 47750
+ */
+static struct DisableProcResolver
+{
+ DisableProcResolver()
+ {
+ Singleton<ProcOps>::instance().disable();
+ }
+
+} disableProcResolver;
+
errlHndl_t startService()
{
return Singleton<Service>::instance().start();
@@ -101,6 +120,16 @@ errlHndl_t PrdWrapper::callPrd(const AttentionList & i_attentions)
return iv_impl->callPrd(i_attentions);
}
+ProcOps & getProcOps()
+{
+ return Singleton<ProcOps>::instance();
+}
+
+MemOps & getMemOps()
+{
+ return Singleton<MemOps>::instance();
+}
+
int64_t Attention::compare(const Attention & i_rhs) const
{
return ATTN::compare(iv_data, i_rhs.iv_data);
diff --git a/src/usr/diag/attn/attnfwd.H b/src/usr/diag/attn/attnfwd.H
index ced3ecb93..3386aecc9 100644
--- a/src/usr/diag/attn/attnfwd.H
+++ b/src/usr/diag/attn/attnfwd.H
@@ -58,6 +58,8 @@ class TargetService;
class TargetServiceImpl;
class ScomWrapper;
class ScomImpl;
+class ProcOps;
+class MemOps;
enum
{
@@ -169,6 +171,20 @@ PrdWrapper & getPrdWrapper();
TargetService & getTargetService();
/**
+ * @brief getProcOps ProcOps singleton access.
+ *
+ * @return ProcOps Singleton instance.
+ */
+ProcOps & getProcOps();
+
+/**
+ * @brief getMemOps MemOps singleton access.
+ *
+ * @return MemOps Singleton instance.
+ */
+MemOps & getMemOps();
+
+/**
* @brief compare compare two PRDF::AttnData structures.
*
* @param[in] i_l one of two AttnData structures.
diff --git a/src/usr/diag/attn/attnproc.C b/src/usr/diag/attn/attnproc.C
index 28676b2e3..3cfffa3a1 100644
--- a/src/usr/diag/attn/attnproc.C
+++ b/src/usr/diag/attn/attnproc.C
@@ -111,6 +111,11 @@ errlHndl_t ProcOps::resolve(
type != END_ATTENTION_TYPE;
++type)
{
+ if(!enabled())
+ {
+ break;
+ }
+
if(!GFIR::getCheckbits(type, ignored))
{
// this object doesn't support
diff --git a/src/usr/diag/attn/attnproc.H b/src/usr/diag/attn/attnproc.H
index bc170154e..05484d139 100644
--- a/src/usr/diag/attn/attnproc.H
+++ b/src/usr/diag/attn/attnproc.H
@@ -43,6 +43,33 @@ class ProcOps : public AttentionOps
public:
/**
+ * @brief disable Clear the enablement state.
+ */
+ void disable()
+ {
+ iv_enabled = false;
+ }
+
+ /**
+ * @brief enable Set the enablement state.
+ */
+ void enable()
+ {
+ iv_enabled = true;
+ }
+
+ /**
+ * @brief enabled Obtain the enablement state.
+ *
+ * @retval[true] Enabled.
+ * @retval[true] Disabled.
+ */
+ bool enabled() const
+ {
+ return iv_enabled;
+ }
+
+ /**
* @brief mask Mask this attention.
*
* @param[in] i_data The attention to mask.
@@ -93,6 +120,18 @@ class ProcOps : public AttentionOps
* @brief dtor
*/
~ProcOps() {}
+
+ /**
+ * @brief ctor
+ */
+ ProcOps() : iv_enabled(true) {}
+
+ private:
+
+ /**
+ * @brief iv_enabled Enablement state.
+ */
+ bool iv_enabled;
};
}
#endif
diff --git a/src/usr/diag/attn/attnsvc.C b/src/usr/diag/attn/attnsvc.C
index 715121408..383b21a5f 100644
--- a/src/usr/diag/attn/attnsvc.C
+++ b/src/usr/diag/attn/attnsvc.C
@@ -120,8 +120,8 @@ errlHndl_t Service::processIntrQMsgPreAck(const msg_t & i_msg,
// in the ipoll mask register and query the proc & mem
// resolvers for active attentions
- static ProcOps procOps;
- static MemOps memOps;
+ ProcOps & procOps = getProcOps();
+ MemOps & memOps = getMemOps();
uint64_t ipollMaskScomData = 0;
diff --git a/src/usr/diag/attn/test/attntestproc.H b/src/usr/diag/attn/test/attntestproc.H
index 0a870b646..cb62fc0f9 100644
--- a/src/usr/diag/attn/test/attntestproc.H
+++ b/src/usr/diag/attn/test/attntestproc.H
@@ -399,6 +399,8 @@ class AttnProcTest: public CxxTest::TestSuite
prd.installPrd();
+ getProcOps().enable();
+
do
{
err = svc.start();
diff --git a/src/usr/diag/attn/test/attntestsvc.H b/src/usr/diag/attn/test/attntestsvc.H
index 452a6f91a..252e9a6cb 100644
--- a/src/usr/diag/attn/test/attntestsvc.H
+++ b/src/usr/diag/attn/test/attntestsvc.H
@@ -256,6 +256,8 @@ class AttnSvcTest: public CxxTest::TestSuite
prd.installPrd();
+ getProcOps().enable();
+
do
{
err = svc.start();
OpenPOWER on IntegriCloud