Revert "SDOCM00106428 Add notify mailbox driver support on DRA7xx (Part 3)"
authorChris Ring <cring@ti.com>
Fri, 28 Feb 2014 17:38:21 +0000 (09:38 -0800)
committerChris Ring <cring@ti.com>
Sun, 2 Mar 2014 17:46:23 +0000 (09:46 -0800)
packages/ti/sdo/ipc/family/vayu/InterruptArp32.c
packages/ti/sdo/ipc/family/vayu/InterruptArp32.xdc
packages/ti/sdo/ipc/family/vayu/InterruptArp32.xs
packages/ti/sdo/ipc/family/vayu/InterruptDsp.c
packages/ti/sdo/ipc/family/vayu/InterruptDsp.xs
packages/ti/sdo/ipc/family/vayu/NotifyDriverMbx.c
packages/ti/sdo/ipc/family/vayu/NotifyDriverMbx.xdc
packages/ti/sdo/ipc/family/vayu/NotifyDriverMbx.xs
packages/ti/sdo/ipc/family/vayu/NotifySetup.c
packages/ti/sdo/ipc/family/vayu/NotifySetup.xdc
packages/ti/sdo/ipc/family/vayu/NotifySetup.xs

index 8b0fdbe2c9e1c6afe3cb8a5f0ebc69875ab2e8cd..6d706d12486b9c7f99b08a298f9e1d59b3568397 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2014 Texas Instruments Incorporated - http://www.ti.com
+ * Copyright (c) 2012-2013, Texas Instruments Incorporated
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-
 /*
  *  ======== InterruptArp32.c ========
  *  ARP32 mailbox based interrupt manager
  */
+
 #include <xdc/std.h>
 #include <xdc/runtime/Assert.h>
 #include <xdc/runtime/Error.h>
 
 #include <ti/sysbios/family/arp32/Hwi.h>
 
+#include <ti/sdo/utils/_MultiProc.h>
 #include <ti/sdo/ipc/_Ipc.h>
-#include <ti/sdo/ipc/family/vayu/NotifySetup.h>
 #include <ti/sdo/ipc/notifyDrivers/IInterrupt.h>
-#include <ti/sdo/utils/_MultiProc.h>
 
 #include "package/internal/InterruptArp32.xdc.h"
 
@@ -114,7 +113,8 @@ Void InterruptArp32_intEnable(UInt16 remoteProcId, IInterrupt_IntInfo *intInfo)
  *  ======== InterruptArp32_intDisable ========
  *  Disables remote processor interrupt
  */
-Void InterruptArp32_intDisable(UInt16 remoteProcId, IInterrupt_IntInfo *intInfo)
+Void InterruptArp32_intDisable(UInt16 remoteProcId,
+                                IInterrupt_IntInfo *intInfo)
 {
     UInt16 index;
 
@@ -127,10 +127,13 @@ Void InterruptArp32_intDisable(UInt16 remoteProcId, IInterrupt_IntInfo *intInfo)
  *  ======== InterruptArp32_intRegister ========
  */
 Void InterruptArp32_intRegister(UInt16 remoteProcId,
-        IInterrupt_IntInfo *intInfo, Fxn func, UArg arg)
+                                 IInterrupt_IntInfo *intInfo,
+                                 Fxn func, UArg arg)
 {
     UInt        key;
     UInt16      index;
+    UInt        mbxIdx;
+    Hwi_Params  hwiAttrs;
     Error_Block eb;
     InterruptArp32_FxnTable *table;
 
@@ -158,9 +161,31 @@ Void InterruptArp32_intRegister(UInt16 remoteProcId,
 
     InterruptArp32_intClear(remoteProcId, intInfo);
 
-    /* plug the cpu interrupt */
-    NotifySetup_plugHwi(remoteProcId, intInfo->intVectorId,
-            InterruptArp32_intShmStub);
+    if ((index == DSP1_ID) || (index == IPU1_ID) || (index == HOST_ID)) {
+        mbxIdx = 0;
+    }
+    else if ((index == DSP2_ID) || (index == IPU2_ID) ||
+             (index == IPU1_1_ID) || (index == IPU2_1_ID)) {
+        mbxIdx = 1;
+    }
+    else if (index < InterruptArp32_NUM_EVES) {
+        mbxIdx = 2;
+    }
+
+    /* Make sure the interrupt only gets plugged once */
+    InterruptArp32_module->numPlugged[mbxIdx]++;
+    if (InterruptArp32_module->numPlugged[mbxIdx] == 1) {
+        /* Register interrupt to remote processor */
+        Hwi_Params_init(&hwiAttrs);
+        hwiAttrs.arg = arg;
+        hwiAttrs.vectorNum = intInfo->intVectorId;
+
+        Hwi_create(InterruptArp32_eveInterruptTable[index],
+                  (Hwi_FuncPtr)InterruptArp32_intShmStub,
+                   &hwiAttrs,
+                   &eb);
+        Hwi_enableInterrupt(InterruptArp32_eveInterruptTable[index]);
+    }
 
     /* enable the mailbox and Hwi */
     InterruptArp32_intEnable(remoteProcId, intInfo);
@@ -176,22 +201,41 @@ Void InterruptArp32_intUnregister(UInt16 remoteProcId,
                                    IInterrupt_IntInfo *intInfo)
 {
     UInt16 index;
+    UInt   mbxIdx;
+    Hwi_Handle  hwiHandle;
     InterruptArp32_FxnTable *table;
 
     index = PROCID(remoteProcId);
 
-    /* disable the mailbox interrupt source */
+    if ((remoteProcId == DSP1_ID) || (remoteProcId == IPU1_ID) ||
+        (remoteProcId == HOST_ID)) {
+        mbxIdx = 0;
+    }
+    else if ((remoteProcId == DSP2_ID) || (remoteProcId == IPU2_ID) ||
+        (remoteProcId == IPU1_1_ID) || (remoteProcId == IPU2_1_ID)) {
+        mbxIdx = 1;
+    }
+    else if (remoteProcId < InterruptArp32_NUM_EVES) {
+        mbxIdx = 2;
+    }
+
+    /* Disable the mailbox interrupt source */
     InterruptArp32_intDisable(remoteProcId, intInfo);
 
-    /* unplug isr */
-    NotifySetup_unplugHwi(remoteProcId, intInfo->intVectorId);
+    InterruptArp32_module->numPlugged[mbxIdx]--;
+    if (InterruptArp32_module->numPlugged[mbxIdx] == 0) {
+        /* Delete the Hwi */
+        hwiHandle = Hwi_getHandle(InterruptArp32_eveInterruptTable[index]);
+        Hwi_delete(&hwiHandle);
+    }
 
     /* Clear the FxnTable entry for the remote processor */
     table = &(InterruptArp32_module->fxnTable[index]);
     table->func = NULL;
-    table->arg = 0;
+    table->arg  = 0;
 }
 
+
 /*
  *  ======== InterruptArp32_intSend ========
  *  Send interrupt to the remote processor
@@ -216,6 +260,7 @@ Void InterruptArp32_intSend(UInt16 remoteProcId, IInterrupt_IntInfo *intInfo,
     Hwi_restore(key);
 }
 
+
 /*
  *  ======== InterruptArp32_intPost ========
  *  Simulate an interrupt from a remote processor
@@ -271,12 +316,29 @@ UInt InterruptArp32_intClear(UInt16 remoteProcId, IInterrupt_IntInfo *intInfo)
 /*
  *  ======== InterruptArp32_intShmStub ========
  */
-Void InterruptArp32_intShmStub(UInt16 idx)
+Void InterruptArp32_intShmStub(UArg arg)
 {
-    UInt16 srcVirtId;
+    UInt16 index;
+    UInt16 selfIdx;
+    UInt16 loopIdx;
     InterruptArp32_FxnTable *table;
 
-    srcVirtId = idx / InterruptArp32_NUM_CORES;
-    table = &(InterruptArp32_module->fxnTable[srcVirtId]);
-    (table->func)(table->arg);
+    selfIdx = MultiProc_self();
+
+    for (loopIdx = 0; loopIdx < MultiProc_getNumProcsInCluster(); loopIdx++) {
+
+        if (loopIdx == selfIdx) {
+            continue;
+        }
+
+        index = MBX_TABLE_IDX(loopIdx, selfIdx);
+
+        if ((REG32(MAILBOX_STATUS(index)) != 0) &&
+            (REG32(MAILBOX_IRQENABLE_SET(index)) &
+             MAILBOX_REG_VAL(SUBMBX_IDX(index)))) {
+            /* call function with arg */
+            table = &(InterruptArp32_module->fxnTable[PROCID(loopIdx)]);
+            (table->func)(table->arg);
+        }
+    }
 }
index 40d5c9a84ceebd2565e3f0e3c8e9b51372851c08..ed7246d07b07fedd95b6dc34c8ee2a5ddd7f76cf 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2014 Texas Instruments Incorporated - http://www.ti.com
+ * Copyright (c) 2012-2013, Texas Instruments Incorporated
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-
 /*
  *  ======== InterruptArp32.xdc ========
+ *
  */
-package ti.sdo.ipc.family.vayu;
 
 import ti.sdo.utils.MultiProc;
 
@@ -41,6 +40,7 @@ import ti.sdo.utils.MultiProc;
  *  ======== InterruptArp32 ========
  *  ARP32 based interrupt manager
  */
+
 module InterruptArp32 inherits ti.sdo.ipc.notifyDrivers.IInterrupt
 {
     /* Total number of cores on Vayu SoC */
@@ -58,8 +58,6 @@ module InterruptArp32 inherits ti.sdo.ipc.notifyDrivers.IInterrupt
     /* Base address for the Mailbox subsystem */
     config UInt32 mailboxBaseAddr[NUM_EVE_MBX + NUM_SYS_MBX];
 
-internal:
-
     /*
      * Mailbox table for storing encoded Base Address, mailbox user Id,
      * and sub-mailbox index.
@@ -70,6 +68,8 @@ internal:
 
     config UInt32 procIdTable[NUM_CORES];
 
+internal:
+
     /*! Statically retrieve procIds to avoid doing this at runtime */
     config UInt eve1ProcId     = MultiProc.INVALIDID;
     config UInt eve2ProcId     = MultiProc.INVALIDID;
@@ -90,14 +90,14 @@ internal:
     }
 
     /*! Stub to be plugged for dsp-arp32 interrupts */
-    Void intShmStub(UInt16 idx);
+    Void intShmStub(UArg arg);
 
     struct Module_State {
-
-        /*  Interrupt isr dispatch table. This table is indexed
-         *  by virtual processor ID.
+        /*
+         * Create a function table of length 8 (Total number of cores in the
+         * System) for each EVE core.
          */
-        FxnTable fxnTable[NUM_CORES];
+        FxnTable   fxnTable[NUM_CORES];
 
         /*
          * numPlugged is used to track number of times the interrupt was
index 66e250f52cfd69785dba99912806e06ec5800475..8716ecba0f95ae75adc3d2634330e98b49db2a83 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2014 Texas Instruments Incorporated - http://www.ti.com
+ * Copyright (c) 2012-2013, Texas Instruments Incorporated
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-
 /*
  *  ======== InterruptArp32.xs ========
+ *
  */
-var InterruptArp32 = null;
+
+var Hwi         = null;
+var Core        = null;
+var MultiProc   = null;
+var InterruptArp32       = null;
 
 /*
  *  ======== module$use ========
  */
 function module$use()
 {
-    var TableInit = xdc.useModule("ti.sdo.ipc.family.vayu.TableInit");
-    var MultiProc = xdc.useModule("ti.sdo.utils.MultiProc");
-    InterruptArp32 = this;
-
-    xdc.useModule('xdc.runtime.Assert');
-    xdc.useModule('xdc.runtime.Error');
-    xdc.useModule("ti.sysbios.family.arp32.Hwi");
-    xdc.useModule("ti.sdo.ipc.Ipc");
-    xdc.useModule('ti.sdo.ipc.family.vayu.NotifySetup');
-    xdc.useModule('ti.sdo.ipc.notifyDrivers.IInterrupt');
+    Hwi              = xdc.useModule("ti.sysbios.family.arp32.Hwi");
+    MultiProc        = xdc.useModule("ti.sdo.utils.MultiProc");
+    Ipc              = xdc.useModule("ti.sdo.ipc.Ipc");
+    InterruptArp32   = xdc.useModule("ti.sdo.ipc.family.vayu.InterruptArp32");
+    TableInit        = xdc.useModule("ti.sdo.ipc.family.vayu.TableInit");
 
     /* Initialize procIdTable */
     TableInit.initProcId(InterruptArp32);
@@ -105,7 +104,7 @@ function module$use()
     /*
      * In case of a spec change, follow the process shown below:
      * 1. Update the mailboxBaseAddr Table.
-     * 2. Update the eveInterruptTable.
+     * 2. Update the dspInterruptTable.
      * 3. Update Virtual Index assignment.
      * 4. Update NUMCORES, NUMEVES and EVEMBX2BASEIDX variables
      *    in order to correctly intialize the mailboxTable.
@@ -116,16 +115,17 @@ function module$use()
  *  ======== module$static$init ========
  *  Initialize module values.
  */
-function module$static$init(state, mod)
+function module$static$init(mod, params)
 {
-    var i;
+    var idx;
+    var remoteProcId;
 
-    for (i = 0; i < mod.procIdTable.length; i++) {
-        state.fxnTable[i].func  = null;
-        state.fxnTable[i].arg   = 0;
+    for (remoteProcId=0; remoteProcId < InterruptArp32.procIdTable.length; remoteProcId++) {
+        mod.fxnTable[remoteProcId].func  = null;
+        mod.fxnTable[remoteProcId].arg   = 0;
     }
 
-    for (i = 0; i < (mod.NUM_EVE_MBX/mod.NUM_EVES); i++) {
-        state.numPlugged[i] = 0;
+    for (idx = 0; idx < (InterruptArp32.NUM_EVE_MBX/InterruptArp32.NUM_EVES); idx++) {
+        mod.numPlugged[idx] = 0;
     }
 }
index 907f85c9d0f21376a23f9940579ef2bc30a86110..560083b1bb566ff0654cbaf5ade67cc84d4c5f87 100644 (file)
@@ -29,7 +29,6 @@
  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-
 /*
  *  ======== InterruptDsp.c ========
  *  Mailbox based interrupt manager
 #include <xdc/std.h>
 #include <xdc/runtime/Assert.h>
 #include <xdc/runtime/Startup.h>
+#include <xdc/runtime/System.h>
 
-#include <ti/sysbios/family/c64p/EventCombiner.h>
 #include <ti/sysbios/family/c64p/Hwi.h>
+#include <ti/sysbios/family/c64p/EventCombiner.h>
 #include <ti/sysbios/family/shared/vayu/IntXbar.h>
 
 #include <ti/sdo/ipc/_Ipc.h>
@@ -242,7 +242,7 @@ Void InterruptDsp_intUnregister(UInt16 remoteProcId,
 
     index = PROCID(remoteProcId);
 
-    /* disable the mailbox interrupt source */
+    /* Disable the mailbox interrupt source */
     InterruptDsp_intDisable(remoteProcId, intInfo);
 
     /* unplug isr and unprogram the event dispatcher */
index 787964c5a980530682edcddf02f0c6cf8cd5cecb..65a9b41b4f1236aa8152647a7352e06296c691c7 100644 (file)
@@ -33,6 +33,7 @@
 /*
  *  ======== InterruptDsp.xs ========
  */
+
 var InterruptDsp = null;
 
 /*
@@ -40,18 +41,12 @@ var InterruptDsp = null;
  */
 function module$use()
 {
-    /* load modules needed in meta domain and in target domain */
     var TableInit = xdc.useModule("ti.sdo.ipc.family.vayu.TableInit");
     InterruptDsp = this;
-    xdc.useModule('xdc.runtime.Assert');
-    xdc.useModule('xdc.runtime.Startup');
-    xdc.useModule('ti.sysbios.family.c64p.EventCombiner');
-    xdc.useModule('ti.sysbios.family.c64p.Hwi');
-    xdc.useModule('ti.sysbios.family.shared.vayu.IntXbar');
-    xdc.useModule('ti.sdo.ipc.Ipc');
-    xdc.useModule('ti.sdo.ipc.family.vayu.NotifySetup');
-    xdc.useModule('ti.sdo.ipc.notifyDrivers.IInterrupt');
-    xdc.useModule('ti.sdo.utils.MultiProc');
+    xdc.useModule("ti.sysbios.family.c64p.EventCombiner");
+    xdc.useModule("ti.sysbios.family.c64p.Hwi");
+    xdc.useModule("ti.sysbios.family.shared.vayu.IntXbar");
+    xdc.useModule("ti.sdo.ipc.Ipc");
 
     /* Initialize procIdTable */
     TableInit.initProcId(InterruptDsp);
index aa63a36609903593e27a0742d778f7e7e08da611..987500ae220f6a07737044e25fb5efdc08403546 100644 (file)
@@ -33,6 +33,7 @@
 /*
  *  ======== NotifyDriverMbx.c ========
  */
+
 #include <xdc/std.h>
 #include <xdc/runtime/Assert.h>
 #include <xdc/runtime/Startup.h>
  */
 Int NotifyDriverMbx_Module_startup(Int phase)
 {
-#if defined(xdc_target__isaCompatible_64P)
-
+#if defined(xdc_target__isaCompatible_64)
     extern cregister volatile UInt DNUM;
 
     if (IntXbar_Module_startupDone()) {
@@ -180,27 +180,12 @@ Int NotifyDriverMbx_Module_startup(Int phase)
         }
         return (Startup_DONE);
     }
-
-    return (Startup_NOTDONE);
-
-#elif defined(xdc_target__isaCompatible_arp32)
-
-    /* nothing to do on this processor */
-    return (Startup_DONE);
-
 #elif defined(xdc_target__isaCompatible_v7M)
 
-    /* TODO */
-    return (Startup_DONE);
-
-#elif defined(xdc_target__isaCompatible_v7A)
-
-    /* TODO */
-    return (Startup_DONE);
-
 #else
-#error Invalid target
+
 #endif
+    return (Startup_NOTDONE);
 }
 
 /*
@@ -219,11 +204,14 @@ Void NotifyDriverMbx_Instance_init(NotifyDriverMbx_Object *obj,
     UInt16      selfVirtId;
     UInt16      index;
 
+    /*
+     * Check whether remote proc ID has been set and isn't the same as the
+     * local proc ID
+     */
     Assert_isTrue((params->remoteProcId != MultiProc_INVALIDID) &&
             (params->remoteProcId != MultiProc_self()),
             ti_sdo_ipc_Ipc_A_invParam);
 
-    /* TODO: this check is weak */
     if (params->remoteProcId >= MultiProc_getNumProcessors() ||
         params->remoteProcId == MultiProc_INVALIDID) {
         return;    /* keep Coverity happy */
@@ -241,7 +229,7 @@ Void NotifyDriverMbx_Instance_init(NotifyDriverMbx_Object *obj,
     /* clear mailbox of any old messages */
     selfVirtId = PROCID(MultiProc_self());
     index = (selfVirtId * NotifyDriverMbx_NUM_CORES) + obj->remoteVirtId;
-    MAILBOX_INIT(index);
+    MAILBOX_INIT(index)
 
     /* must use processor virtual ID to store driver handle in table */
     NotifyDriverMbx_module->drvHandles[obj->remoteVirtId] = obj;
@@ -253,7 +241,7 @@ Void NotifyDriverMbx_Instance_init(NotifyDriverMbx_Object *obj,
     /* enable the mailbox interrupt from the remote core */
     NotifyDriverMbx_enable(obj);
 
-    /* restore global interrupts */
+    /* Restore global interrupts */
     Hwi_restore(key);
 }
 
@@ -370,51 +358,53 @@ Int NotifyDriverMbx_sendEvent(NotifyDriverMbx_Object *obj, UInt32 eventId,
         numMsgs = 2;
     }
 
-#if defined(xdc_target__isaCompatible_64P) || \
-    defined(xdc_target__isaCompatible_arp32)
-
+#if defined(xdc_target__isaCompatible_64)
     index = (selfVirtId * NotifyDriverMbx_NUM_CORES) + obj->remoteVirtId;
     PUT_NOTIFICATION(index);
 
 #elif defined(xdc_target__isaCompatible_v7M)
 
-//  if (!(BIOS_smpEnabled) && (Core_getId())) {
-//      if (remoteProcId == NotifyDriverMbx_dspProcId) {
-//          PUT_NOTIFICATION(VPSS_TO_DSP)
-//      }
-//      else if (remoteProcId == NotifyDriverMbx_hostProcId) {
-//          PUT_NOTIFICATION(VPSS_TO_HOST)
-//      }
-//      else {
-//          PUT_NOTIFICATION(VPSS_TO_VIDEO)
-//      }
-//  }
-//  else {
-//      if (remoteProcId == NotifyDriverMbx_dspProcId) {
-//          PUT_NOTIFICATION(VIDEO_TO_DSP)
-//      }
-//      else if (remoteProcId == NotifyDriverMbx_hostProcId) {
-//          PUT_NOTIFICATION(VIDEO_TO_HOST)
-//      }
-//      else {
-//          PUT_NOTIFICATION(VIDEO_TO_VPSS)
-//      }
-//  }
-
-#elif defined(xdc_target__isaCompatible_v7A)
-
-//  if (remoteProcId == NotifyDriverMbx_dspProcId) {
-//      PUT_NOTIFICATION(HOST_TO_DSP)
-//  }
-//  else if (remoteProcId == NotifyDriverMbx_videoProcId) {
-//      PUT_NOTIFICATION(HOST_TO_VIDEO)
-//  }
-//  else {
-//      PUT_NOTIFICATION(HOST_TO_VPSS)
-//  }
+#if 0
+    if (!(BIOS_smpEnabled) && (Core_getId())) {
+        if (remoteProcId == NotifyDriverMbx_dspProcId) {
+            PUT_NOTIFICATION(VPSS_TO_DSP)
+        }
+        else if (remoteProcId == NotifyDriverMbx_hostProcId) {
+            PUT_NOTIFICATION(VPSS_TO_HOST)
+        }
+        else {
+            PUT_NOTIFICATION(VPSS_TO_VIDEO)
+        }
+    }
+    else {
+        if (remoteProcId == NotifyDriverMbx_dspProcId) {
+            PUT_NOTIFICATION(VIDEO_TO_DSP)
+        }
+        else if (remoteProcId == NotifyDriverMbx_hostProcId) {
+            PUT_NOTIFICATION(VIDEO_TO_HOST)
+        }
+        else {
+            PUT_NOTIFICATION(VIDEO_TO_VPSS)
+        }
+    }
+
+#endif
 
 #else
-#error Invalid target
+
+#if 0
+    if (remoteProcId == NotifyDriverMbx_dspProcId) {
+        PUT_NOTIFICATION(HOST_TO_DSP)
+    }
+    else if (remoteProcId == NotifyDriverMbx_videoProcId) {
+        PUT_NOTIFICATION(HOST_TO_VIDEO)
+    }
+    else {
+        PUT_NOTIFICATION(HOST_TO_VPSS)
+    }
+
+#endif
+
 #endif
 
     return (Notify_S_SUCCESS);
@@ -428,51 +418,51 @@ Void NotifyDriverMbx_disable(NotifyDriverMbx_Object *obj)
     UInt16 selfVirtId = PROCID(MultiProc_self());
     UInt16 index;
 
-#if defined(xdc_target__isaCompatible_64P) || \
-    defined(xdc_target__isaCompatible_arp32)
-
+#if defined(xdc_target__isaCompatible_64)
     index = (obj->remoteVirtId * NotifyDriverMbx_NUM_CORES) + selfVirtId;
     REG32(MAILBOX_IRQENABLE_CLR(index)) = MAILBOX_REG_VAL(SUBMBX_IDX(index));
 
 #elif defined(xdc_target__isaCompatible_v7M)
 
-//  if (!(BIOS_smpEnabled) && (Core_getId())) {
-//      if (remoteProcId == NotifyDriverMbx_hostProcId) {
-//          REG32(MAILBOX_IRQENABLE_CLR_VPSS) = MAILBOX_REG_VAL(HOST_TO_VPSS);
-//      }
-//      else if (remoteProcId == NotifyDriverMbx_dspProcId) {
-//          REG32(MAILBOX_IRQENABLE_CLR_VPSS) = MAILBOX_REG_VAL(DSP_TO_VPSS);
-//      }
-//      else {
-//          REG32(MAILBOX_IRQENABLE_CLR_VPSS) = MAILBOX_REG_VAL(VIDEO_TO_VPSS);
-//      }
-//  }
-//  else {
-//      if (remoteProcId == NotifyDriverMbx_hostProcId) {
-//          REG32(MAILBOX_IRQENABLE_CLR_VIDEO) = MAILBOX_REG_VAL(HOST_TO_VIDEO);
-//      }
-//      else if (remoteProcId == NotifyDriverMbx_dspProcId) {
-//          REG32(MAILBOX_IRQENABLE_CLR_VIDEO) = MAILBOX_REG_VAL(DSP_TO_VIDEO);
-//      }
-//      else {
-//          REG32(MAILBOX_IRQENABLE_CLR_VIDEO) = MAILBOX_REG_VAL(VPSS_TO_VIDEO);
-//      }
-//  }
-
-#elif defined(xdc_target__isaCompatible_v7A)
-
-//  if (remoteProcId == NotifyDriverMbx_dspProcId) {
-//      REG32(MAILBOX_IRQENABLE_CLR_HOST) = MAILBOX_REG_VAL(DSP_TO_HOST);
-//  }
-//  else if (remoteProcId == NotifyDriverMbx_videoProcId) {
-//      REG32(MAILBOX_IRQENABLE_CLR_HOST) = MAILBOX_REG_VAL(VIDEO_TO_HOST);
-//  }
-//  else {
-//      REG32(MAILBOX_IRQENABLE_CLR_HOST) = MAILBOX_REG_VAL(VPSS_TO_HOST);
-//  }
+#if 0
+    if (!(BIOS_smpEnabled) && (Core_getId())) {
+        if (remoteProcId == NotifyDriverMbx_hostProcId) {
+            REG32(MAILBOX_IRQENABLE_CLR_VPSS) = MAILBOX_REG_VAL(HOST_TO_VPSS);
+        }
+        else if (remoteProcId == NotifyDriverMbx_dspProcId) {
+            REG32(MAILBOX_IRQENABLE_CLR_VPSS) = MAILBOX_REG_VAL(DSP_TO_VPSS);
+        }
+        else {
+            REG32(MAILBOX_IRQENABLE_CLR_VPSS) = MAILBOX_REG_VAL(VIDEO_TO_VPSS);
+        }
+    }
+    else {
+        if (remoteProcId == NotifyDriverMbx_hostProcId) {
+            REG32(MAILBOX_IRQENABLE_CLR_VIDEO) = MAILBOX_REG_VAL(HOST_TO_VIDEO);
+        }
+        else if (remoteProcId == NotifyDriverMbx_dspProcId) {
+            REG32(MAILBOX_IRQENABLE_CLR_VIDEO) = MAILBOX_REG_VAL(DSP_TO_VIDEO);
+        }
+        else {
+            REG32(MAILBOX_IRQENABLE_CLR_VIDEO) = MAILBOX_REG_VAL(VPSS_TO_VIDEO);
+        }
+    }
+#endif
 
 #else
-#error Invalid target
+
+#if 0
+    if (remoteProcId == NotifyDriverMbx_dspProcId) {
+        REG32(MAILBOX_IRQENABLE_CLR_HOST) = MAILBOX_REG_VAL(DSP_TO_HOST);
+    }
+    else if (remoteProcId == NotifyDriverMbx_videoProcId) {
+        REG32(MAILBOX_IRQENABLE_CLR_HOST) = MAILBOX_REG_VAL(VIDEO_TO_HOST);
+    }
+    else {
+        REG32(MAILBOX_IRQENABLE_CLR_HOST) = MAILBOX_REG_VAL(VPSS_TO_HOST);
+    }
+#endif
+
 #endif
 }
 
@@ -484,51 +474,51 @@ Void NotifyDriverMbx_enable(NotifyDriverMbx_Object *obj)
     UInt16 selfVirtId = PROCID(MultiProc_self());
     UInt16 index;
 
-#if defined(xdc_target__isaCompatible_64P) || \
-    defined(xdc_target__isaCompatible_arp32)
-
+#if defined(xdc_target__isaCompatible_64)
     index = (obj->remoteVirtId * NotifyDriverMbx_NUM_CORES) + selfVirtId;
     REG32(MAILBOX_IRQENABLE_SET(index)) = MAILBOX_REG_VAL(SUBMBX_IDX(index));
 
 #elif defined(xdc_target__isaCompatible_v7M)
 
-//  if (!(BIOS_smpEnabled) && (Core_getId())) {
-//      if (remoteProcId == NotifyDriverMbx_hostProcId) {
-//          REG32(MAILBOX_IRQENABLE_SET_VPSS) = MAILBOX_REG_VAL(HOST_TO_VPSS);
-//      }
-//      else if (remoteProcId == NotifyDriverMbx_dspProcId) {
-//          REG32(MAILBOX_IRQENABLE_SET_VPSS) = MAILBOX_REG_VAL(DSP_TO_VPSS);
-//      }
-//      else {
-//          REG32(MAILBOX_IRQENABLE_SET_VPSS) = MAILBOX_REG_VAL(VIDEO_TO_VPSS);
-//      }
-//  }
-//  else {
-//      if (remoteProcId == NotifyDriverMbx_hostProcId) {
-//          REG32(MAILBOX_IRQENABLE_SET_VIDEO) = MAILBOX_REG_VAL(HOST_TO_VIDEO);
-//      }
-//      else if (remoteProcId == NotifyDriverMbx_dspProcId) {
-//          REG32(MAILBOX_IRQENABLE_SET_VIDEO) = MAILBOX_REG_VAL(DSP_TO_VIDEO);
-//      }
-//      else {
-//          REG32(MAILBOX_IRQENABLE_SET_VIDEO) = MAILBOX_REG_VAL(VPSS_TO_VIDEO);
-//      }
-//  }
-
-#elif defined(xdc_target__isaCompatible_v7A)
-
-//  if (remoteProcId == NotifyDriverMbx_dspProcId) {
-//      REG32(MAILBOX_IRQENABLE_SET_HOST) = MAILBOX_REG_VAL(DSP_TO_HOST);
-//  }
-//  else if (remoteProcId == NotifyDriverMbx_videoProcId) {
-//      REG32(MAILBOX_IRQENABLE_SET_HOST) = MAILBOX_REG_VAL(VIDEO_TO_HOST);
-//  }
-//  else {
-//      REG32(MAILBOX_IRQENABLE_SET_HOST) = MAILBOX_REG_VAL(VPSS_TO_HOST);
-//  }
+#if 0
+    if (!(BIOS_smpEnabled) && (Core_getId())) {
+        if (remoteProcId == NotifyDriverMbx_hostProcId) {
+            REG32(MAILBOX_IRQENABLE_SET_VPSS) = MAILBOX_REG_VAL(HOST_TO_VPSS);
+        }
+        else if (remoteProcId == NotifyDriverMbx_dspProcId) {
+            REG32(MAILBOX_IRQENABLE_SET_VPSS) = MAILBOX_REG_VAL(DSP_TO_VPSS);
+        }
+        else {
+            REG32(MAILBOX_IRQENABLE_SET_VPSS) = MAILBOX_REG_VAL(VIDEO_TO_VPSS);
+        }
+    }
+    else {
+        if (remoteProcId == NotifyDriverMbx_hostProcId) {
+            REG32(MAILBOX_IRQENABLE_SET_VIDEO) = MAILBOX_REG_VAL(HOST_TO_VIDEO);
+        }
+        else if (remoteProcId == NotifyDriverMbx_dspProcId) {
+            REG32(MAILBOX_IRQENABLE_SET_VIDEO) = MAILBOX_REG_VAL(DSP_TO_VIDEO);
+        }
+        else {
+            REG32(MAILBOX_IRQENABLE_SET_VIDEO) = MAILBOX_REG_VAL(VPSS_TO_VIDEO);
+        }
+    }
+#endif
 
 #else
-#error Invalid target
+
+#if 0
+    if (remoteProcId == NotifyDriverMbx_dspProcId) {
+        REG32(MAILBOX_IRQENABLE_SET_HOST) = MAILBOX_REG_VAL(DSP_TO_HOST);
+    }
+    else if (remoteProcId == NotifyDriverMbx_videoProcId) {
+        REG32(MAILBOX_IRQENABLE_SET_HOST) = MAILBOX_REG_VAL(VIDEO_TO_HOST);
+    }
+    else {
+        REG32(MAILBOX_IRQENABLE_SET_HOST) = MAILBOX_REG_VAL(VPSS_TO_HOST);
+    }
+#endif
+
 #endif
 }
 
@@ -592,9 +582,7 @@ Void NotifyDriverMbx_isr(UInt16 idx)
     UInt32 msg, payload;
     UInt16 eventId;
 
-#if defined(xdc_target__isaCompatible_64P) || \
-    defined(xdc_target__isaCompatible_arp32)
-
+#if defined(xdc_target__isaCompatible_64)
     UInt16 srcVirtId;
 
     srcVirtId = idx / NotifyDriverMbx_NUM_CORES;
@@ -602,33 +590,35 @@ Void NotifyDriverMbx_isr(UInt16 idx)
 
 #elif defined(xdc_target__isaCompatible_v7M)
 
-//  do {
-//      numProcessed = 0;
-//      if (!(BIOS_smpEnabled) && (Core_getId())) {
-//          GET_NOTIFICATION(VPSS, HOST)
-//          GET_NOTIFICATION(VPSS, DSP)
-//          GET_NOTIFICATION(VPSS, VIDEO)
-//      }
-//      else {
-//          GET_NOTIFICATION(VIDEO, HOST)
-//          GET_NOTIFICATION(VIDEO, DSP)
-//          GET_NOTIFICATION(VIDEO, VPSS)
-//      }
-//  }
-//  while (numProcessed != 0);
-
-#elif defined(xdc_target__isaCompatible_v7A)
-
-//  do {
-//      numProcessed = 0;
-//      GET_NOTIFICATION(HOST, DSP)
-//      GET_NOTIFICATION(HOST, VPSS)
-//      GET_NOTIFICATION(HOST, VIDEO)
-//  }
-//  while (numProcessed != 0);
+#if 0
+    do {
+        numProcessed = 0;
+        if (!(BIOS_smpEnabled) && (Core_getId())) {
+            GET_NOTIFICATION(VPSS, HOST)
+            GET_NOTIFICATION(VPSS, DSP)
+            GET_NOTIFICATION(VPSS, VIDEO)
+        }
+        else {
+            GET_NOTIFICATION(VIDEO, HOST)
+            GET_NOTIFICATION(VIDEO, DSP)
+            GET_NOTIFICATION(VIDEO, VPSS)
+        }
+    }
+    while (numProcessed != 0);
+#endif
 
 #else
-#error Invalid target
+
+#if 0
+    do {
+        numProcessed = 0;
+        GET_NOTIFICATION(HOST, DSP)
+        GET_NOTIFICATION(HOST, VPSS)
+        GET_NOTIFICATION(HOST, VIDEO)
+    }
+    while (numProcessed != 0);
+#endif
+
 #endif
 }
 
index 3fe0be765c227cb05a3230416896b2a8bed296e7..f6b4d8e4d92e52741a7cd5a7a9b11f127c0fc457 100644 (file)
@@ -81,15 +81,9 @@ module NotifyDriverMbx inherits ti.sdo.ipc.interfaces.INotifyDriver
     /*! @_nodoc */
     metaonly struct BasicView {
         String      remoteProc;
-    }
-
-    /*! @_nodoc */
-    metaonly struct MailboxView {
-        String      direction;
         String      mailboxAddr;
         Int         subMbxId;
-        Int         msgCount;
-        Int         mbxInterrupt;
+        Int         count;
     }
 
     /*!  @_nodoc */
@@ -111,13 +105,6 @@ module NotifyDriverMbx inherits ti.sdo.ipc.interfaces.INotifyDriver
                         viewInitFxn: 'viewInitBasic',
                         structName: 'BasicView'
                     }
-                ],
-                ['Mailbox',
-                    {
-                        type: ViewInfo.INSTANCE_DATA,
-                        viewInitFxn: 'viewInitMailbox',
-                        structName: 'MailboxView'
-                    }
                 ]
 //              ['Module',
 //                  {
index 510ef86f76ee9633e39d8a0c75363fb1c2b99271..be8251d7146d38ed46309beb8b90514b79419519 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2014 Texas Instruments Incorporated - http://www.ti.com
+ * Copyright (c) 2012-2014, Texas Instruments Incorporated
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
 /*
  *  ======== NotifyDriverMbx.xs ================
  */
+
 var NotifyDriverMbx = null;
 var Core = null;
-var isaChain = "";
 
 /*
  *  ======== module$use ========
  */
 function module$use()
 {
-    /* load modules needed in meta domain and in target domain */
     var TableInit = xdc.useModule("ti.sdo.ipc.family.vayu.TableInit");
-    var MultiProc = xdc.useModule("ti.sdo.utils.MultiProc");
+
     NotifyDriverMbx = this;
-    xdc.useModule('xdc.runtime.Assert');
-    xdc.useModule('xdc.runtime.Error');
-    xdc.useModule('xdc.runtime.Startup');
-    xdc.useModule("ti.sysbios.BIOS");
 
-    /* concatinate isa chain into single string for easier matching */
-    isaChain = "#" + Program.build.target.getISAChain().join("#") + "#";
+    xdc.useModule("ti.sysbios.family.shared.vayu.IntXbar");
+    xdc.useModule("ti.sysbios.family.c64p.EventCombiner");
+    xdc.useModule("ti.sysbios.family.c64p.Hwi");
+    xdc.useModule("ti.sdo.ipc.Notify");
+    xdc.useModule("ti.sdo.utils.MultiProc");
 
-    if (isaChain.match(/#64P#/)) {
-        xdc.useModule("ti.sysbios.family.c64p.EventCombiner");
-        xdc.useModule("ti.sysbios.family.c64p.Hwi");
-        xdc.useModule("ti.sysbios.family.shared.vayu.IntXbar");
-    }
-    else if (isaChain.match(/#arp32#/)) {
-        xdc.useModule('ti.sysbios.family.arp32.Hwi');
-    }
-    else if (isaChain.match(/#v7M#/)) {
+    if (Program.build.target.$name.match(/M3/)) {
         Core = xdc.useModule("ti.sysbios.family.arm.ducati.Core");
     }
 
-    xdc.useModule('ti.sdo.ipc.Ipc');
-    xdc.useModule("ti.sdo.ipc.Notify");
-    xdc.useModule('ti.sdo.ipc.family.vayu.NotifySetup');
-    xdc.useModule('ti.sdo.ipc.interfaces.INotifyDriver');
-
     /* initialize procIdTable */
-    TableInit.initProcId(this);
+    TableInit.initProcId(NotifyDriverMbx);
 
     /* Initialize mailboxTable */
-    TableInit.generateTable(this);
-
-    if (isaChain.match(/#64P#|#v7M#|#v7A#/)) {
-        /* initialize mailbox base address table */
-        this.mailboxBaseAddr[0]  = 0x4208B000;  /* EVE1 Internal Mailbox 0 */
-        this.mailboxBaseAddr[1]  = 0x4208C000;  /* EVE1 Internal Mailbox 1 */
-        this.mailboxBaseAddr[2]  = 0x4208D000;  /* EVE1 Internal Mailbox 2 */
-        this.mailboxBaseAddr[3]  = 0x4218B000;  /* EVE2 Internal Mailbox 0 */
-        this.mailboxBaseAddr[4]  = 0x4218C000;  /* EVE2 Internal Mailbox 1 */
-        this.mailboxBaseAddr[5]  = 0x4218D000;  /* EVE2 Internal Mailbox 2 */
-        this.mailboxBaseAddr[6]  = 0x4228B000;  /* EVE3 Internal Mailbox 0 */
-        this.mailboxBaseAddr[7]  = 0x4228C000;  /* EVE3 Internal Mailbox 1 */
-        this.mailboxBaseAddr[8]  = 0x4228D000;  /* EVE3 Internal Mailbox 2 */
-        this.mailboxBaseAddr[9]  = 0x4238B000;  /* EVE4 Internal Mailbox 0 */
-        this.mailboxBaseAddr[10] = 0x4238C000;  /* EVE4 Internal Mailbox 1 */
-        this.mailboxBaseAddr[11] = 0x4238D000;  /* EVE4 Internal Mailbox 2 */
-        this.mailboxBaseAddr[12] = 0x48840000;  /* System Mailbox 5 */
-        this.mailboxBaseAddr[13] = 0x48842000;  /* System Mailbox 6 */
-        this.mailboxBaseAddr[14] = 0x48844000;  /* System Mailbox 7 */
-        this.mailboxBaseAddr[15] = 0x48846000;  /* System Mailbox 8 */
-    }
-    else if (isaChain.match(/#arp32#/)) {
-        this.mailboxBaseAddr[0]  = 0x4008B000;  /* EVE1 Internal Mailbox 0 */
-        this.mailboxBaseAddr[1]  = 0x4008C000;  /* EVE1 Internal Mailbox 1 */
-        this.mailboxBaseAddr[2]  = 0x4208D000;  /* EVE1 Internal Mailbox 2 */
-        this.mailboxBaseAddr[3]  = 0x4008B000;  /* EVE2 Internal Mailbox 0 */
-        this.mailboxBaseAddr[4]  = 0x4008C000;  /* EVE2 Internal Mailbox 1 */
-        this.mailboxBaseAddr[5]  = 0x4218D000;  /* EVE2 Internal Mailbox 2 */
-        this.mailboxBaseAddr[6]  = 0x4008B000;  /* EVE3 Internal Mailbox 0 */
-        this.mailboxBaseAddr[7]  = 0x4008C000;  /* EVE3 Internal Mailbox 1 */
-        this.mailboxBaseAddr[8]  = 0x4228D000;  /* EVE3 Internal Mailbox 2 */
-        this.mailboxBaseAddr[9]  = 0x4008B000;  /* EVE4 Internal Mailbox 0 */
-        this.mailboxBaseAddr[10] = 0x4008C000;  /* EVE4 Internal Mailbox 1 */
-        this.mailboxBaseAddr[11] = 0x4238D000;  /* EVE4 Internal Mailbox 2 */
-        this.mailboxBaseAddr[12] = 0x48840000;  /* System Mailbox 5 */
-        this.mailboxBaseAddr[13] = 0x48842000;  /* System Mailbox 6 */
-        this.mailboxBaseAddr[14] = 0x48844000;  /* System Mailbox 7 */
-        this.mailboxBaseAddr[15] = 0x48846000;  /* System Mailbox 8 */
-
-        /* each EVE receives its message using the local mailbox address */
-        if (MultiProc.id == this.eve1ProcId) {
-            this.mailboxBaseAddr[2] = 0x4008D000;
-        }
-        else if (MultiProc.id == this.eve2ProcId) {
-            this.mailboxBaseAddr[5] = 0x4008D000;
-        }
-        else if (MultiProc.id == this.eve3ProcId) {
-            this.mailboxBaseAddr[8] = 0x4008D000;
-        }
-        else if (MultiProc.id == this.eve4ProcId) {
-            this.mailboxBaseAddr[11] = 0x4008D000;
-        }
-    }
-    else {
-        throw("Invalid target: " + Program.build.target.$name);
-    }
+    TableInit.generateTable(NotifyDriverMbx);
+
+    /* Initialize mailbox base address table */
+    this.mailboxBaseAddr[0]  = 0x4208B000;  /* EVE1 Internal Mailbox 0 */
+    this.mailboxBaseAddr[1]  = 0x4208C000;  /* EVE1 Internal Mailbox 1 */
+    this.mailboxBaseAddr[2]  = 0x4208D000;  /* EVE1 Internal Mailbox 2 */
+    this.mailboxBaseAddr[3]  = 0x4218B000;  /* EVE2 Internal Mailbox 0 */
+    this.mailboxBaseAddr[4]  = 0x4218C000;  /* EVE2 Internal Mailbox 1 */
+    this.mailboxBaseAddr[5]  = 0x4218D000;  /* EVE2 Internal Mailbox 2 */
+    this.mailboxBaseAddr[6]  = 0x4228B000;  /* EVE3 Internal Mailbox 0 */
+    this.mailboxBaseAddr[7]  = 0x4228C000;  /* EVE3 Internal Mailbox 1 */
+    this.mailboxBaseAddr[8]  = 0x4228D000;  /* EVE3 Internal Mailbox 2 */
+    this.mailboxBaseAddr[9]  = 0x4238B000;  /* EVE4 Internal Mailbox 0 */
+    this.mailboxBaseAddr[10] = 0x4238C000;  /* EVE4 Internal Mailbox 1 */
+    this.mailboxBaseAddr[11] = 0x4238D000;  /* EVE4 Internal Mailbox 2 */
+    this.mailboxBaseAddr[12] = 0x48840000;  /* System Mailbox 5 */
+    this.mailboxBaseAddr[13] = 0x48842000;  /* System Mailbox 6 */
+    this.mailboxBaseAddr[14] = 0x48844000;  /* System Mailbox 7 */
+    this.mailboxBaseAddr[15] = 0x48846000;  /* System Mailbox 8 */
 }
 
 
@@ -145,7 +93,21 @@ function module$static$init(state, mod)
         state.drvHandles[i] = null;
     }
 
-    if (isaChain.match(/#64P#/)) {
+    /* TODO this code is specific to the DSP, need to add other processors */
+
+
+    if (Program.build.target.$name.match(/M3/)) {
+/* TODO */
+if (0) {
+        if (Core.id == 0) {
+            Hwi.construct(state.hwi, 53, NotifyDriverMbx.isr);
+        }
+        else {
+            Hwi.construct(state.hwi, 54, NotifyDriverMbx.isr);
+        }
+}
+    }
+    else if (Program.build.target.isa == "66") {
         /* interrupt event IDs used by this processor */
         state.interruptTable[0] = 55; /* EVE1 -> DSP1 or DSP2 */
         state.interruptTable[1] = 56; /* EVE2 -> DSP1 or DSP2 */
@@ -161,32 +123,11 @@ function module$static$init(state, mod)
         state.interruptTable[9] = 0; /* IPU1-1 -> DSP1 or DSP2 */
         state.interruptTable[10] = 0; /* IPU2-1 -> DSP1 or DSP2 */
     }
-    else if (isaChain.match(/#arp32#/)) {
-        /* interrupt event IDs used by this processor */
-        state.interruptTable[0] = 60; /* EVE1 - Group1/INTC1 */
-        state.interruptTable[1] = 60; /* EVE2 - Group1/INTC1 */
-        state.interruptTable[2] = 60; /* EVE3 - Group1/INTC1 */
-        state.interruptTable[3] = 60; /* EVE4 - Group1/INTC1 */
-        state.interruptTable[4] = 29; /* DSP1 - Group0/INTC0 */
-        state.interruptTable[5] = 30; /* DSP2 - Group0/INTC0 */
-        state.interruptTable[6] = 29; /* IPU1-0 */
-        state.interruptTable[7] = 30; /* IPU2-0 */
-        state.interruptTable[8] = 29; /* HOST */
-        state.interruptTable[9] = 30; /* IPU1-1 */
-        state.interruptTable[10] = 30; /* IPU2-1 */
-    }
-    else if (isaChain.match(/#v7M#/)) {
-        /* TODO */
-//      if (Core.id == 0) {
-//          Hwi.construct(state.hwi, 53, NotifyDriverMbx.isr);
-//      }
-//      else {
-//          Hwi.construct(state.hwi, 54, NotifyDriverMbx.isr);
-//      }
-    }
-    else if (isaChain.match(/#v7A#/)) {
-        /* TODO */
-//      Hwi.construct(state.hwi, 77, NotifyDriverMbx.isr);
+    else if (Program.build.target.$name.match(/A8/)) {
+/* TODO */
+if (0) {
+        Hwi.construct(state.hwi, 77, NotifyDriverMbx.isr);
+}
     }
     else {
         throw("Invalid target: " + Program.build.target.$name);
@@ -201,109 +142,52 @@ function module$static$init(state, mod)
 
 /*
  *  ======== viewInitBasic ========
- *  Initizalize the 'Basic' ROV view. Called once per instance.
- *
- *  view = instance of 'struct NotifyDriverMbx.BasicView'
  */
 function viewInitBasic(view, obj)
 {
     var Program = xdc.useModule('xdc.rov.Program');
+    var ScalarStructs = xdc.useModule('xdc.rov.support.ScalarStructs');
     var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
+    var modCfg = Program.getModuleConfig(
+            'ti.sdo.ipc.family.vayu.NotifyDriverMbx');
+
+    /* translate the virtual id to a processor id */
+    var remoteProcId = -1;
+
+    for (var i = 0; i < modCfg.procIdTable.length; i++) {
+        if (obj.remoteVirtId == modCfg.procIdTable[i]) {
+            remoteProcId = i;
+            break;
+        }
+    }
 
     /* view.remoteProc */
     try {
-        view.remoteProc = MultiProc.getName$view(obj.remoteProcId);
+        view.remoteProc = MultiProc.getName$view(remoteProcId);
     }
     catch (e) {
         Program.displayError(view, 'remoteProc',
                 "Problem retrieving proc name: " + e);
     }
-}
 
-/*
- *  ======== viewInitMailbox ========
- *  Initizalize the 'Mailbox' ROV view. Called once per instance.
- *
- *  view = instance of 'struct xdc.rov.Program.InstDataView'
- */
-function viewInitMailbox(view, obj)
-{
-    var Program = xdc.useModule('xdc.rov.Program');
-    var ScalarStructs = xdc.useModule('xdc.rov.support.ScalarStructs');
-    var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
-    var modCfg = Program.getModuleConfig(
-            'ti.sdo.ipc.family.vayu.NotifyDriverMbx');
+    /* view.mailboxAddr */
+    var selfVirtId = modCfg.procIdTable[MultiProc.self$view()];
+    var idx = (obj.remoteVirtId * modCfg.NUM_CORES) + selfVirtId;
+    var baseAddrIdx = (modCfg.mailboxTable[idx] >> 16) & 0xFFFF;
+    var mailboxAddr = modCfg.mailboxBaseAddr[baseAddrIdx];
+    view.mailboxAddr = "0x" + Number(mailboxAddr).toString(16);
+
+    /* view.subMbxId */
+    view.subMbxId = modCfg.mailboxTable[idx] & 0xFF;
 
-    /* view.label (use remote processor name) */
+    /* view.count */
     try {
-        view.label = MultiProc.getName$view(obj.remoteProcId);
+        var MAILBOX_STATUS_IN = Program.fetchStruct(
+                ScalarStructs.S_Bits32$fetchDesc,
+                mailboxAddr + 0xC0 + (0x4 * view.subMbxId), false);
+        view.count = MAILBOX_STATUS_IN.elem;
     }
     catch (e) {
-        Program.displayError(view, 'remoteProcId',
-                "Problem retrieving proc name: " + e);
-    }
-
-    /* create an array to hold the instance data table */
-    var dataTable = new Array();
-    var mailbox = ["Inbound", "Outbound"];
-
-    for (var i = 0; i < mailbox.length; i++) {
-
-        /* create the view element */
-        var elem = Program.newViewStruct(
-                'ti.sdo.ipc.family.vayu.NotifyDriverMbx', 'Mailbox');
-
-        /* elem.direction (make a descriptive label) */
-        if (mailbox[i] == "Inbound") {
-            elem.direction = mailbox[i] + " (from " + view.label + ")";
-        }
-        else if (mailbox[i] == "Outbound") {
-            elem.direction = mailbox[i] + " (to " + view.label + ")";
-        }
-        else {
-            throw new Error("invalid mailbox type");
-        }
-
-        /* elem.mailboxAddr */
-        var selfVirtId = modCfg.procIdTable[MultiProc.self$view()];
-        var idx;
-
-        if (mailbox[i] == "Inbound") {
-            idx = (obj.remoteVirtId * modCfg.NUM_CORES) + selfVirtId;
-        }
-        else if (mailbox[i] == "Outbound") {
-            idx = (selfVirtId * modCfg.NUM_CORES) + obj.remoteVirtId;
-        }
-        else {
-            throw new Error("invalid mailbox type");
-        }
-
-        var baseAddrIdx = (modCfg.mailboxTable[idx] >> 16) & 0xFFFF;
-        var mailboxAddr = modCfg.mailboxBaseAddr[baseAddrIdx];
-        elem.mailboxAddr = "0x" + Number(mailboxAddr).toString(16);
-
-        /* elem.subMbxId */
-        elem.subMbxId = modCfg.mailboxTable[idx] & 0xFF;
-
-        /* elem.msgCount */
-        try {
-            var MAILBOX_STATUS_IN = Program.fetchStruct(
-                    ScalarStructs.S_Bits32$fetchDesc,
-                    mailboxAddr + 0xC0 + (0x4 * elem.subMbxId), false);
-            elem.msgCount = MAILBOX_STATUS_IN.elem;
-        }
-        catch (e) {
-            Program.displayError(view, 'msgCount',
-                    "Problem retrieving messsage count: " + e);
-        }
-
-        /* elem.mbxInterrupt */
-        elem.mbxInterrupt = (modCfg.mailboxTable[idx] >> 8) & 0xFF;
-
-        /* add the element to the instance data table */
-        dataTable.push(elem);
+        throw(e);
     }
-
-    /* view.elements */
-    view.elements = dataTable;
 }
index 8a18e9deab9901764b4215040a85b10b6c5453de..2f7710af638c7d005166f7f504a2398c346b9d4e 100644 (file)
 #include <xdc/runtime/Error.h>
 #include <xdc/runtime/Startup.h>
 
-#include <ti/sdo/ipc/Ipc.h>
 #include <ti/sdo/ipc/_Notify.h>
+#include <ti/sdo/ipc/Ipc.h>
 #include <ti/sdo/ipc/family/vayu/NotifyDriverMbx.h>
 #include <ti/sdo/ipc/notifyDrivers/NotifyDriverShm.h>
 #include <ti/sdo/utils/_MultiProc.h>
 
-#if defined(xdc_target__isaCompatible_64P)
-
 #include <ti/sysbios/family/c64p/EventCombiner.h>
 #include <ti/sysbios/family/c64p/Hwi.h>
 #include <ti/sysbios/family/shared/vayu/IntXbar.h>
 
-#elif defined(xdc_target__isaCompatible_arp32)
-
-#include <ti/sysbios/family/arp32/Hwi.h>
-
-#elif defined(xdc_target__isaCompatible_v7M)
-
-#include <ti/sysbios/family/arm/m3/Hwi.h>
-
-#elif defined(xdc_target__isaCompatible_v7A)
-
-#include <ti/sysbios/family/arm/gic/Hwi.h>
-
-#else
-#error Invalid target
-#endif
-
 #include "package/internal/NotifySetup.xdc.h"
 
 
  */
 Int NotifySetup_Module_startup(Int phase)
 {
-#if defined(xdc_target__isaCompatible_64P)
+#if defined(xdc_target__isa_66)
 
     extern cregister volatile UInt DNUM;
 
@@ -165,17 +147,17 @@ Int NotifySetup_Module_startup(Int phase)
 
     return (Startup_NOTDONE);
 
-#elif defined(xdc_target__isaCompatible_arp32)
+#elif defined(xdc_target__isa_arp32)
 
-    /* nothing to do on this processor */
+    /* TODO */
     return (Startup_DONE);
 
-#elif defined(xdc_target__isaCompatible_v7M)
+#elif defined(xdc_target__isa_v7M4)
 
     /* TODO */
     return (Startup_DONE);
 
-#elif defined(xdc_target__isaCompatible_v7A)
+#elif defined(xdc_target__isa_v7A15)
 
     /* TODO */
     return (Startup_DONE);
@@ -237,18 +219,11 @@ NotifySetup_Driver NotifySetup_driverType(UInt16 remoteProcId)
 Void NotifySetup_plugHwi(UInt16 remoteProcId, Int cpuIntrNum,
         NotifySetup_DriverIsr isr)
 {
-    Error_Block eb;
     UInt        key;
     Hwi_Params  hwiParams;
     UInt16      virtId;
     Int         eventId;
-#if defined(xdc_target__isaCompatible_64P)
     UInt        combinedEventId;
-#elif defined(xdc_target__isaCompatible_arp32)
-    UInt        mbxIdx;
-#endif
-
-    Error_init(&eb);
 
     /* disable global interrupts (TODO: should be a gated module) */
     key = Hwi_disable();
@@ -259,16 +234,14 @@ Void NotifySetup_plugHwi(UInt16 remoteProcId, Int cpuIntrNum,
     /* save driver isr in dispatch table */
     NotifySetup_module->isrDispatchTable[virtId] = isr;
 
-#if defined(xdc_target__isaCompatible_64P)
-
     /* program the event dispatcher */
     eventId = NotifySetup_module->interruptTable[virtId];
     EventCombiner_dispatchPlug(eventId, NotifySetup_dispatchIsr, eventId, TRUE);
 
     /* make sure the interrupt is plugged only once */
-    NotifySetup_module->numPlugged[0]++;
+    NotifySetup_module->numPlugged++;
 
-    if (NotifySetup_module->numPlugged[0] == 1) {
+    if (NotifySetup_module->numPlugged == 1) {
         combinedEventId = eventId / EVENT_GROUP_SIZE;
 
         Hwi_Params_init(&hwiParams);
@@ -278,59 +251,11 @@ Void NotifySetup_plugHwi(UInt16 remoteProcId, Int cpuIntrNum,
 
         Hwi_create(cpuIntrNum,
                 &ti_sysbios_family_c64p_EventCombiner_dispatch,
-                &hwiParams, &eb);
-        /* TODO: add error handling */
+                &hwiParams, NULL);
 
         Hwi_enableInterrupt(cpuIntrNum);
     }
 
-#elif defined(xdc_target__isaCompatible_arp32)
-
-    if ((remoteProcId == NotifySetup_dsp1ProcId) ||
-        (remoteProcId == NotifySetup_ipu1_0ProcId) ||
-        (remoteProcId == NotifySetup_hostProcId)) {
-
-        mbxIdx = 0;
-    }
-    else if ((remoteProcId == NotifySetup_dsp2ProcId) ||
-        (remoteProcId == NotifySetup_ipu2_0ProcId) ||
-        (remoteProcId == NotifySetup_ipu1_1ProcId) ||
-        (remoteProcId == NotifySetup_ipu2_1ProcId)) {
-
-        mbxIdx = 1;
-    }
-    else {
-        mbxIdx = 2; /* remote processor must be EVEx */
-    }
-
-    /* make sure the interrupt is plugged only once */
-    NotifySetup_module->numPlugged[mbxIdx]++;
-
-    if (NotifySetup_module->numPlugged[mbxIdx] == 1) {
-        eventId = NotifySetup_module->interruptTable[virtId];
-
-        Hwi_Params_init(&hwiParams);
-        hwiParams.arg = eventId;
-        hwiParams.vectorNum = cpuIntrNum;
-
-        Hwi_create(eventId, NotifySetup_dispatchIsr, &hwiParams, &eb);
-        /* TODO: add error handling */
-
-        Hwi_enableInterrupt(NotifySetup_module->interruptTable[virtId]);
-    }
-
-#elif defined(xdc_target__isaCompatible_v7M)
-
-    /* TODO */
-
-#elif defined(xdc_target__isaCompatible_v7A)
-
-    /* TODO */
-
-#else
-#error Invalid target
-#endif
-
     /* restore global interrupts */
     Hwi_restore(key);
 }
@@ -342,23 +267,17 @@ Void NotifySetup_unplugHwi(UInt16 remoteProcId, Int cpuIntrNum)
 {
     UInt        key;
     Hwi_Handle  hwi;
-#if defined(xdc_target__isaCompatible_64P)
     UInt16      virtId;
     Int         eventId;
-#elif defined(xdc_target__isaCompatible_arp32)
-    UInt        mbxIdx;
-#endif
 
     /* disable global interrupts (TODO: should be a gated module) */
     key = Hwi_disable();
 
-#if defined(xdc_target__isaCompatible_64P)
-
     /* unplug interrupt if last user */
-    NotifySetup_module->numPlugged[0]--;
+    NotifySetup_module->numPlugged--;
 
-    if (NotifySetup_module->numPlugged[0] == 0) {
-        hwi = Hwi_getHandle(cpuIntrNum);
+    if (NotifySetup_module->numPlugged == 0) {
+        hwi= Hwi_getHandle(cpuIntrNum);
         Hwi_delete(&hwi);
     }
 
@@ -367,45 +286,6 @@ Void NotifySetup_unplugHwi(UInt16 remoteProcId, Int cpuIntrNum)
     eventId = NotifySetup_module->interruptTable[virtId];
     EventCombiner_disableEvent(eventId);
 
-#elif defined(xdc_target__isaCompatible_arp32)
-
-    if ((remoteProcId == NotifySetup_dsp1ProcId) ||
-        (remoteProcId == NotifySetup_ipu1_0ProcId) ||
-        (remoteProcId == NotifySetup_hostProcId)) {
-
-        mbxIdx = 0;
-    }
-    else if ((remoteProcId == NotifySetup_dsp2ProcId) ||
-        (remoteProcId == NotifySetup_ipu2_0ProcId) ||
-        (remoteProcId == NotifySetup_ipu1_1ProcId) ||
-        (remoteProcId == NotifySetup_ipu2_1ProcId)) {
-
-        mbxIdx = 1;
-    }
-    else {
-        mbxIdx = 2; /* remote processor must be EVEx */
-    }
-
-    /* unplug interrupt if last user */
-    NotifySetup_module->numPlugged[mbxIdx]--;
-
-    if (NotifySetup_module->numPlugged[0] == 0) {
-        hwi = Hwi_getHandle(cpuIntrNum);
-        Hwi_delete(&hwi);
-    }
-
-#elif defined(xdc_target__isaCompatible_v7M)
-
-    /* TODO */
-
-#elif defined(xdc_target__isaCompatible_v7A)
-
-    /* TODO */
-
-#else
-#error Invalid target
-#endif
-
     /* restore global interrupts */
     Hwi_restore(key);
 }
index 44d3ff2cdab98b320eafb6d913398a7117b435eb..4b5091143826df8e9eac2c1ac98df81e80755c6f 100644 (file)
@@ -192,11 +192,8 @@ internal:
      *  ======== Module_State ========
      */
     struct Module_State {
-        /* interrupt plug counter */
-        UInt16 numPlugged[];
-
-        /* connection array */
-        DrvBind connAry[length];
+        UInt16      numPlugged;         /*! interrupt plug counter */
+        DrvBind     connAry[length];
 
         /*  Interrupt event IDs used to communicate with this processor.
          *  This table is indexed by virtual processor ID.
index 51199528a3dc65d8cc9a89413d109aacd32c79f7..a7dd9f8dba0fc99ea7b0399f5441d4f1f47d57ff 100644 (file)
 
 /*
  *  ======== NotifySetup.xs ========
+ *
  */
 var MultiProc = null;
-var Core = null;
-var isaChain = "";
 
 /*
  *  ======== module$use ========
  */
 function module$use()
 {
-    /* load modules needed in meta domain and in target domain */
     var TableInit = xdc.useModule("ti.sdo.ipc.family.vayu.TableInit");
-    MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
-    xdc.useModule('xdc.runtime.Assert');
-    xdc.useModule('xdc.runtime.Error');
-    xdc.useModule('xdc.runtime.Startup');
 
-    /* concatinate isa chain into single string for easier matching */
-    isaChain = "#" + Program.build.target.getISAChain().join("#") + "#";
-
-    if (isaChain.match(/#64P#/)) {
-        xdc.useModule('ti.sysbios.family.c64p.EventCombiner');
-        xdc.useModule('ti.sysbios.family.c64p.Hwi');
-        xdc.useModule('ti.sysbios.family.shared.vayu.IntXbar');
-    }
-    else if (isaChain.match(/#arp32#/)) {
-        xdc.useModule('ti.sysbios.family.arp32.Hwi');
-    }
-    else if (isaChain.match(/#v7M#/)) {
-        Core = xdc.useModule("ti.sysbios.family.arm.ducati.Core");
-    }
+    /* load modules needed in meta domain and in target domain */
+    MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
 
-    xdc.useModule('ti.sdo.ipc.Ipc');
-    xdc.useModule('ti.sdo.ipc.Notify');
+    xdc.useModule('xdc.runtime.Assert');
 
     /* initialize procIdTable */
     TableInit.initProcId(this);
@@ -73,60 +54,23 @@ function module$use()
     /* initialize mailboxTable */
     TableInit.generateTable(this);
 
-    if (isaChain.match(/#64P#|#v7M#|#v7A#/)) {
-        /* initialize mailbox base address table */
-        this.mailboxBaseAddr[0]  = 0x4208B000;  /* EVE1 Internal Mailbox 0 */
-        this.mailboxBaseAddr[1]  = 0x4208C000;  /* EVE1 Internal Mailbox 1 */
-        this.mailboxBaseAddr[2]  = 0x4208D000;  /* EVE1 Internal Mailbox 2 */
-        this.mailboxBaseAddr[3]  = 0x4218B000;  /* EVE2 Internal Mailbox 0 */
-        this.mailboxBaseAddr[4]  = 0x4218C000;  /* EVE2 Internal Mailbox 1 */
-        this.mailboxBaseAddr[5]  = 0x4218D000;  /* EVE2 Internal Mailbox 2 */
-        this.mailboxBaseAddr[6]  = 0x4228B000;  /* EVE3 Internal Mailbox 0 */
-        this.mailboxBaseAddr[7]  = 0x4228C000;  /* EVE3 Internal Mailbox 1 */
-        this.mailboxBaseAddr[8]  = 0x4228D000;  /* EVE3 Internal Mailbox 2 */
-        this.mailboxBaseAddr[9]  = 0x4238B000;  /* EVE4 Internal Mailbox 0 */
-        this.mailboxBaseAddr[10] = 0x4238C000;  /* EVE4 Internal Mailbox 1 */
-        this.mailboxBaseAddr[11] = 0x4238D000;  /* EVE4 Internal Mailbox 2 */
-        this.mailboxBaseAddr[12] = 0x48840000;  /* System Mailbox 5 */
-        this.mailboxBaseAddr[13] = 0x48842000;  /* System Mailbox 6 */
-        this.mailboxBaseAddr[14] = 0x48844000;  /* System Mailbox 7 */
-        this.mailboxBaseAddr[15] = 0x48846000;  /* System Mailbox 8 */
-    }
-    else if (isaChain.match(/#arp32#/)) {
-        this.mailboxBaseAddr[0]  = 0x4008B000;  /* EVE1 Internal Mailbox 0 */
-        this.mailboxBaseAddr[1]  = 0x4008C000;  /* EVE1 Internal Mailbox 1 */
-        this.mailboxBaseAddr[2]  = 0x4208D000;  /* EVE1 Internal Mailbox 2 */
-        this.mailboxBaseAddr[3]  = 0x4008B000;  /* EVE2 Internal Mailbox 0 */
-        this.mailboxBaseAddr[4]  = 0x4008C000;  /* EVE2 Internal Mailbox 1 */
-        this.mailboxBaseAddr[5]  = 0x4218D000;  /* EVE2 Internal Mailbox 2 */
-        this.mailboxBaseAddr[6]  = 0x4008B000;  /* EVE3 Internal Mailbox 0 */
-        this.mailboxBaseAddr[7]  = 0x4008C000;  /* EVE3 Internal Mailbox 1 */
-        this.mailboxBaseAddr[8]  = 0x4228D000;  /* EVE3 Internal Mailbox 2 */
-        this.mailboxBaseAddr[9]  = 0x4008B000;  /* EVE4 Internal Mailbox 0 */
-        this.mailboxBaseAddr[10] = 0x4008C000;  /* EVE4 Internal Mailbox 1 */
-        this.mailboxBaseAddr[11] = 0x4238D000;  /* EVE4 Internal Mailbox 2 */
-        this.mailboxBaseAddr[12] = 0x48840000;  /* System Mailbox 5 */
-        this.mailboxBaseAddr[13] = 0x48842000;  /* System Mailbox 6 */
-        this.mailboxBaseAddr[14] = 0x48844000;  /* System Mailbox 7 */
-        this.mailboxBaseAddr[15] = 0x48846000;  /* System Mailbox 8 */
-
-        /* each EVE receives its message using the local mailbox address */
-        if (MultiProc.id == this.eve1ProcId) {
-            this.mailboxBaseAddr[2] = 0x4008D000;
-        }
-        else if (MultiProc.id == this.eve2ProcId) {
-            this.mailboxBaseAddr[5] = 0x4008D000;
-        }
-        else if (MultiProc.id == this.eve3ProcId) {
-            this.mailboxBaseAddr[8] = 0x4008D000;
-        }
-        else if (MultiProc.id == this.eve4ProcId) {
-            this.mailboxBaseAddr[11] = 0x4008D000;
-        }
-    }
-    else {
-        throw("Invalid target: " + Program.build.target.$name);
-    }
+    /* Initialize mailbox base address table */
+    this.mailboxBaseAddr[0]  = 0x4208B000;  /* EVE1 Internal Mailbox 0 */
+    this.mailboxBaseAddr[1]  = 0x4208C000;  /* EVE1 Internal Mailbox 1 */
+    this.mailboxBaseAddr[2]  = 0x4208D000;  /* EVE1 Internal Mailbox 2 */
+    this.mailboxBaseAddr[3]  = 0x4218B000;  /* EVE2 Internal Mailbox 0 */
+    this.mailboxBaseAddr[4]  = 0x4218C000;  /* EVE2 Internal Mailbox 1 */
+    this.mailboxBaseAddr[5]  = 0x4218D000;  /* EVE2 Internal Mailbox 2 */
+    this.mailboxBaseAddr[6]  = 0x4228B000;  /* EVE3 Internal Mailbox 0 */
+    this.mailboxBaseAddr[7]  = 0x4228C000;  /* EVE3 Internal Mailbox 1 */
+    this.mailboxBaseAddr[8]  = 0x4228D000;  /* EVE3 Internal Mailbox 2 */
+    this.mailboxBaseAddr[9]  = 0x4238B000;  /* EVE4 Internal Mailbox 0 */
+    this.mailboxBaseAddr[10] = 0x4238C000;  /* EVE4 Internal Mailbox 1 */
+    this.mailboxBaseAddr[11] = 0x4238D000;  /* EVE4 Internal Mailbox 2 */
+    this.mailboxBaseAddr[12] = 0x48840000;  /* System Mailbox 5 */
+    this.mailboxBaseAddr[13] = 0x48842000;  /* System Mailbox 6 */
+    this.mailboxBaseAddr[14] = 0x48844000;  /* System Mailbox 7 */
+    this.mailboxBaseAddr[15] = 0x48846000;  /* System Mailbox 8 */
 
     /* determine which notify drivers to include */
     this.$private.driverMask = 0;
@@ -163,6 +107,8 @@ function module$static$init(state, mod)
 {
     var procId;
 
+    state.numPlugged = 0;
+
     /* Initialize the state connAry from the config params. Translate
      * processor names into IDs for better runtime performance.
      */
@@ -174,9 +120,27 @@ function module$static$init(state, mod)
         state.connAry[i].driver = mod.connections[i].driver;
     }
 
-    if (isaChain.match(/#64P#/)) {
-        state.numPlugged.length = 1;
-
+    /* finish initializing the interrupt table */
+    if (Program.build.target.isa == "v7M4") {
+//      TODO
+//      if (Core.id == 0) {
+//          Hwi.construct(state.hwi, 53, NotifyDriverMbx.isr);
+//      }
+//      else {
+//          Hwi.construct(state.hwi, 54, NotifyDriverMbx.isr);
+//      }
+        /* interrupt event IDs used by this processor */
+        for (var i = 0; i < state.interruptTable.length; i++) {
+            state.interruptTable[i] = 0xFFFF; /* TODO */
+        }
+    }
+    else if (Program.build.target.isa == "arp32") {
+        /* interrupt event IDs used by this processor */
+        for (var i = 0; i < state.interruptTable.length; i++) {
+            state.interruptTable[i] = 0xFFFF; /* TODO */
+        }
+    }
+    else if (Program.build.target.isa == "66") {
         /* interrupt event IDs used by this processor */
         state.interruptTable[0] = 55; /* EVE1 -> DSP1 or DSP2 */
         state.interruptTable[1] = 56; /* EVE2 -> DSP1 or DSP2 */
@@ -192,41 +156,7 @@ function module$static$init(state, mod)
         state.interruptTable[9] = 0; /* IPU1-1 -> DSP1 or DSP2 */
         state.interruptTable[10] = 0; /* IPU2-1 -> DSP1 or DSP2 */
     }
-    else if (isaChain.match(/#arp32#/)) {
-        state.numPlugged.length = this.NUM_EVE_MBX / this.NUM_EVES;
-
-        /* interrupt event IDs used by this processor */
-        state.interruptTable[0] = 60; /* EVE1 - Group1/INTC1 */
-        state.interruptTable[1] = 60; /* EVE2 - Group1/INTC1 */
-        state.interruptTable[2] = 60; /* EVE3 - Group1/INTC1 */
-        state.interruptTable[3] = 60; /* EVE4 - Group1/INTC1 */
-        state.interruptTable[4] = 29; /* DSP1 - Group0/INTC0 */
-        state.interruptTable[5] = 30; /* DSP2 - Group0/INTC0 */
-        state.interruptTable[6] = 29; /* IPU1-0 */
-        state.interruptTable[7] = 30; /* IPU2-0 */
-        state.interruptTable[8] = 29; /* HOST */
-        state.interruptTable[9] = 30; /* IPU1-1 */
-        state.interruptTable[10] = 30; /* IPU2-1 */
-    }
-    else if (isaChain.match(/#v7M#/)) {
-        state.numPlugged.length = 1;
-
-        /* TODO */
-//      if (Core.id == 0) {
-//          Hwi.construct(state.hwi, 53, NotifyDriverMbx.isr);
-//      }
-//      else {
-//          Hwi.construct(state.hwi, 54, NotifyDriverMbx.isr);
-//      }
-
-        /* interrupt event IDs used by this processor */
-        for (var i = 0; i < state.interruptTable.length; i++) {
-            state.interruptTable[i] = 0xFFFF; /* TODO */
-        }
-    }
-    else if (isaChain.match(/#v7A#/)) {
-        state.numPlugged.length = 1;
-
+    else if (Program.build.target.isa == "v7A15") {
         /* interrupt event IDs used by this processor */
         for (var i = 0; i < state.interruptTable.length; i++) {
             state.interruptTable[i] = 0xFFFF; /* TODO */