]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - ipc/ipcdev.git/commitdiff
SDOCM00115347 Keystone 2 Interrupt module doesn't validate HOST
authorRamsey Harris <ramsey@ti.com>
Tue, 15 Sep 2015 17:51:11 +0000 (10:51 -0700)
committerAngela Stegmaier <angelabaker@ti.com>
Thu, 17 Sep 2015 19:30:35 +0000 (14:30 -0500)
Add config validate function to ensure host processor is first
in the MultiProc name list array. The Interrupt module makes
this assumption; it will fail otherwise.

packages/ti/ipc/family/tci6638/Interrupt.xs

index 908bd33b3dd611c91886a0955015bc667c13b3ec..d2ddc169a2959d4f15a73ea345990d7cd0ff7622 100644 (file)
@@ -123,15 +123,29 @@ function module$meta$init()
     this.INTERDSPINT    = settings.INTERDSPINT;
     this.DSPINT         = settings.DSPINT;
 }
     this.INTERDSPINT    = settings.INTERDSPINT;
     this.DSPINT         = settings.DSPINT;
 }
+
 /*
  *  ======== module$use ========
  */
 function module$use()
 {
 /*
  *  ======== module$use ========
  */
 function module$use()
 {
-    Interrupt     = this;
+    Interrupt = this;
+
+    Hwi = xdc.useModule("ti.sysbios.family.c64p.Hwi");
+    MultiProc = xdc.useModule("ti.sdo.utils.MultiProc");
+
+}
 
 
-    Hwi         = xdc.useModule("ti.sysbios.family.c64p.Hwi");
-    MultiProc   = xdc.useModule("ti.sdo.utils.MultiProc");
+/*
+ *  ======== module$validate ========
+ */
+function module$validate()
+{
+    /* verify the host is first in the multiproc name list */
+    if (MultiProc.getIdMeta("HOST") != 0) {
+        this.$logError("Processor HOST is missing from MultiProc name list",
+                MultiProc, null);
+    }
 }
 
 /*
 }
 
 /*