1    /*
     2     *  Copyright 2013 by Texas Instruments Incorporated.
     3     *
     4     */
     5    
     6    /*
     7     * Copyright (c) 2013, Texas Instruments Incorporated
     8     * All rights reserved.
     9     *
    10     * Redistribution and use in source and binary forms, with or without
    11     * modification, are permitted provided that the following conditions
    12     * are met:
    13     *
    14     * *  Redistributions of source code must retain the above copyright
    15     *    notice, this list of conditions and the following disclaimer.
    16     *
    17     * *  Redistributions in binary form must reproduce the above copyright
    18     *    notice, this list of conditions and the following disclaimer in the
    19     *    documentation and/or other materials provided with the distribution.
    20     *
    21     * *  Neither the name of Texas Instruments Incorporated nor the names of
    22     *    its contributors may be used to endorse or promote products derived
    23     *    from this software without specific prior written permission.
    24     *
    25     * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    26     * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
    27     * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    28     * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
    29     * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
    30     * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
    31     * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
    32     * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
    33     * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
    34     * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
    35     * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    36     *
    37     */
    38    
    39    /*!
    40     *  ======== Global ========
    41     *  Global OS Abstract Layer Configuration
    42     */
    43    @Template("./Global.xdt")
    44    
    45    metaonly module Global {
    46    
    47        /*!
    48         *  ======== os ========
    49         *  A specific OSAL implementations "Settings" module, for example,
    50         *  ti.sdo.ce.osal.bios.Settings or ti.sdo.ce.osal.linux.Settings.
    51         *  To set the OS of the executable to BIOS, set Global.os to:
    52         *  xdc.useModule('ti.sdo.ce.osal.bios.Settings').
    53         *
    54         *  When this config param is used, the {@ link ti.sdo.ce.ipc.Settings#ipc
    55         *  config param must also be set.
    56         *
    57         *  This should only be used to explicitly configure the OSAL to
    58         *  a package not provided with Codec Engine.  To use an OSAL provided
    59         *  by Codec Engine, it's recommended to configure the OSAL using
    60         *  the runtimeEnv config param instead of this one.
    61         *
    62         *  See {@ link http://wiki.davincidsp.com/index.php?title=CE_Config_Updates
    63         *  for more details}
    64         *
    65         *  @see runtimeEnv
    66         */
    67        config IOsal.Module os;
    68    
    69        /*!
    70         *  ======== RuntimeOS ========
    71         *  All runtime OSs that are abstracted by this package.
    72         *
    73         *  @see runtimeEnv
    74         */
    75        enum RuntimeEnv {
    76            NONE          = 0,   /*! no OS; threads are not truly supported */
    77            DSPBIOS       = 1,   /*! DSP/BIOS  */
    78            LINUX         = 2,   /*! Linux */
    79            DSPLINK_BIOS  = 3,   /*! DSPLINK + BIOS (DSP) */
    80            DSPLINK_LINUX = 4,   /*! DSPLINK + Linux (ARM) */
    81            WINCE         = 5,   /*! Windows CE */
    82            DSPLINK_WINCE = 6    /*! DSPLINK + Windows CE (ARM) */
    83        };
    84    
    85        /*!
    86         *  ======== runtimeEnv ========
    87         *  The runtime OS used to implement the abstractions provided by
    88         *  this package.
    89         *
    90         *  @see RuntimeEnv
    91         */
    92        config RuntimeEnv runtimeEnv;
    93    
    94        /*!
    95         *  ======== skipVirtualAddressTranslation ========
    96         *  If set to true, will make Memory_getBufferPhysicalAddress()
    97         *  skip address translation and return the given address as the
    98         *  physical address. Needed when the VISA calls are made with
    99         *  physical buffer addresses instead of virtual ones, specifically
   100         *  in the multi-process-via-kernel-driver case.
   101         *
   102         *  Applies only to environments where virtual memory is used (e.g. Linux)
   103         *  @_nodoc
   104         */
   105        config bool skipVirtualAddressTranslation = false;
   106    
   107        /*!
   108         *  ======== embedBuildInfo ========
   109         *  Indication whether to embed build info (packages and their directories)
   110         *  into the generated executable for debugging/diagnostic purposes.
   111         *  Setting this to 'false' may reduce the static data size by around 1K.
   112         *  Applies to all configurations.
   113         */
   114        config Bool embedBuildInfo = true;
   115    
   116        /*!
   117         *  ======== addObjectToProgramInfoFile ========
   118         *  Internal method for adding an object to an XML-like program info file
   119         *  created alongside the executable
   120         * @_nodoc
   121         */
   122        function addObjectToProgramInfoFile( objName, obj );
   123    
   124        /*!
   125         *  ======== parseInfoFile ========
   126         *  Internal method for parsing an XML-like server program file
   127         *  that lies alongside the executable
   128         * @_nodoc
   129         */
   130        function parseInfoFile( infoFile );
   131    
   132        /*!
   133         *  ======== validate ========
   134         *  Internal validate method (see package.xs)
   135         * @_nodoc
   136         */
   137        function validate();
   138    
   139    }
   140    /*
   141     *  @(#) ti.sdo.ce.osal; 2, 0, 2,3; 6-13-2013 00:16:36; /db/atree/library/trees/ce/ce-w08/src/ xlibrary
   142    
   143     */
   144