]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/rm-lld.git/blob - test/k2k/c66/bios/dsp_client.cfg
NOTICE OF RELOCATION
[keystone-rtos/rm-lld.git] / test / k2k / c66 / bios / dsp_client.cfg
1 /*
2  * Copyright (c) 2012-2014, 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 var Memory = xdc.useModule('xdc.runtime.Memory');
34 var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
35 var BIOS = xdc.useModule('ti.sysbios.BIOS');
36 BIOS.heapSize = 0x20000;
37 BIOS.libType = BIOS.LibType_Custom;
39 var Task = xdc.useModule('ti.sysbios.knl.Task');
40 Task.deleteTerminatedTasks = true;
42 var Idle = xdc.useModule('ti.sysbios.knl.Idle');
43 Idle.addFunc('&VirtQueue_cacheWb');
45 var System = xdc.useModule('xdc.runtime.System');
46 var SysMin = xdc.useModule('xdc.runtime.SysMin');
47 System.SupportProxy = SysMin;
49 var Diags = xdc.useModule('xdc.runtime.Diags');
51 xdc.useModule("ti.ipc.namesrv.NameServerRemoteRpmsg");
53 print ("Program.cpu.deviceName = " + Program.cpu.deviceName);
54 print ("Program.platformName = " + Program.platformName);
56 var VirtQueue = xdc.useModule('ti.ipc.family.tci6638.VirtQueue');
57 var Interrupt = xdc.useModule('ti.ipc.family.tci6638.Interrupt');
59 /* Note: MultiProc_self is set during VirtQueue_init based on DNUM. */
60 var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
62 /* K2K - TMS320TCI6638 */
63 MultiProc.setConfig(null, ["HOST", "CORE0", "CORE1", "CORE2", "CORE3",
64                            "CORE4", "CORE5", "CORE6", "CORE7"]);
65 Program.sectMap[".text:_c_int00"] = new Program.SectionSpec();
66 Program.sectMap[".text:_c_int00"].loadSegment = "L2SRAM";
67 Program.sectMap[".text:_c_int00"].loadAlign = 0x400;
69 var Hwi = xdc.useModule('ti.sysbios.family.c64p.Hwi');
70 Hwi.enableException = true;
72 /* This makes the vrings address range 0xa0000000 to 0xa1ffffff uncachable.
73    We assume the rest is to be left cacheable.
74    Per sprugw0b.pdf
75     0184 8280h MAR160 Memory Attribute Register 160 A000 0000h - A0FF FFFFh
76     0184 8284h MAR161 Memory Attribute Register 161 A100 0000h - A1FF FFFFh
77 */
78 var Cache = xdc.useModule('ti.sysbios.family.c66.Cache');
79 /*  Mark external memory used by kernel as uncached so that IPC vring CMA
80  *  region can operate properly when exchanging messages between DSP and ARM.
81  *  Marking entire DDR3 as uncached since the memory used by kernel can 
82  *  change between device revisions.  Need to find better way of doing this. */
83 Cache.setMarMeta(0x80000000, 0x7FFFFFFF, 0xC);
85 Program.global.sysMinBufSize = 0x8000;
86 SysMin.bufSize  =  Program.global.sysMinBufSize;
88 /* Enable Memory Translation module that operates on the Resource Table */
89 var Resource = xdc.useModule('ti.ipc.remoteproc.Resource');
90 /* Make sure RemoteProc's .resource_table doesn't conflict with secure kernel when
91  * on secure board.  Secure kernel is located from 0x00800000 - 0x00810000 */
92 Resource.loadAddr = 0x00810000;
94 /*  COMMENT OUT TO SHUT OFF LOG FOR BENCHMARKS: */
95 /*
96 Diags.setMaskMeta("ti.ipc.family.tci6638.Interrupt", Diags.USER1,
97     Diags.ALWAYS_ON);
98 Diags.setMaskMeta("ti.ipc.family.tci6638.VirtQueue", Diags.USER1,
99     Diags.ALWAYS_ON);
100 Diags.setMaskMeta("ti.ipc.transports.TransportRpmsg",
101     Diags.INFO|Diags.USER1|Diags.STATUS,
102     Diags.ALWAYS_ON);
103 Diags.setMaskMeta("ti.ipc.namesrv.NameServerRemoteRpmsg", Diags.INFO,
104     Diags.ALWAYS_ON);
105 */
107 Hwi.enableException = true;
109 xdc.loadPackage('ti.ipc.ipcmgr');
110 BIOS.addUserStartupFunction('&IpcMgr_ipcStartup');
112 var HeapBuf = xdc.useModule('ti.sysbios.heaps.HeapBuf');
113 var params = new HeapBuf.Params;
114 params.align = 8;
115 params.blockSize = 512;
116 params.numBlocks = 256;
117 var msgHeap = HeapBuf.create(params);
119 var MessageQ  = xdc.useModule('ti.sdo.ipc.MessageQ');
120 MessageQ.registerHeapMeta(msgHeap, 0);
122 var Assert = xdc.useModule('xdc.runtime.Assert');
123 var Defaults = xdc.useModule('xdc.runtime.Defaults');
124 var Text = xdc.useModule('xdc.runtime.Text');
125 Text.isLoaded = true;
127 var LoggerSys = xdc.useModule('xdc.runtime.LoggerSys');
128 var LoggerSysParams = new LoggerSys.Params();
130 Defaults.common$.logger = LoggerSys.create(LoggerSysParams);
132 var VirtioSetup = xdc.useModule('ti.ipc.transports.TransportRpmsgSetup');
133 VirtioSetup.common$.diags_INFO = Diags.RUNTIME_OFF;
135 var Main = xdc.useModule('xdc.runtime.Main');
136 Main.common$.diags_ASSERT = Diags.ALWAYS_ON;
137 Main.common$.diags_INTERNAL = Diags.ALWAYS_ON;
139 xdc.loadPackage('ti.ipc.transports').profile = 'release';
141 /* PDK packages */
142 var devType = "k2k"
143 var Csl = xdc.useModule('ti.csl.Settings');
144 Csl.deviceType = devType;
145 var Rm = xdc.loadPackage('ti.drv.rm'); 
147 var MessageQ  = xdc.useModule('ti.sdo.ipc.MessageQ');
149 var VirtioSetup = xdc.useModule('ti.ipc.transports.TransportRpmsgSetup');
150 MessageQ.SetupTransportProxy = VirtioSetup;
152 var NameServer = xdc.useModule("ti.sdo.utils.NameServer");
153 var NsRemote = xdc.useModule("ti.ipc.namesrv.NameServerRemoteRpmsg");
154 NameServer.SetupProxy = NsRemote;
156 var TransportRpmsg = xdc.useModule('ti.ipc.transports.TransportRpmsg');