summaryrefslogtreecommitdiffstats
path: root/src/usr/intr/test
diff options
context:
space:
mode:
authorDoug Gilbert <dgilbert@us.ibm.com>2014-01-22 14:46:04 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-03-02 13:21:47 -0600
commit8e4ae1fa8e7378af70d0927068b5d27d3f3c8c68 (patch)
tree1a5c793c7951734662a15c1a71e4c0606e4a5295 /src/usr/intr/test
parentef737aaa136524bcc9fc9145a294bdea50d56fce (diff)
downloadtalos-hostboot-8e4ae1fa8e7378af70d0927068b5d27d3f3c8c68.tar.gz
talos-hostboot-8e4ae1fa8e7378af70d0927068b5d27d3f3c8c68.zip
Handle pending interrupts across nodes in mpipl
RTC: 80988 Change-Id: I7ef9feaa3d163d6956576f30538e2fe001e892a1 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/8441 Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/intr/test')
-rw-r--r--src/usr/intr/test/intrtest.H70
1 files changed, 69 insertions, 1 deletions
diff --git a/src/usr/intr/test/intrtest.H b/src/usr/intr/test/intrtest.H
index c653d6609..bbc8b07a3 100644
--- a/src/usr/intr/test/intrtest.H
+++ b/src/usr/intr/test/intrtest.H
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2011,2013 */
+/* COPYRIGHT International Business Machines Corp. 2011,2014 */
/* */
/* p1 */
/* */
@@ -34,6 +34,8 @@
#include <sys/mmio.h>
#include <sys/task.h>
#include <sys/misc.h>
+#include <sys/internode.h>
+#include <sys/mm.h>
#include <kernel/intmsghandler.H>
extern trace_desc_t * g_trac_intr;
@@ -156,6 +158,72 @@ class IntrTest: public CxxTest::TestSuite
}
}
+ void test_mpipl_node_data( void )
+ {
+ errlHndl_t err = NULL;
+ for(uint64_t hb_node = 0; hb_node < MAX_NODES_PER_SYS; ++hb_node)
+ {
+ // This message is async so the NODE_INFO_AREA may take
+ // a bit to show the changes
+ err = INTR::addHbNode(hb_node);
+
+ if ( err )
+ {
+ break;
+ }
+ }
+
+ if ( err )
+ {
+ TS_FAIL("Error log from INTR::addHbNode");
+ errlCommit(err, INTR_COMP_ID);
+ }
+
+ // Unregister a non-existant mesgq - This not only tests this
+ // interface using a bad param, but also serves to synchonize the
+ // async messages above so we don't check the NODE_DATA_AREA before
+ // it has been set.
+ msg_q_t msgQ = INTR::unRegisterMsgQ(0xff);
+ if(msgQ != NULL)
+ {
+ TS_FAIL("INTR: non-existant external interrupt type returned "
+ "a valid msgQ");
+ }
+
+ void * node_info_ptr =
+ reinterpret_cast<void *>(VMM_INTERNODE_PRESERVED_MEMORY_ADDR);
+
+ internode_info_t * this_node_info =
+ reinterpret_cast<internode_info_t *>
+ (mm_block_map(node_info_ptr,INTERNODE_INFO_SIZE));
+
+ if(this_node_info)
+ {
+ if(this_node_info->eye_catcher != NODE_INFO_EYE_CATCHER)
+ {
+ TS_FAIL("INTR: NODE_DATA_AREA not initialized");
+ }
+ for(uint64_t hb_node = 0;
+ hb_node < MAX_NODES_PER_SYS;
+ ++hb_node)
+ {
+ if(this_node_info->exist[hb_node] != true)
+ {
+ TS_FAIL
+ ("INTR: NODE_DATA_AREA.exist not true for node %d",
+ hb_node);
+ }
+ }
+
+ mm_block_unmap(this_node_info);
+ }
+ else
+ {
+ TS_FAIL("INTR Could not map memory of NODE_DATA_AREA");
+ }
+
+ }
+
IntrTest() : CxxTest::TestSuite()
{
OpenPOWER on IntegriCloud