]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - ipc/ipcdev.git/blobdiff - packages/ti/ipc/tests/rpc_task.c
Add MmServiceMgr_getId() to allow retrieval of service instance id
[ipc/ipcdev.git] / packages / ti / ipc / tests / rpc_task.c
index cd2fd3ceafa8a063ae697c5a5cb4f26465a14920..33425a113eff1d7ba4bebadc3b141bdf33b708bb 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Texas Instruments Incorporated
+ * Copyright (c) 2013-2014, Texas Instruments Incorporated
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -148,7 +148,8 @@ static RcmServer_Params rpc_Params;
 
 Void RPC_SKEL_SrvDelNotification(Void)
 {
-    System_printf("RPC_SKEL_SrvDelNotification: Nothing to cleanup\n");
+    System_printf("RPC_SKEL_SrvDelNotification: Nothing to cleanup for "
+        "MmRpc instance id=%d\n", MmServiceMgr_getId());
 }
 
 static Int32 RPC_SKEL_Init2(UInt32 size, UInt32 *data)
@@ -269,6 +270,8 @@ Int32 MxServer_skel_compute(UInt32 size, UInt32 *data)
     payload = (MmType_Param *)data;
     compute = (MxServer_Compute *)payload[0].data;
 
+    Cache_inv(compute, sizeof(MxServer_Compute), Cache_Type_ALL, TRUE);
+
 #if CHATTER
     System_printf("skel_compute: compute=0x%x\n", compute);
     System_printf("skel_compute: compute size=%d\n", (Int)payload[0].size);
@@ -284,6 +287,11 @@ Int32 MxServer_skel_compute(UInt32 size, UInt32 *data)
     Cache_inv(compute->outBuf, compute->size * sizeof(uint32_t),
             Cache_Type_ALL, TRUE);
 
+#if CHATTER
+    System_printf("skel_compute: outBuf[0]=0x%x\n", compute->outBuf[0]);
+    System_printf("skel_compute: inBuf[0]=0x%x\n", compute->inBuf[0]);
+#endif
+
     /* invoke the implementation function */
     result = MxServer_compute(compute);
 
@@ -300,6 +308,9 @@ Int32 fxnFault(UInt32 size, UInt32 *data)
 {
     MmType_Param *payload = (MmType_Param *)data;
     Int a;
+    typedef Int (*MyCode)();
+    MyCode fxn = (MyCode)0x96000000;
+    volatile Int dummy = 0;
 
     a = (UInt32)payload[0].data;
 
@@ -312,6 +323,19 @@ Int32 fxnFault(UInt32 size, UInt32 *data)
             System_printf("Generating write MMU Fault...\n");
             *(volatile int *)(0x96000000) = 0x1;
             break;
+        case 3:
+            System_printf("Generating program MMU Fault...\n");
+            fxn();
+            break;
+        case 4:
+            System_printf("Generating exception...\n");
+            dummy = dummy / dummy;
+            break;
+        case 5:
+            System_printf("Generating Watchdog interrupt...\n");
+            dummy = 1;
+            while(dummy);
+            break;
         default:
             System_printf("Invalid fxnFault test\n");
             break;