]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - ipc/ipcdev.git/commitdiff
Add subtest into rpmsg-rpc-stress test to trigger program-access MMU fault
authorvwan@ti.com <vwan@ti.com>
Fri, 16 May 2014 18:56:20 +0000 (11:56 -0700)
committerRobert Tivy <rtivy@ti.com>
Tue, 20 May 2014 22:28:55 +0000 (15:28 -0700)
This commit enhances the rpmsg-rpc-stress test to allow it to trigger MMU
fault via instruction fetch.

Signed-off-by: VW <vwan@ti.com>
packages/ti/ipc/tests/rpc_task.c
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/rpmsg-rpc-stress/usr/rpmsg-rpc-stress.use

index 767dd7afc049e0959a6813ccfe455eb90bb44ddf..1eca16e1d0657d8cd02862cf3d379e2415ccf4c5 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
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -307,6 +307,8 @@ Int32 fxnFault(UInt32 size, UInt32 *data)
 {
     MmType_Param *payload = (MmType_Param *)data;
     Int a;
 {
     MmType_Param *payload = (MmType_Param *)data;
     Int a;
+    typedef Int (*MyCode)();
+    MyCode fxn = (MyCode)0x96000000;
 
     a = (UInt32)payload[0].data;
 
 
     a = (UInt32)payload[0].data;
 
@@ -319,6 +321,10 @@ Int32 fxnFault(UInt32 size, UInt32 *data)
             System_printf("Generating write MMU Fault...\n");
             *(volatile int *)(0x96000000) = 0x1;
             break;
             System_printf("Generating write MMU Fault...\n");
             *(volatile int *)(0x96000000) = 0x1;
             break;
+        case 3:
+            System_printf("Generating program MMU Fault...\n");
+            fxn();
+            break;
         default:
             System_printf("Invalid fxnFault test\n");
             break;
         default:
             System_printf("Invalid fxnFault test\n");
             break;
index 8c9c0172289954968ab2ce71e9ea65fa1a5283a7..9d60edd2ab1202773103e4a7d8ad9ce5466b94d6 100644 (file)
@@ -22,8 +22,9 @@ Syntax:
     -l <num>        For test 2, the number of threads communicating with the
                     remote OMX ServiceMgr. Default is 1.
     -s <sub_test>   For test 4, sub_test Ids can be:
     -l <num>        For test 2, the number of threads communicating with the
                     remote OMX ServiceMgr. Default is 1.
     -s <sub_test>   For test 4, sub_test Ids can be:
-                    1: MMU Fault (read access) (default)
-                    2: MMU Fault (write access)
+                    1: MMU Fault (data read access) (default)
+                    2: MMU Fault (data write access)
+                    3: MMU Fault (program access)
 
 Examples:
   rpmsg-rpc-stress -t 1                 Runs the Multi-SrvMgr test with 1
 
 Examples:
   rpmsg-rpc-stress -t 1                 Runs the Multi-SrvMgr test with 1