summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/usr/diag/attn/common/attnbits.C21
-rw-r--r--src/usr/diag/attn/common/attnbits.H24
-rw-r--r--src/usr/diag/attn/runtime/attn_rt.C37
-rw-r--r--src/usr/diag/attn/runtime/test/attntest_rt.H13
4 files changed, 73 insertions, 22 deletions
diff --git a/src/usr/diag/attn/common/attnbits.C b/src/usr/diag/attn/common/attnbits.C
index 2ae89291b..b2514ad11 100644
--- a/src/usr/diag/attn/common/attnbits.C
+++ b/src/usr/diag/attn/common/attnbits.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2014,2016 */
+/* Contributors Listed Below - COPYRIGHT 2014,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -98,15 +98,6 @@ const uint64_t address = IPOLL_MASK_REG;
// 'routing to FSP' should be enabled.
// (along with all interrupt types to FSP)
// ---------------------------------------------
-// {ROUTE_TO_HOST, 0x0400000000000000ull},
-//
-// {TOSP_CHECK_STOP, 0x0200000000000000ull},
-// {TOSP_RECOVERABLE, 0x0100000000000000ull},
-// {TOSP_SPECIAL, 0x0080000000000000ull},
-// {TOSP_UNIT_CS, 0x0040000000000000ull},
-// {TOSP_HOST, 0x0020000000000000ull},
-// {ROUTE_TO_SP, 0x0010000000000000ull},
-// ---------------------------------------------
void getCheckbitsAssociations(
const RegAssoc * & o_first,
@@ -114,11 +105,11 @@ void getCheckbitsAssociations(
{
static const RegAssoc first[] = {
- {CHECK_STOP, 0x8000000000000000ull},
- {RECOVERABLE, 0x4000000000000000ull},
- {SPECIAL, 0x2000000000000000ull},
- {UNIT_CS, 0x1000000000000000ull},
- {HOST_ATTN, 0x0800000000000000ull},
+ {CHECK_STOP, IPOLL_CHECK_STOP},
+ {RECOVERABLE, IPOLL_RECOVERABLE},
+ {SPECIAL, IPOLL_SPECIAL},
+ {UNIT_CS, IPOLL_UNIT_CS},
+ {HOST_ATTN, IPOLL_HOST_ATTN},
};
static const RegAssoc * last = first +
diff --git a/src/usr/diag/attn/common/attnbits.H b/src/usr/diag/attn/common/attnbits.H
index 763f0c987..5bee569e8 100644
--- a/src/usr/diag/attn/common/attnbits.H
+++ b/src/usr/diag/attn/common/attnbits.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2014,2016 */
+/* Contributors Listed Below - COPYRIGHT 2014,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -186,11 +186,31 @@ enum
IPOLL_MASK_REG = 0x000F0033,
// (IPOLL) Error status reg
IPOLL_STATUS_REG = 0x000F0034,
-
};
+/**
+ * @brief Values used to indicate the bits used in
+ * the IPOLL mask and status registers.
+ */
+enum
+{
+ IPOLL_CHECK_STOP = 0x8000000000000000ull,
+ IPOLL_RECOVERABLE = 0x4000000000000000ull,
+ IPOLL_SPECIAL = 0x2000000000000000ull,
+ IPOLL_UNIT_CS = 0x1000000000000000ull,
+ IPOLL_HOST_ATTN = 0x0800000000000000ull,
+
+ IPOLL_ROUTE_TO_HOST = 0x0400000000000000ull,
+
+ IPOLL_SP_CHECK_STOP = 0x0200000000000000ull,
+ IPOLL_SP_RECOVERABLE = 0x0100000000000000ull,
+ IPOLL_SP_SPECIAL = 0x0080000000000000ull,
+ IPOLL_SP_UNIT_CS = 0x0040000000000000ull,
+ IPOLL_SP_HOST_ATTN = 0x0020000000000000ull,
+ IPOLL_ROUTE_TO_SP = 0x0010000000000000ull
+};
}
diff --git a/src/usr/diag/attn/runtime/attn_rt.C b/src/usr/diag/attn/runtime/attn_rt.C
index 15b7b6b9e..5dd165b19 100644
--- a/src/usr/diag/attn/runtime/attn_rt.C
+++ b/src/usr/diag/attn/runtime/attn_rt.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2014,2016 */
+/* Contributors Listed Below - COPYRIGHT 2014,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -26,6 +26,7 @@
#include "runtime/attnsvc.H"
#include "common/attntrace.H"
#include "common/attnmem.H"
+#include "common/attnbits.H"
#include <runtime/interface.h>
#include <runtime/rt_targeting.H>
#include <targeting/common/target.H>
@@ -158,6 +159,33 @@ namespace ATTN_RT
return rc;
}
+
+ /** brief getIpollEvents
+ *
+ * Bits that are *set* in this bitmask represent events that will be
+ * allowed to flow to the HOST or Service Processor.
+ *
+ * @return Value indicating which attention events should
+ * be enabled in the IPOLL mask register.
+ */
+
+ uint64_t getIpollEvents( void )
+ {
+ uint64_t l_ipollEvents = 0;
+
+ // Host side should allow 'Recov', 'UnitCs' and 'HostInt'
+ // SP side should allow 'Chkstop', 'Recov', 'Special'
+ // and maybe the mystery bit (route to SP).
+ l_ipollEvents = IPOLL_RECOVERABLE | IPOLL_UNIT_CS |
+ IPOLL_HOST_ATTN | IPOLL_SP_CHECK_STOP |
+ IPOLL_SP_RECOVERABLE | IPOLL_SP_SPECIAL |
+ IPOLL_ROUTE_TO_SP ;
+
+ return(l_ipollEvents);
+
+ } // end getIpollEvents
+
+
// register runtimeInterfaces
struct registerAttn
{
@@ -169,9 +197,10 @@ namespace ATTN_RT
return;
}
- rt_intf->enable_attns = &enableAttns;
- rt_intf->disable_attns = &disableAttns;
- rt_intf->handle_attns = &handleAttns;
+ rt_intf->enable_attns = &enableAttns;
+ rt_intf->disable_attns = &disableAttns;
+ rt_intf->handle_attns = &handleAttns;
+ rt_intf->get_ipoll_events = &getIpollEvents;
}
};
diff --git a/src/usr/diag/attn/runtime/test/attntest_rt.H b/src/usr/diag/attn/runtime/test/attntest_rt.H
index 84731ec22..b86c0a0a7 100644
--- a/src/usr/diag/attn/runtime/test/attntest_rt.H
+++ b/src/usr/diag/attn/runtime/test/attntest_rt.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2014 */
+/* Contributors Listed Below - COPYRIGHT 2014,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -76,6 +76,17 @@ class AttnTestRT: public CxxTest::TestSuite
ATTN_SLOW("handle_attns returned rc: %d", rc);
}
+ if (NULL == rt_intf->get_ipoll_events)
+ {
+ TS_FAIL("AttnTestRT: get_ipoll_events not set");
+ }
+ else
+ {
+ // just pass in some params for now
+ uint64_t l_bits = rt_intf->get_ipoll_events();
+ ATTN_SLOW("get_ipoll_events returned: %llx", l_bits);
+ }
+
ATTN_SLOW(EXIT_MRK"AttnTestRT::testAttnRtIntf");
}
OpenPOWER on IntegriCloud