]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - ipc/ipcdev.git/blob - packages/ti/sdo/ipc/family/Settings.xs
QNX: Fix multi_process.sh for < 10 processes
[ipc/ipcdev.git] / packages / ti / sdo / ipc / family / Settings.xs
1 /*
2  * Copyright (c) 2013, Texas Instruments Incorporated
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * *  Redistributions of source code must retain the above copyright
10  *    notice, this list of conditions and the following disclaimer.
11  *
12  * *  Redistributions in binary form must reproduce the above copyright
13  *    notice, this list of conditions and the following disclaimer in the
14  *    documentation and/or other materials provided with the distribution.
15  *
16  * *  Neither the name of Texas Instruments Incorporated nor the names of
17  *    its contributors may be used to endorse or promote products derived
18  *    from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
33 /*
34  *  ======== Settings.xs ========
35  */
37 /*
38  *  ======== setDeviceAliases ========
39  */
40 function setDeviceAliases(settingsTable, aliasTable)
41 {
42     /* Number of times to call the outer loop */
43     var numLoops = 6;
45     /*
46      *  Execute the 2nd loop 'numLoops' times to allow aliases of aliases
47      *  to be applied to the table
48      */
49     for (var i = 0; i < numLoops; i++) {
50         for (var device in aliasTable) {
51             for each (var alias in aliasTable[device]) {
52                 /*
53                  *  Define the alias only if the alias doesn't already exist
54                  *  in the table and if the device does exist in the table.
55                  */
56                 if (settingsTable[alias] == null &&
57                     settingsTable[device] != null) {
58                     settingsTable[alias] = settingsTable[device];
59                 }
60             }
61         }
62     }
63 }
65 /*
66  *  ======== setCatalogAliases ========
67  */
68 function setCatalogAliases(settingsTable, aliasTable)
69 {
70     for (var catalogName in settingsTable) {
71         if (aliasTable[catalogName] != null) {
72             var catalogAlias = aliasTable[catalogName];
73             if (settingsTable[catalogAlias] == null) {
74                 settingsTable[catalogAlias] = settingsTable[catalogName];
75                 continue;
76             }
77             for (var deviceName in settingsTable[catalogName]) {
78                 settingsTable[catalogAlias][deviceName] =
79                     settingsTable[catalogName][deviceName];
80             }
81         }
82     }
83 }
85 /*
86  *  ======== deviceSupportCheck ========
87  *  Check validity of device
88  */
89 function deviceSupportCheck()
90 {
91     var deviceName;
93     /* look for exact match */
94     for (deviceName in procNames) {
95         if (deviceName == Program.cpu.deviceName) {
96             return deviceName;
97         }
98     }
100     /* now look for wild card match */
101     for (deviceName in procNames) {
102         if (Program.cpu.deviceName.match(deviceName)) {
103             return deviceName;
104         }
105     }
108 /*
109  *  ======== catalogAliases ========
110  *  Aliases for catalog
111  */
112 var catalogAliases = {
113     'ti.catalog.arm.cortexm3' : ['ti.catalog.arm'],
116 /*
117  *  ======== deviceAliases ========
118  *  Aliases for devices used in IPC
119  */
120 var deviceAliases = {
121     'TMS320C6472'       : ['TMS320CTCI6486'],
122     'TMS320C6474'       : ['TMS320CTCI6488'],
123     'TMS320DA830'       : ['OMAPL138',
124                            'OMAPL137'],
125     'OMAP3530'          : ['TMS320C3430'],
126     'TMS320TI816X'      : ['TMS320CDM740',
127                            'TMS320DM8148',
128                            'TMS320DM8168',
129                            'TMS320C6A8168',
130                            'TMS320C6A8149',
131                            'TMS320TI811X',
132                            'TMS320TI813X',
133                            'TMS320TI814X'],
134     'TMS320C6678'       : ['TMS320TCI6608',
135                            'TMS320C6674',
136                            'TMS320C6672'],
137     'TMS320C6670'       : ['TMS320TCI6616',
138                            'TMS320CTCI6497',
139                            'TMS320CTCI6498',
140                            'TMS320TCI6618',
141                            'TMS320TCI6614',
142                            'TMS320C6657'],
143     'TMS320TCI6634'     : ['TMS320TCI6636',
144                            'TMS320TCI6638',
145                            'Kepler'],
146     'LM3.*'             : ['LM4.*'],
147     'Vayu'              : ['DRA7XX']
150 /*
151  *  ======== procNames ========
152  */
153 var procNames = {
154     'TMS320CDM6446'     : ["DSP", "HOST"],
155     'TMS320DA830'       : ["DSP", "HOST"],
156     'OMAPL138'          : ["DSP", "HOST"],
157     'TMS320TI816X'      : ["DSP", "VIDEO-M3", "VPSS-M3", "HOST"],
158     'TMS320TI813X'      : ["VIDEO-M3", "VPSS-M3", "HOST"],
159     'TMS320C6A8168'     : ["DSP", "VPSS-M3", "HOST"],
160     'TMS320C6A8149'     : ["DSP", "EVE", "VIDEO-M3", "VPSS-M3", "HOST"],
161     'TMS320C6670'       : ["CORE0", "CORE1", "CORE2", "CORE3"],
162     'TMS320C6657'       : ["CORE0", "CORE1"],
163     'TMS320C6672'       : ["CORE0", "CORE1"],
164     'TMS320TCI6614'     : ["CORE0", "CORE1", "CORE2", "CORE3", "HOST"],
165     'TMS320TCI6634'     : ["CORE0", "CORE1", "CORE2", "CORE3",
166                            "CORE4", "CORE5", "CORE6", "CORE7"],
167     'TMS320TCI6636'     : ["CORE0", "CORE1", "CORE2", "CORE3",
168                            "CORE4", "CORE5", "CORE6", "CORE7",
169                             "HOST0", "HOST1", "HOST2", "HOST3"],
171     /*
172      *  Note, the name "HOST" was intentionally chosen as a proc name to
173      *  accomodate TransportRpmsg, a common transport on these platforms.
174      */
175     'TMS320TCI6638'     : ["HOST", "CORE0", "CORE1", "CORE2", "CORE3",
176                            "CORE4", "CORE5", "CORE6", "CORE7"],
177     'Kepler'            : ["HOST", "CORE0", "CORE1", "CORE2", "CORE3",
178                            "CORE4", "CORE5", "CORE6", "CORE7"],
180     'TMS320C6674'       : ["CORE0", "CORE1", "CORE2", "CORE3"],
181     'TMS320C6678'       : ["CORE0", "CORE1", "CORE2", "CORE3",
182                            "CORE4", "CORE5", "CORE6", "CORE7"],
183     'TMS320C6472'       : ["CORE0", "CORE1", "CORE2",
184                            "CORE3", "CORE4", "CORE5"],
185     'TMS320C6474'       : ["CORE0", "CORE1", "CORE2"],
186     'OMAP3530'          : ["DSP", "HOST"],
187     'OMAP4430'          : ["DSP", "CORE0", "CORE1", "HOST"],
189     /*
190      * Note that only SMP-BIOS is supported on OMAP5430, so there's only
191      * one "IPU" proc defined for the dual-core M4.
192      */
193     'OMAP5430'          : ["DSP", "IPU", "HOST"],
195     'Arctic'            : ["DSP", "ARP32"],
196     'F28M3.*'           : ["M3", "C28"],
197     'LM3.*'             : [ "" ],  /* single core, any name can be used */
198     'Vayu'              : ["DSP1", "DSP2", "EVE1", "EVE2", "EVE3", "EVE4",
199                            "IPU1", "IPU2", "IPU1-0", "IPU1-1", "IPU2-0",
200                            "IPU2-1", "HOST"],
201 };
202 setDeviceAliases(procNames, deviceAliases);
204 /*
205  *  ======== hostNeedsSlaveData =======
206  */
207 var hostNeedsSlaveData = {
208     'TMS320TI816X'      : 1,
209     'OMAP3530'          : 1,
210     'OMAP4430'          : 1,
211     'TMS320CDM6446'     : 1,
212     'TMS320DA830'       : 1,
213     'OMAPL138'          : 1,
214     'Vayu'              : 1,
215 };
216 setDeviceAliases(hostNeedsSlaveData, deviceAliases);
218 /*
219  *  ======== sr0MemorySetup =======
220  *  The devices in this list means these devices have a slave mmu
221  *  that needs to be configured by the host before the slave can proceed.
222  */
223 var sr0MemorySetup = {
224     'TMS320TI816X'      : 1,
225     'OMAP3530'          : 1,
226     'OMAP4430'          : 1,
227 };
228 setDeviceAliases(sr0MemorySetup, deviceAliases);
230 /*
231  *  ======== hostProcNames =======
232  *  The name of the host or master processor.
233  */
234 var hostProcNames = {
235     'TMS320CDM6446'     : ["HOST"],
236     'TMS320DA830'       : ["HOST"],
237     'OMAPL138'          : ["HOST"],
238     'TMS320TI816X'      : ["HOST"],
239     'OMAP3530'          : ["HOST"],
240     'OMAP4430'          : ["HOST"],
241     'TMS320C6678'       : ["CORE0"],
242     'TMS320C6670'       : ["CORE0"],
243     'TMS320C6472'       : ["CORE0"],
244     'TMS320C6474'       : ["CORE0"],
245     'F28M3.*'           : ["M3"],
246     'TMS320TCI6634'     : ["CORE0"],
247     'TMS320TCI6636'     : ["HOST0"],
248     'TMS320TCI6638'     : ["HOST0"],
249     'Kepler'            : ["HOST"],
250 };
251 setDeviceAliases(hostProcNames, deviceAliases);
253 /*
254  *  ======== nameServerRemoteDelegates ========
255  */
256 var nameServerRemoteDelegates = {
257     'OMAP3530'          : { del: 'ti.sdo.ipc.nsremote.NameServerRemoteNotify',},
258     'TMS320CDM6446'     : { del: 'ti.sdo.ipc.nsremote.NameServerRemoteNotify',},
259     'TMS320DA830'       : { del: 'ti.sdo.ipc.nsremote.NameServerRemoteNotify',},
260     'TMS320TI816X'      : { del: 'ti.sdo.ipc.nsremote.NameServerRemoteNotify',},
261     'TMS320C6678'       : { del: 'ti.sdo.ipc.nsremote.NameServerRemoteNotify',},
262     'TMS320C6670'       : { del: 'ti.sdo.ipc.nsremote.NameServerRemoteNotify',},
263     'TMS320C6472'       : { del: 'ti.sdo.ipc.nsremote.NameServerRemoteNotify',},
264     'TMS320C6474'       : { del: 'ti.sdo.ipc.nsremote.NameServerRemoteNotify',},
265     'OMAP4430'          : { del: 'ti.sdo.ipc.nsremote.NameServerRemoteNotify',},
266     'Arctic'            : { del: 'ti.sdo.ipc.nsremote.NameServerRemoteNotify',},
267     'F28M3.*'           : { del: 'ti.sdo.ipc.family.f28m35x.NameServerBlock', },
268     'Vayu'              : { del: 'ti.sdo.ipc.nsremote.NameServerRemoteNotify',},
269     'TMS320TCI6634'     : { del: 'ti.sdo.ipc.nsremote.NameServerRemoteNotify',},
270 };
271 setDeviceAliases(nameServerRemoteDelegates, deviceAliases);
273 /*
274  *  ======== notifySetupDelegates ========
275  */
276 var notifySetupDelegates = {
277     'OMAP3530'          : { del: 'ti.sdo.ipc.family.omap3530.NotifySetup', },
278     'TMS320CDM6446'     : { del: 'ti.sdo.ipc.family.dm6446.NotifySetup', },
279     'TMS320DA830'       : { del: 'ti.sdo.ipc.family.da830.NotifySetup', },
280     'TMS320TI816X'      : { del: 'ti.sdo.ipc.family.ti81xx.NotifySetup', },
281     'TMS320C6A8149'     : { del: 'ti.sdo.ipc.family.c6a8149.NotifySetup', },
282     'TMS320C6678'       : { del: 'ti.sdo.ipc.family.c647x.NotifySetup', },
283     'TMS320C6670'       : { del: 'ti.sdo.ipc.family.c647x.NotifySetup', },
284     'TMS320C6472'       : { del: 'ti.sdo.ipc.family.c647x.NotifySetup', },
285     'TMS320C6474'       : { del: 'ti.sdo.ipc.family.c647x.NotifySetup', },
286     'TMS320TCI6634'     : { del: 'ti.sdo.ipc.family.tci663x.NotifyCircSetup', },
287     'OMAP4430'          : { del: 'ti.sdo.ipc.family.omap4430.NotifySetup', },
288     'Arctic'            : { del: 'ti.sdo.ipc.family.arctic.NotifyCircSetup', },
289     'F28M3.*'           : { del: 'ti.sdo.ipc.notifyDrivers.NotifySetupNull', },
290     'LM3.*'             : { del: 'ti.sdo.ipc.notifyDrivers.NotifySetupNull', },
291     'Vayu'              : { del: 'ti.sdo.ipc.family.vayu.NotifySetup', },
293 };
294 setDeviceAliases(notifySetupDelegates, deviceAliases);
296 /*
297  *  ======== messageQSetupDelegates ========
298  */
299 var messageQSetupDelegates = {
300     'OMAP3530'          : { del: 'ti.sdo.ipc.transports.TransportShmSetup', },
301     'TMS320CDM6446'     : { del: 'ti.sdo.ipc.transports.TransportShmSetup', },
302     'TMS320DA830'       : { del: 'ti.sdo.ipc.transports.TransportShmSetup', },
303     'TMS320TI816X'      : { del: 'ti.sdo.ipc.transports.TransportShmSetup', },
304     'TMS320C6A8149'     : { del: 'ti.sdo.ipc.transports.TransportShmSetup', },
305     'TMS320C6678'       : { del: 'ti.sdo.ipc.transports.TransportShmSetup', },
306     'TMS320C6670'       : { del: 'ti.sdo.ipc.transports.TransportShmSetup', },
307     'TMS320C6472'       : { del: 'ti.sdo.ipc.transports.TransportShmSetup', },
308     'TMS320C6474'       : { del: 'ti.sdo.ipc.transports.TransportShmSetup', },
309     'TMS320TCI6634'     : { del: 'ti.sdo.ipc.transports.TransportShmNotifySetup', },
310     'OMAP4430'          : { del: 'ti.sdo.ipc.transports.TransportShmSetup', },
311     'Arctic'            : { del: 'ti.sdo.ipc.transports.TransportShmNotifySetup', },
312     'F28M3.*'           : { del: 'ti.sdo.ipc.transports.TransportNullSetup', },
313     'LM3.*'             : { del: 'ti.sdo.ipc.transports.TransportNullSetup', },
314     'Vayu'              : { del: 'ti.sdo.ipc.transports.TransportShmSetup', },
315 };
316 setDeviceAliases(messageQSetupDelegates, deviceAliases);
318 /*
319  *  ======== interruptDelegates ========
320  */
321 var interruptDelegates = {
322     'ti.catalog.arm' : {
323         'TMS320CDM6446' : { del: 'ti.sdo.ipc.family.dm6446.InterruptArm', },
324         'TMS320DA830'   : { del: 'ti.sdo.ipc.family.da830.InterruptArm', },
325         'OMAPL138'      : { del: 'ti.sdo.ipc.family.da830.InterruptArm', },
326     },
327     'ti.catalog.arm.cortexm3' : {
328         'TMS320TI816X'  : { del: 'ti.sdo.ipc.family.ti81xx.InterruptDucati', },
329         'TMS320C6A8149' : { del: 'ti.sdo.ipc.family.c6a8149.InterruptDucati', },
330         'OMAP4430'      : { del: 'ti.sdo.ipc.family.omap4430.InterruptDucati', },
331         'F28M3.*'       : { del: 'ti.sdo.ipc.family.f28m35x.InterruptM3', },
332     },
333     'ti.catalog.arm.cortexm4' : {
334         'Vayu'          : { del: 'ti.sdo.ipc.family.vayu.InterruptIpu', },
335     },
336     'ti.catalog.arm.cortexa8' : {
337         'TMS320TI816X'  : { del: 'ti.sdo.ipc.family.ti81xx.InterruptHost', },
338         'TMS320C6A8149' : { del: 'ti.sdo.ipc.family.c6a8149.InterruptHost', },
339         'OMAP3530'      : { del: 'ti.sdo.ipc.family.omap3530.InterruptHost', },
340     },
341     'ti.catalog.arm.cortexa15' : {
342         'Vayu'          : { del: 'ti.sdo.ipc.family.vayu.InterruptHost', },
343     },
344     'ti.catalog.c6000' : {
345         'OMAP3530'      : { del: 'ti.sdo.ipc.family.omap3530.InterruptDsp', },
346         'TMS320CDM6446' : { del: 'ti.sdo.ipc.family.dm6446.InterruptDsp', },
347         'TMS320DA830'   : { del: 'ti.sdo.ipc.family.da830.InterruptDsp', },
348         'OMAPL138'      : { del: 'ti.sdo.ipc.family.da830.InterruptDsp', },
349         'TMS320TI816X'  : { del: 'ti.sdo.ipc.family.ti81xx.InterruptDsp', },
350         'TMS320C6A8149' : { del: 'ti.sdo.ipc.family.c6a8149.InterruptDsp', },
351         'TMS320C6472'   : { del: 'ti.sdo.ipc.family.c647x.Interrupt', },
352         'TMS320C6474'   : { del: 'ti.sdo.ipc.family.c647x.Interrupt', },
353         'TMS320C6678'   : { del: 'ti.sdo.ipc.family.c647x.Interrupt', },
354         'TMS320C6670'   : { del: 'ti.sdo.ipc.family.c647x.Interrupt', },
355         'TMS320TCI6634' : { del: 'ti.sdo.ipc.family.tci663x.Interrupt', },
357         'OMAP4430'      : { del: 'ti.sdo.ipc.family.omap4430.InterruptDsp', },
358         'Arctic'        : { del: 'ti.sdo.ipc.family.arctic.InterruptDsp', },
359         'Vayu'          : { del: 'ti.sdo.ipc.family.vayu.InterruptDsp', },
360     },
361     'ti.catalog.arp32' : {
362         'TMS320C6A8149' : { del: 'ti.sdo.ipc.family.c6a8149.InterruptEve', },
363         'Arctic'        : { del: 'ti.sdo.ipc.family.arctic.InterruptArp32', },
364         'Vayu'          : { del: 'ti.sdo.ipc.family.vayu.InterruptArp32', },
365     },
366     'ti.catalog.c2800' : {
367         'F28M3.*'       : { del: 'ti.sdo.ipc.family.f28m35x.InterruptC28', },
368     },
369 };
370 for (var family in interruptDelegates) {
371     setDeviceAliases(interruptDelegates[family], deviceAliases);
373 setCatalogAliases(interruptDelegates, catalogAliases);
375 /*
376  *  ======== spinlockDelegates ========
377  */
378 var spinlockDelegates = {
379     'ti.catalog.arm.cortexm3' : {
380         'OMAP4430' : {
381             baseAddr:   0x4A0F6800,
382             numLocks:   32,
383         },
384         'TMS320TI816X' : {
385             baseAddr:   0x480CA800,
386             numLocks:   64,
387         },
388     },
389     'ti.catalog.arm.cortexm4' : {
390         'Vayu' : {
391             baseAddr:   0x4A0F6800,
392             numLocks:   32
393         },
394     },
395     'ti.catalog.arm.cortexa8' : {
396         'TMS320TI816X' : {
397             baseAddr:   0x480CA800,
398             numLocks:   64,
399         },
400     },
401     'ti.catalog.arm.cortexa15' : {
402         'Vayu' : {
403             baseAddr:   0x4A0F6800,
404             numLocks:   32
405         },
406     },
407     'ti.catalog.c6000' : {
408         'TMS320TI816X' : {
409             baseAddr:   0x080CA800,
410             numLocks:   64,
411         },
412         'OMAP4430' : {
413             baseAddr:   0x4A0F6800,
414             numLocks:   32,
415         },
416         'Arctic' : {
417             baseAddr:   0x480CA800,
418             numLocks:   64,
419         },
420         'Vayu' : {
421             baseAddr:   0x4A0F6800,
422             numLocks:   32
423         },
424     },
425     'ti.catalog.arp32' : {
426         /*      'TMS320C6A8149' : {
427                     baseAddr:   0x480CA800,
428                     numLocks:   64,
429                 },
430         */
431         'Arctic' : {
432             baseAddr:   0x480CA800,
433             numLocks:   64,
434         },
435         'Vayu' : {
436             baseAddr:   0x4A0F6800,
437             numLocks:   32
438         },
439     }
441 for (var family in spinlockDelegates) {
442     setDeviceAliases(spinlockDelegates[family], deviceAliases);
444 setCatalogAliases(spinlockDelegates, catalogAliases);
446 /*
447  *  ======== hwSemDelegates ========
448  */
449 var hwSemDelegates = {
450     'ti.catalog.c6000' : {
451         'TMS320C6474' : {
452             baseAddr:   0x02B40100,
453             queryAddr:  0x02B40300,
454             numSems:    32,
455         },
456         'TMS320C6678' : {
457             baseAddr:   0x02640100,
458             queryAddr:  0x02640200,
459             numSems:    32,
460         },
461         'TMS320C6670' : {
462             baseAddr:   0x02640100,
463             queryAddr:  0x02640200,
464             numSems:    32,
465         },
466         'TMS320TCI6634' : {
467             baseAddr:   0x02640100,
468             queryAddr:  0x02640200,
469             numSems:    32,
470         },
471     },
473 for (var family in hwSemDelegates) {
474     setDeviceAliases(hwSemDelegates[family], deviceAliases);
476 setCatalogAliases(hwSemDelegates, catalogAliases);
478 /*
479  *  ======== getGateHWSemSettings ========
480  */
481 function getGateHWSemSettings()
483     var errorString = "IPC does not have a default GateHWSem" +
484                       " delegate for the " + deviceName + " device!";
485     var catalogName = Program.cpu.catalogName;
486     var deviceName = deviceSupportCheck();
488     var errStr = "The device " + deviceName +
489         " does not support hardware semaphores!";
491     try {
492         var hwSemSettings = hwSemDelegates[catalogName][deviceName];
493     }
494     catch(e) {
495         throw new Error(errStr);
496     }
498     if (hwSemSettings == null) {
499         throw new Error(errStr);
500     }
502     return (hwSemSettings);
505 /*
506  *  ======== getGateHWSpinlockSettings ========
507  */
508 function getGateHWSpinlockSettings()
510     var errorString = "IPC does not have a default GateHWSpinlock" +
511                       " delegate for the " + deviceName + " device!";
512     var catalogName = Program.cpu.catalogName;
513     var deviceName = deviceSupportCheck();
515     var errStr = "The device " + deviceName +
516         " does not support hardware spinlocks!";
518     try {
519         var spinLockSettings = spinlockDelegates[catalogName][deviceName];
520     }
521     catch(e) {
522         throw new Error(errStr);
523     }
525     if (spinLockSettings == null) {
526         throw new Error(errStr);
527     }
529     return (spinLockSettings);
532 /*
533  *  ======== generateSlaveDataForHost ========
534  */
535 function generateSlaveDataForHost()
537     var deviceName = deviceSupportCheck();
538     var retval = hostNeedsSlaveData[deviceName];
540     /* A15 is the already the host no need to generate data */
541     if ((Program.cpu.catalogName == 'ti.catalog.arm.cortexa8') ||
542         (Program.cpu.catalogName == 'ti.catalog.arm.cortexa9') ||
543         (Program.cpu.catalogName == 'ti.catalog.arm.cortexa15')) {
544         return (false);
545     }
547     if (retval != null) {
548         return (true);
549     }
551     return (false);
554 /*
555  *  ======== getHostProcId ========
556  */
557 function getHostProcId()
559     var MultiProc = xdc.module("ti.sdo.utils.MultiProc");
560     var deviceName = deviceSupportCheck();
561     var hostProcName = hostProcNames[deviceName];
563     if (hostProcName == null) {
564         /* The device doesn't have a core that runs a hlos */
565         return (MultiProc.INVALIDID);
566     }
568     /*
569      *  If the device may run a hlos, return the corresponding core's MultiProc
570      *  id. MultiProc.INVALIDID will be returned if the core exists but isn't
571      *  being used in the application
572      */
573     return(MultiProc.getIdMeta(String(hostProcName)));
576 /*
577  *  ======== getIpcSR0Setup ========
578  */
579 function getIpcSR0Setup()
581     var deviceName = deviceSupportCheck();
582     var memorySetup = sr0MemorySetup[deviceName];
584     if (memorySetup == null) {
585         /* The device has memory available to it */
586         return (true);
587     }
588     else {
589         /* The device needs host to enable memory through mmu */
590         return (false);
591     }
594 /*
595  *  ======== getHWGate ========
596  */
597 function getHWGate()
599     var deviceName = deviceSupportCheck();
600     if (deviceName == "TMS320C6472" ||
601         deviceName == "TMS320CTCI6486") {
602         return ('ti.sdo.ipc.gates.GateAAMonitor');
603     }
604     else if (deviceName == "TMS320C6A8149") {
605         return ('ti.sdo.ipc.gates.GatePetersonN');
606     }
607     try {
608         this.getGateHWSpinlockSettings();
609         return ('ti.sdo.ipc.gates.GateHWSpinlock');
610     }
611     catch(e) {
612     }
614     try {
615         this.getGateHWSemSettings();
616         return ('ti.sdo.ipc.gates.GateHWSem');
617     }
618     catch(e) {
619     }
621     return('ti.sdo.ipc.gates.GatePeterson');
624 /*
625  *  ======== getDefaultInterruptDelegate ========
626  */
627 function getDefaultInterruptDelegate()
629     var catalogName = Program.cpu.catalogName;
630     var deviceName = deviceSupportCheck();
632     var delegate = interruptDelegates[catalogName][deviceName];
634     if (delegate == null) {
635         throw new Error ("IPC does not have a default Interrupt"
636             + " delegate for the " + deviceName + " device!");
637     }
639     return (delegate.del);
642 /*
643  *  ======== getNameServerRemoteDelegate ========
644  */
645 function getNameServerRemoteDelegate()
647     var deviceName = deviceSupportCheck();
649     var delegate = nameServerRemoteDelegates[deviceName];
651     if (delegate == null) {
652         delegate = { del: 'ti.sdo.utils.NameServerRemoteNull', };
653     }
655     return (delegate.del);
658 /*
659  *  ======== getNotifySetupDelegate ========
660  */
661 function getNotifySetupDelegate()
663     var deviceName = deviceSupportCheck();
665     var delegate = notifySetupDelegates[deviceName];
667     if (delegate == null) {
668         throw new Error ("IPC does not have a default NotifySetup"
669             + " delegate for the " + deviceName + " device!");
670     }
672     return (delegate.del);
675 /*
676  *  ======== getMessageQSetupDelegate ========
677  */
678 function getMessageQSetupDelegate()
680     var deviceName = deviceSupportCheck();
682     var delegate = messageQSetupDelegates[deviceName];
684     if (delegate == null) {
685         throw new Error ("IPC does not have a default MessageQ setup"
686             + " delegate for the " + deviceName + " device!");
687     }
689     return (delegate.del);
692 /*
693  *  ======== procInDevice ========
694  */
695 function procInDevice(procName)
697     var deviceName = deviceSupportCheck();
698     if (procNames[deviceName] == null) {
699         throw("The device (" + Program.cpu.deviceName +
700                        ") isn't supported by IPC");
701     }
703     /* Search through the procNames table */
704     for each (name in procNames[deviceName]) {
705         if (name == procName) {
706             return (true);
707         }
708     }
710     return (false);
713 /*
714  *  ======== getDeviceProcNames ========
715  */
716 function getDeviceProcNames()
718     var deviceName = deviceSupportCheck();
719     if (procNames[deviceName] == null) {
720         throw("The device (" + Program.cpu.deviceName +
721                        ") isn't supported by IPC");
722     }
724     return (procNames[deviceName]);