diff options
Diffstat (limited to 'src/usr/diag/attn')
-rw-r--r-- | src/usr/diag/attn/runtime/attn_rt.C | 66 | ||||
-rw-r--r-- | src/usr/diag/attn/runtime/attn_rt.mk | 1 | ||||
-rw-r--r-- | src/usr/diag/attn/runtime/makefile | 1 | ||||
-rw-r--r-- | src/usr/diag/attn/runtime/test/attntest_rt.H | 37 | ||||
-rw-r--r-- | src/usr/diag/attn/runtime/test/makefile | 1 |
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 |