QNX IPC: OMAP5 - Enable DSP-MMU Fault Recovery
authorAngela Stegmaier <angelabaker@ti.com>
Wed, 4 Sep 2013 21:00:45 +0000 (16:00 -0500)
committerChris Ring <cring@ti.com>
Tue, 29 Oct 2013 17:04:46 +0000 (10:04 -0700)
Add the DSP MMU interrupt to listen for DSP-MMU faults.
Also fix a bug where the shm_phys_addr_dsp was not being
properly reset to 0, resulting in recovery failing to
happen properly.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Signed-off-by: VW <vwan@ti.com>
qnx/src/ipc3x_dev/ti/syslink/family/omap5430/ipu/omap5430BenelliEnabler.c
qnx/src/ipc3x_dev/ti/syslink/family/omap5430/ipu/omap5430BenelliHalMmu.c
qnx/src/ipc3x_dev/ti/syslink/family/omap5430/ipu/omap5430BenelliProc.c

index ce0efa52c9a10ed25dbab501b7de3ced7ff906e5..2801205956200d70b331880c3cfe95bfd27681ba 100644 (file)
@@ -1937,6 +1937,7 @@ Void ipu_destroy(OMAP5430BENELLI_HalObject * halObject)
         deinit_mmu_page_attribs();
     }
     else if (halObject->procId == PROCTYPE_DSP) {
+        shm_phys_addr_dsp = 0;
         deinit_dsp_mmu_page_attribs();
     }
 }
index 2721886afac8f99caab61a697440cc403e61c0c0..78307b6ec4dce82bee62cde7b3ef8114d67be455 100644 (file)
@@ -102,6 +102,7 @@ extern "C" {
  *  @brief  Interrupt Id for DSP MMU faults
  */
 #define MMU_FAULT_INTERRUPT          132
+#define MMU_FAULT_INTERRUPT_DSP      60
 
 /*!
  *  @brief  Size constants
@@ -394,8 +395,10 @@ _OMAP5430BENELLI_halMmuCheckAndClearFunc (Ptr arg)
     mmuObj->mmuFaultAddr = REG32(halObject->mmuBase + MMU_MMU_FAULT_AD_OFFSET);
 
     /* Print the fault information */
-    GT_0trace (curTrace, GT_4CLASS,
-               "**************** Benelli-MMU Fault ****************");
+    GT_1trace (curTrace, GT_4CLASS,
+            "**************** %s-MMU Fault ****************",
+            MultiProc_getName(halObject->procId));
+
     GT_1trace (curTrace, GT_4CLASS,
                "****    addr: 0x%x", mmuObj->mmuFaultAddr);
     if (mmuObj->mmuIrqStatus & MMU_IRQ_TLBMISS)
@@ -478,7 +481,13 @@ _OMAP5430BENELLI_halMmuEnable (OMAP5430BENELLI_HalObject * halObject,
     isrParams.sharedInt        = FALSE;
     isrParams.checkAndClearFxn = &_OMAP5430BENELLI_halMmuCheckAndClearFunc;
     isrParams.fxnArgs          = halObject;
-    isrParams.intId            = MMU_FAULT_INTERRUPT;
+    if (halObject->procId == MultiProc_getId("DSP")) {
+        isrParams.intId        = MMU_FAULT_INTERRUPT_DSP;
+    }
+    else {
+        isrParams.intId        = MMU_FAULT_INTERRUPT;
+    }
+
     mmuObj->isrHandle = OsalIsr_create (&_OMAP5430BENELLI_halMmuInt_isr,
                                         halObject,
                                         &isrParams);
index 1193dc8e8b5ef213086fbe810e978c732d145120..88b1e694282706278a99ed1bc4a462adbf5552fa 100644 (file)
@@ -1241,7 +1241,8 @@ OMAP5430BENELLIPROC_attach (Processor_Handle        handle,
                                  "    OMAP5430BENELLIPROC_attach: Slave is now "
                                  "in reset!");
 
-                        if (procHandle->procId == PROCTYPE_IPU0) {
+                        if (procHandle->procId == PROCTYPE_IPU0 ||
+                            procHandle->procId == PROCTYPE_DSP) {
                             /* Enable MMU */
                             GT_0trace (curTrace,
                                        GT_2CLASS,
@@ -1333,7 +1334,8 @@ OMAP5430BENELLIPROC_detach (Processor_Handle handle)
 
         if (    (procHandle->bootMode == ProcMgr_BootMode_Boot)
             ||  (procHandle->bootMode == ProcMgr_BootMode_NoLoad_Pwr)) {
-            if (procHandle->procId == PROCTYPE_IPU0) {
+            if (procHandle->procId == PROCTYPE_IPU0 ||
+                procHandle->procId == PROCTYPE_DSP) {
                 /* Disable MMU */
                 GT_0trace (curTrace,
                            GT_2CLASS,