summaryrefslogtreecommitdiffstats
path: root/src/usr/diag
diff options
context:
space:
mode:
authorChris Phan <cphan@us.ibm.com>2014-09-23 12:46:05 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-12-03 11:12:47 -0600
commitfbb82d303f1deefd65e87d850dc77a74a6102bf5 (patch)
tree5be62aa9fd86919e9fea95bd3e5c4bfb4797c574 /src/usr/diag
parent605137529b178862bf2c28ea3c3da4fb48394991 (diff)
downloadtalos-hostboot-fbb82d303f1deefd65e87d850dc77a74a6102bf5.tar.gz
talos-hostboot-fbb82d303f1deefd65e87d850dc77a74a6102bf5.zip
ATTN: add stub runtime interfaces
Change-Id: I758ffe46770297a28be1087bc9f9b8379e4c2fa9 RTC: 110949 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/13546 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/diag')
-rw-r--r--src/usr/diag/attn/runtime/attn_rt.C66
-rw-r--r--src/usr/diag/attn/runtime/attn_rt.mk1
-rw-r--r--src/usr/diag/attn/runtime/makefile1
-rw-r--r--src/usr/diag/attn/runtime/test/attntest_rt.H37
-rw-r--r--src/usr/diag/attn/runtime/test/makefile1
5 files changed, 100 insertions, 6 deletions
diff --git a/src/usr/diag/attn/runtime/attn_rt.C b/src/usr/diag/attn/runtime/attn_rt.C
index 0fcddc386..b8a8506d2 100644
--- a/src/usr/diag/attn/runtime/attn_rt.C
+++ b/src/usr/diag/attn/runtime/attn_rt.C
@@ -39,15 +39,73 @@ using namespace ATTN;
namespace ATTN_RT
{
- // enableAttns() and handleAttns()
- // will be added later on.
+ /** Enable chip attentions
+ *
+ * @return 0 on success else return code
+ */
+ int enableAttns(void)
+ {
+ #define ATTN_FUNC "ATTN_RT::enableAttns() "
+ int rc = 0;
+
+ ATTN_ERR(ATTN_FUNC"not implemented yet!");
+
+ return rc;
+
+ #undef ATTN_FUNC
+ }
+
+ /** Disable chip attentions
+ *
+ * @return 0 on success else return code
+ */
+ int disableAttns(void)
+ {
+ #define ATTN_FUNC "ATTN_RT::disableAttns() "
+ int rc = 0;
+
+ ATTN_ERR(ATTN_FUNC"not implemented yet!");
+
+ return rc;
+
+ #undef ATTN_FUNC
+ }
+
+ /** brief handle chip attentions
+ *
+ * @param[in] i_proc - processor chip id at attention
+ * XSCOM chip id based on devtree defn
+ * @param[in] i_ipollStatus - processor chip Ipoll status
+ * @param[in] i_ipollMask - processor chip Ipoll mask
+ * @return 0 on success else return code
+ */
+ int handleAttns(uint64_t i_proc,
+ uint64_t i_ipollStatus,
+ uint64_t i_ipollMask)
+ {
+ #define ATTN_FUNC "ATTN_RT::handleAttns() "
+ int rc = 0;
+
+ ATTN_ERR(ATTN_FUNC"not implemented yet!");
+
+ return rc;
+
+ #undef ATTN_FUNC
+ }
- // will be used to register runtimeInterfaces
+ // register runtime interfaces
struct registerAttn
{
registerAttn()
{
- ATTN_FAST("registerAttn");
+ runtimeInterfaces_t * rt_intf = getRuntimeInterfaces();
+ if (NULL == rt_intf)
+ {
+ return;
+ }
+ rt_intf->enable_attns = &enableAttns;
+ rt_intf->disable_attns = &disableAttns;
+ rt_intf->handle_attns = &handleAttns;
}
};
diff --git a/src/usr/diag/attn/runtime/attn_rt.mk b/src/usr/diag/attn/runtime/attn_rt.mk
index c571865b7..8abe2bbec 100644
--- a/src/usr/diag/attn/runtime/attn_rt.mk
+++ b/src/usr/diag/attn/runtime/attn_rt.mk
@@ -24,3 +24,4 @@
# IBM_PROLOG_END_TAG
ATTN_RT_OBJS += attn_rt.o
+ATTN_RT_OBJS += attntrace.o
diff --git a/src/usr/diag/attn/runtime/makefile b/src/usr/diag/attn/runtime/makefile
index 352a39b4b..4a5217433 100644
--- a/src/usr/diag/attn/runtime/makefile
+++ b/src/usr/diag/attn/runtime/makefile
@@ -24,6 +24,7 @@
# IBM_PROLOG_END_TAG
HOSTBOOT_RUNTIME = 1
+
ROOTPATH = ../../../../..
EXTRAINCDIR += ${ROOTPATH}/src/include/usr/diag
diff --git a/src/usr/diag/attn/runtime/test/attntest_rt.H b/src/usr/diag/attn/runtime/test/attntest_rt.H
index 841f66bd5..84731ec22 100644
--- a/src/usr/diag/attn/runtime/test/attntest_rt.H
+++ b/src/usr/diag/attn/runtime/test/attntest_rt.H
@@ -34,9 +34,9 @@ class AttnTestRT: public CxxTest::TestSuite
{
public:
- void testAttnIntf()
+ void testAttnRtIntf()
{
- ATTN_SLOW("runtime testAttnIntf");
+ ATTN_SLOW(ENTER_MRK"AttnTestRT::testAttnRtIntf");
runtimeInterfaces_t* rt_intf = getRuntimeInterfaces();
if (NULL == rt_intf)
@@ -44,6 +44,39 @@ class AttnTestRT: public CxxTest::TestSuite
TS_FAIL("AttnTestRT: runtimeIntfaces not set");
return;
}
+
+ if (NULL == rt_intf->enable_attns)
+ {
+ TS_FAIL("AttnTestRT: enable_attns not set");
+ }
+ else
+ {
+ int rc = rt_intf->enable_attns();
+ ATTN_SLOW("enable_attns returned rc: %d", rc);
+ }
+
+ if (NULL == rt_intf->disable_attns)
+ {
+ TS_FAIL("AttnTestRT: disable_attns not set");
+ }
+ else
+ {
+ int rc = rt_intf->disable_attns();
+ ATTN_SLOW("disable_attns returned rc: %d", rc);
+ }
+
+ if (NULL == rt_intf->handle_attns)
+ {
+ TS_FAIL("AttnTestRT: handle_attns not set");
+ }
+ else
+ {
+ // just pass in some params for now
+ int rc = rt_intf->handle_attns(NULL, 0, 0);
+ ATTN_SLOW("handle_attns returned rc: %d", rc);
+ }
+
+ ATTN_SLOW(EXIT_MRK"AttnTestRT::testAttnRtIntf");
}
private:
diff --git a/src/usr/diag/attn/runtime/test/makefile b/src/usr/diag/attn/runtime/test/makefile
index 208bf830e..4636bfb05 100644
--- a/src/usr/diag/attn/runtime/test/makefile
+++ b/src/usr/diag/attn/runtime/test/makefile
@@ -24,6 +24,7 @@
# IBM_PROLOG_END_TAG
HOSTBOOT_RUNTIME = 1
+
ROOTPATH = ../../../../../..
EXTRAINCDIR += ${ROOTPATH}/src/include/usr/diag
OpenPOWER on IntegriCloud