/* * Copyright (c) 2012-2014, 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. */ /* Configure BIOS for SMP-mode */ var BIOS = xdc.useModule('ti.sysbios.BIOS'); BIOS.smpEnabled = true; /* -------------------------------- CORE0 ----------------------------------*/ var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc'); MultiProc.setConfig("IPU", ["HOST", "IPU", "DSP"]); /* ----------------------------- TICK ---------------------------------------*/ var Clock = xdc.useModule('ti.sysbios.knl.Clock'); Clock.tickSource = Clock.TickSource_USER; /* Configure GPTimer3 as BIOS clock source */ Clock.timerId = 0; var Timer = xdc.useModule('ti.sysbios.timers.dmtimer.Timer'); var timerParams = new Timer.Params(); timerParams.period = Clock.tickPeriod; timerParams.periodType = Timer.PeriodType_MICROSECS; /* Smart-idle wake-up-capable mode */ timerParams.tiocpCfg.idlemode = 0x3; /* Wake-up generation for Overflow */ timerParams.twer.ovf_wup_ena = 0x1; Timer.create(Clock.timerId, Clock.doTick, timerParams); /* Modules used in Power Management */ xdc.loadPackage('ti.pm'); var Power = xdc.useModule('ti.sysbios.family.arm.ducati.smp.Power'); Power.loadSegment = "PM_DATA"; /* Idle functions - PM functions should be last */ var Idle = xdc.useModule('ti.sysbios.knl.Idle'); /* Function to flush unicache in each core */ Idle.addCoreFunc('&VirtQueue_cacheWb', 0); Idle.addCoreFunc('&VirtQueue_cacheWb', 1); var Hwi = xdc.useModule('ti.sysbios.family.arm.m3.Hwi'); Hwi.enableException = true; var Deh = xdc.useModule('ti.deh.Deh'); /* Watchdog detection functions in each core */ /* Must be placed before pwr mgmt */ Idle.addCoreFunc('&ti_deh_Deh_idleBegin', 0); Idle.addCoreFunc('&ti_deh_Deh_idleBegin', 1); /* Idle Power Management functions for each core */ Idle.addCoreFunc('&IpcPower_idle', 0); /* IpcPower_idle must be at the end */ Idle.addCoreFunc('&IpcPower_idle', 1); /* IpcPower_idle must be at the end */ Program.sectMap[".tracebuf"] = "TRACE_BUF"; Program.sectMap[".errorbuf"] = "EXC_DATA";