]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/dspdce.git/blobdiff - platform/ti/dce/baseimage/dce_dsp.cfg
Modified Memory Map in Resource table.
[glsdk/dspdce.git] / platform / ti / dce / baseimage / dce_dsp.cfg
index c4e15445d0f91d16eb9c3482bcf61d0625a39f30..9669492c19607e54e53160846b739ac64f0161ce 100644 (file)
-/*\r
- * Copyright (c) 2011, Texas Instruments Incorporated\r
- * All rights reserved.\r
- *\r
- * Redistribution and use in source and binary forms, with or without\r
- * modification, are permitted provided that the following conditions\r
- * are met:\r
- *\r
- * *  Redistributions of source code must retain the above copyright\r
- *    notice, this list of conditions and the following disclaimer.\r
- *\r
- * *  Redistributions in binary form must reproduce the above copyright\r
- *    notice, this list of conditions and the following disclaimer in the\r
- *    documentation and/or other materials provided with the distribution.\r
- *\r
- * *  Neither the name of Texas Instruments Incorporated nor the names of\r
- *    its contributors may be used to endorse or promote products derived\r
- *    from this software without specific prior written permission.\r
- *\r
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"\r
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR\r
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;\r
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\r
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR\r
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
- * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
- */\r
-\r
-\r
-var hw_OMAP4 = 0;\r
-var hw_OMAP5 = 1;\r
-var hw_VAYU = 2;\r
-var VIRTIO = 0;\r
-var ZEBU = 0;\r
-var ES10 = 1;\r
-var ES20 = 2;\r
-\r
-var Program                    = xdc.useModule('xdc.cfg.Program');\r
-\r
-var cfgArgs = prog.build.cfgArgs;\r
-\r
-Program.global.HwType = cfgArgs.HwType;\r
-Program.global.enableSMP = cfgArgs.enableSMP;\r
-Program.global.HwVer = cfgArgs.HwVer;\r
-Program.global.coreName = "dsp";\r
-\r
-print("HwType = " + Program.global.HwType);\r
-\r
-if(Program.global.HwType == hw_VAYU)\r
-{\r
-  //  xdc.loadCapsule("ti/configs/vayu/IpcCommon.cfg.xs");\r
-    xdc.includeFile("ti/configs/vayu/Dsp1.cfg");\r
-    \r
-}\r
-else\r
-{\r
-  //  xdc.loadCapsule("ti/configs/omap54xx/IpcCommon.cfg.xs");\r
-    xdc.includeFile("ti/configs/omap54xx/Dsp.cfg");\r
-    xdc.includeFile("ti/configs/omap54xx/DspAmmu.cfg");\r
-}\r
-\r
-xdc.loadPackage('ti.ipc.mm');\r
-xdc.loadPackage('ti.ipc.ipcmgr');\r
-xdc.loadPackage('ti.srvmgr');\r
-xdc.loadPackage('ti.srvmgr.omaprpc');\r
-\r
-// Disabling default IpcCommon trace\r
-var Registry = xdc.useModule('xdc.runtime.Registry');\r
-var Diags = xdc.useModule('xdc.runtime.Diags');\r
-var Task = xdc.useModule('ti.sysbios.knl.Task');\r
-Task.common$.namedInstance = true;\r
-\r
-Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF;\r
-Registry.common$.diags_EXIT = Diags.RUNTIME_OFF;\r
-Registry.common$.diags_USER1 = Diags.RUNTIME_OFF;\r
-Registry.common$.diags_INFO = Diags.RUNTIME_OFF;\r
-Registry.common$.diags_LIFECYCLE = Diags.ALWAYS_ON;\r
-Registry.common$.diags_STATUS = Diags.ALWAYS_ON;\r
-Diags.setMaskEnabled = true;\r
-\r
-var Memory                     = xdc.useModule('xdc.runtime.Memory');\r
-var HeapMem                    = xdc.useModule('ti.sysbios.heaps.HeapMem');\r
-var GateHwi                    = xdc.useModule('ti.sysbios.gates.GateHwi');\r
-HeapMem.common$.gate = GateHwi.create();\r
-\r
-\r
-var heapMemParams                      = new HeapMem.Params;\r
-heapMemParams.size                     = 0x280000; // 2.5MB\r
-heapMemParams.sectionName      = ".systemHeap";\r
-var heap0                                      = HeapMem.create(heapMemParams);\r
-Memory.defaultHeapInstance     = heap0;\r
-Program.global.heap0           = heap0;\r
-\r
-/*\r
- * Setup memory map.\r
- */\r
-\r
-/* Mark heaps as NOINIT for optimizing boot-time */\r
-Program.sectMap[".systemHeap"] = new Program.SectionSpec();\r
-Program.sectMap[".systemHeap"].loadSegment = "EXT_HEAP";\r
-Program.sectMap[".systemHeap"].type = "NOINIT";\r
-\r
-\r
-/* ----------------------------- VERSION CONFIGURATION ---------------------*/\r
-var commonBld = xdc.loadCapsule("build/common.bld");\r
-commonBld.GetVersionTag();\r
-\r
-/*\r
- *  ======== CODEC ENGINE configurations  ========\r
- */\r
-\r
-var Global = xdc.useModule('ti.sdo.ce.osal.Global');\r
-Global.runtimeEnv = Global.DSPBIOS;\r
-\r
-xdc.useModule('ti.sdo.ce.global.Settings').profile    = "debug";\r
-xdc.loadPackage('ti.sdo.ce.video').profile            = "debug";\r
-xdc.loadPackage('ti.sdo.ce.video3').profile           = "debug";\r
-xdc.loadPackage('ti.sdo.ce.alg').profile              = "debug";\r
-\r
-var HeapBufMP                  = xdc.useModule('ti.sdo.ipc.heaps.HeapBufMP');\r
-\r
-var ipcSettings = xdc.useModule('ti.sdo.ce.ipc.Settings');\r
-ipcSettings.ipc = xdc.useModule('ti.sdo.ce.ipc.bios.Ipc');\r
-// set to true to enable debugging of codec engine\r
-xdc.useModule('ti.sdo.ce.Settings').checked         = true;\r
-\r
-/* Enable Memory Translation module that operates on the BIOS Resource Table */\r
-var Resource = xdc.useModule('ti.ipc.remoteproc.Resource');\r
-Resource.customTable = true;\r
-\r
-// Load decoder/encoder APIs:\r
-var VIDDEC2 = xdc.useModule('ti.sdo.ce.video2.IVIDDEC2');\r
-var UNIVERSAL = xdc.useModule('ti.sdo.ce.universal.IUNIVERSAL');\r
-\r
-// load whatever codecs are available in the build\r
-var codecs = [];\r
-\r
-function loadCodec(pkg, name)\r
-{\r
-   try {\r
-               var codec = xdc.useModule(pkg);\r
-               print('loading: ' + name);\r
-               codecs.push({ name: name, mod: codec, local: true });\r
-       } catch(e) {\r
-               print('no package: ' + pkg);\r
-       }\r
-}\r
-\r
-loadCodec('ti.sdo.codecs.universal.ce.UNIVERSAL', 'dsp_universalCopy');\r
-\r
-var engine         = xdc.useModule('ti.sdo.ce.Engine');\r
-var myEngine       = engine.create("dsp_vidsvr", codecs);\r
-\r
-xdc.useModule('ti.sysbios.knl.Task');\r
-var Task = xdc.useModule('ti.sysbios.knl.Task');\r
-Task.defaultStackSize = 12 * 0x400;\r
-\r
-/* ----------------------------- Configure BIOS--------------------------------*/\r
-\r
-BIOS                = xdc.useModule('ti.sysbios.BIOS');\r
-BIOS.addUserStartupFunction('&IpcMgr_rpmsgStartup');\r
-\r
-BIOS.clockEnabled   = true;\r
-BIOS.libType = BIOS.LibType_Custom;\r
-BIOS.smpEnabled = false;\r
-\r
-\r
-var Timer = xdc.useModule('ti.sysbios.timers.dmtimer.Timer');\r
-if(Program.global.HwType == hw_OMAP5 || Program.global.HwType == hw_VAYU)\r
-{\r
-    /*\r
-    BIOS assumes that default frequency is 38.4 MHz. On OMAP5, SYS_CLK is used to source\r
-    Hence it is clocked at 19.2 MHz.\r
-\r
-    Locally setting the BIOS configuration for GPT and CTM for OMAP5 till actual changes are\r
-    present in omap54xx/ipu/Platform.xdc\r
-    */\r
-    Timer.intFreq.hi = 0;\r
-    Timer.intFreq.lo = 19200000;\r
-    BIOS.cpuFreq.hi = 0;\r
-    BIOS.cpuFreq.lo = 600000000;\r
-}\r
-\r
-Program.sectMap[".plt"] = "EXT_DATA";\r
-\r
-\r
-/* IPC 3.x is no longer providing version capability. If needed, then IPC needs to implement it. */\r
-    /* Version module; this will produce a .version section with trees infos. Read\r
-     * with "readelf -p .version <base_image>" */\r
-//    xdc.useModule('ti.utils.Version');\r
-\r
+/*
+ * Copyright (c) 2011, Texas Instruments Incorporated
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * *  Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * *  Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * *  Neither the name of Texas Instruments Incorporated nor the names of
+ *    its contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+var hw_OMAP4 = 0;
+var hw_OMAP5 = 1;
+var hw_VAYU = 2;
+var VIRTIO = 0;
+var ZEBU = 0;
+var ES10 = 1;
+var ES20 = 2;
+
+var Program                    = xdc.useModule('xdc.cfg.Program');
+
+var cfgArgs = prog.build.cfgArgs;
+
+Program.global.HwType = cfgArgs.HwType;
+Program.global.enableSMP = cfgArgs.enableSMP;
+Program.global.HwVer = cfgArgs.HwVer;
+Program.global.coreName = "dsp";
+
+print("HwType = " + Program.global.HwType);
+
+//*************************************
+var System      = xdc.useModule('xdc.runtime.System');
+var SysMin      = xdc.useModule('ti.trace.SysMin');
+System.SupportProxy = SysMin;
+SysMin.bufSize  = 0x8000;
+
+var Memory      = xdc.useModule('xdc.runtime.Memory');
+Memory.defaultHeapSize = 0x20000;
+
+var Semaphore   = xdc.useModule('ti.sysbios.knl.Semaphore');
+
+var Cache = xdc.useModule('ti.sysbios.family.c66.Cache');
+Cache.setMarMeta(0xa0000000, 0x02000000, Cache.Mar_DISABLE);
+var L1cache = new Cache.Size();
+L1cache.l1dSize = Cache.L1Size_0K;
+
+xdc.loadPackage('ti.sdo.ipc.family.vayu');
+xdc.useModule('ti.sdo.ipc.family.vayu.InterruptDsp');
+xdc.loadPackage('ti.ipc.rpmsg');
+xdc.loadPackage('ti.ipc.family.vayu');
+
+/* Enable Memory Translation module that operates on the BIOS Resource Table */
+var Resource = xdc.useModule('ti.ipc.remoteproc.Resource');
+Resource.loadSegment = "EXT_CODE"
+
+/* Modules used in Power Management */
+xdc.loadPackage('ti.pm');
+
+/* Idle function that periodically flushes the unicache */
+var Idle = xdc.useModule('ti.sysbios.knl.Idle');
+Idle.addFunc('&VirtQueue_cacheWb');
+
+var HeapBuf   = xdc.useModule('ti.sysbios.heaps.HeapBuf');
+var List      = xdc.useModule('ti.sdo.utils.List');
+
+xdc.useModule('ti.sysbios.xdcruntime.GateThreadSupport');
+var GateSwi   = xdc.useModule('ti.sysbios.gates.GateSwi');
+
+var Task          = xdc.useModule('ti.sysbios.knl.Task');
+Task.common$.namedInstance = true;
+
+var Assert = xdc.useModule('xdc.runtime.Assert');
+var Defaults = xdc.useModule('xdc.runtime.Defaults');
+var Diags = xdc.useModule('xdc.runtime.Diags');
+var LoggerSys = xdc.useModule('xdc.runtime.LoggerSys');
+var LoggerSysParams = new LoggerSys.Params();
+
+/* Enable Logger: */
+Defaults.common$.logger = LoggerSys.create(LoggerSysParams);
+
+/* Enable runtime Diags_setMask() for non-XDC spec'd modules: */
+var Text = xdc.useModule('xdc.runtime.Text');
+Text.isLoaded = true;
+
+var Main = xdc.useModule('xdc.runtime.Main');
+Main.common$.diags_ASSERT = Diags.ALWAYS_ON;
+Main.common$.diags_INTERNAL = Diags.ALWAYS_ON;
+
+var Hwi = xdc.useModule('ti.sysbios.family.c64p.Hwi');
+Hwi.enableException = true;
+
+/* -------------------------------- DSP ----------------------------------*/
+var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
+MultiProc.setConfig("DSP1", ["HOST", "IPU2", "IPU1", "DSP2", "DSP1"]);
+
+/* --------------------------- TICK --------------------------------------*/
+var Clock = xdc.useModule('ti.sysbios.knl.Clock');
+Clock.tickSource = Clock.TickSource_NULL;
+
+//**************************************
+xdc.loadPackage('ti.ipc.mm');
+xdc.loadPackage('ti.ipc.ipcmgr');
+xdc.loadPackage('ti.srvmgr');
+xdc.loadPackage('ti.srvmgr.omaprpc');
+
+// Disabling default IpcCommon trace
+var Registry = xdc.useModule('xdc.runtime.Registry');
+var Diags = xdc.useModule('xdc.runtime.Diags');
+var Task = xdc.useModule('ti.sysbios.knl.Task');
+Task.common$.namedInstance = true;
+
+Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF;
+Registry.common$.diags_EXIT = Diags.RUNTIME_OFF;
+Registry.common$.diags_USER1 = Diags.RUNTIME_OFF;
+Registry.common$.diags_INFO = Diags.RUNTIME_OFF;
+Registry.common$.diags_LIFECYCLE = Diags.ALWAYS_ON;
+Registry.common$.diags_STATUS = Diags.ALWAYS_ON;
+Diags.setMaskEnabled = true;
+
+var Memory                     = xdc.useModule('xdc.runtime.Memory');
+var HeapMem                    = xdc.useModule('ti.sysbios.heaps.HeapMem');
+var GateHwi                    = xdc.useModule('ti.sysbios.gates.GateHwi');
+HeapMem.common$.gate = GateHwi.create();
+
+
+var heapMemParams                      = new HeapMem.Params;
+heapMemParams.size                     = 0x2400000; // 36MB
+heapMemParams.sectionName      = ".systemHeap";
+var heap0                                      = HeapMem.create(heapMemParams);
+Memory.defaultHeapInstance     = heap0;
+Program.global.heap0           = heap0;
+
+/*
+ * Setup memory map.
+ */
+
+/* Mark heaps as NOINIT for optimizing boot-time */
+Program.sectMap[".systemHeap"] = new Program.SectionSpec();
+Program.sectMap[".systemHeap"].loadSegment = "EXT_HEAP";
+Program.sectMap[".systemHeap"].type = "NOINIT";
+Program.sectMap[".tracebuf"] = "TRACE_BUF";
+Program.sectMap[".errorbuf"] = "EXC_DATA";
+
+/* ----------------------------- VERSION CONFIGURATION ---------------------*/
+var commonBld = xdc.loadCapsule("build/common.bld");
+commonBld.GetVersionTag();
+
+/*
+ *  ======== CODEC ENGINE configurations  ========
+ */
+
+var Global = xdc.useModule('ti.sdo.ce.osal.Global');
+Global.runtimeEnv = Global.DSPBIOS;
+
+xdc.useModule('ti.sdo.ce.global.Settings').profile    = "debug";
+xdc.loadPackage('ti.sdo.ce.video').profile            = "debug";
+xdc.loadPackage('ti.sdo.ce.video3').profile           = "debug";
+xdc.loadPackage('ti.sdo.ce.alg').profile              = "debug";
+
+var HeapBufMP                  = xdc.useModule('ti.sdo.ipc.heaps.HeapBufMP');
+
+var ipcSettings = xdc.useModule('ti.sdo.ce.ipc.Settings');
+ipcSettings.ipc = xdc.useModule('ti.sdo.ce.ipc.bios.Ipc');
+// set to true to enable debugging of codec engine
+xdc.useModule('ti.sdo.ce.Settings').checked         = true;
+
+/* Enable Memory Translation module that operates on the BIOS Resource Table */
+var Resource = xdc.useModule('ti.ipc.remoteproc.Resource');
+Resource.customTable = true;
+
+// Load decoder/encoder APIs:
+var VIDDEC2 = xdc.useModule('ti.sdo.ce.video2.IVIDDEC2');
+var UNIVERSAL = xdc.useModule('ti.sdo.ce.universal.IUNIVERSAL');
+
+// load whatever codecs are available in the build
+var codecs = [];
+
+function loadCodec(pkg, name)
+{
+   try {
+               var codec = xdc.useModule(pkg);
+               print('loading: ' + name);
+               codecs.push({ name: name, mod: codec, local: true });
+       } catch(e) {
+               print('no package: ' + pkg);
+       }
+}
+
+loadCodec('ti.sdo.codecs.universal.ce.UNIVERSAL', 'dsp_universalCopy');
+
+var engine         = xdc.useModule('ti.sdo.ce.Engine');
+var myEngine       = engine.create("dsp_vidsvr", codecs);
+
+xdc.useModule('ti.sysbios.knl.Task');
+var Task = xdc.useModule('ti.sysbios.knl.Task');
+Task.defaultStackSize = 12 * 0x400;
+
+/* ----------------------------- Configure BIOS--------------------------------*/
+
+BIOS                = xdc.useModule('ti.sysbios.BIOS');
+BIOS.addUserStartupFunction('&IpcMgr_rpmsgStartup');
+
+BIOS.clockEnabled   = true;
+BIOS.libType = BIOS.LibType_Custom;
+BIOS.smpEnabled = false;
+
+
+var Timer = xdc.useModule('ti.sysbios.timers.dmtimer.Timer');
+/*
+BIOS assumes that default frequency is 38.4 MHz. On OMAP5, SYS_CLK is used to source
+Hence it is clocked at 19.2 MHz.
+
+Locally setting the BIOS configuration for GPT and CTM for OMAP5 till actual changes are
+present in omap54xx/ipu/Platform.xdc
+*/
+Timer.intFreq.hi = 0;
+Timer.intFreq.lo = 19200000;
+BIOS.cpuFreq.hi = 0;
+BIOS.cpuFreq.lo = 600000000;
+
+Program.sectMap[".plt"] = "EXT_DATA";
+
+
+/* IPC 3.x is no longer providing version capability. If needed, then IPC needs to implement it. */
+    /* Version module; this will produce a .version section with trees infos. Read
+     * with "readelf -p .version <base_image>" */
+//    xdc.useModule('ti.utils.Version');
+