1    /* 
     2     * Copyright (c) 2012, 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     * 
    32     */
    33    
    34    /*!
    35     *  ======== Global ========
    36     *  Global OS Abstract Layer Configuration
    37     */
    38    @Template("./Global.xdt")
    39    
    40    metaonly module Global {
    41    
    42        /*!
    43         *  ======== os ========
    44         *  A specific OSAL implementations "Settings" module, for example,
    45         *  ti.sdo.ce.osal.bios.Settings or ti.sdo.ce.osal.linux.Settings.
    46         *  To set the OS of the executable to BIOS, set Global.os to:
    47         *  xdc.useModule('ti.sdo.ce.osal.bios.Settings').
    48         *
    49         *  When this config param is used, the {@ link ti.sdo.ce.ipc.Settings#ipc
    50         *  config param must also be set.
    51         *
    52         *  This should only be used to explicitly configure the OSAL to
    53         *  a package not provided with Codec Engine.  To use an OSAL provided
    54         *  by Codec Engine, it's recommended to configure the OSAL using
    55         *  the runtimeEnv config param instead of this one.
    56         *
    57         *  See {@ link http://wiki.davincidsp.com/index.php?title=CE_Config_Updates
    58         *  for more details}
    59         *
    60         *  @see runtimeEnv
    61         */
    62        config IOsal.Module os;
    63    
    64        /*!
    65         *  ======== RuntimeOS ========
    66         *  All runtime OSs that are abstracted by this package.
    67         *
    68         *  @see runtimeEnv
    69         */
    70        enum RuntimeEnv {
    71            NONE          = 0,   /*! no OS; threads are not truly supported */
    72            DSPBIOS       = 1,   /*! DSP/BIOS  */
    73            LINUX         = 2,   /*! Linux */
    74            DSPLINK_BIOS  = 3,   /*! DSPLINK + BIOS (DSP) */
    75            DSPLINK_LINUX = 4,   /*! DSPLINK + Linux (ARM) */
    76            WINCE         = 5,   /*! Windows CE */
    77            DSPLINK_WINCE = 6    /*! DSPLINK + Windows CE (ARM) */
    78        };
    79    
    80        /*!
    81         *  ======== runtimeEnv ========
    82         *  The runtime OS used to implement the abstractions provided by
    83         *  this package.
    84         *
    85         *  @see RuntimeEnv
    86         */
    87        config RuntimeEnv runtimeEnv;
    88    
    89        /*!
    90         *  ======== skipVirtualAddressTranslation ========
    91         *  If set to true, will make Memory_getBufferPhysicalAddress()
    92         *  skip address translation and return the given address as the
    93         *  physical address. Needed when the VISA calls are made with
    94         *  physical buffer addresses instead of virtual ones, specifically
    95         *  in the multi-process-via-kernel-driver case.
    96         *
    97         *  Applies only to environments where virtual memory is used (e.g. Linux)
    98         *  @_nodoc
    99         */
   100        config bool skipVirtualAddressTranslation = false;
   101    
   102        /*!
   103         *  ======== embedBuildInfo ========
   104         *  Indication whether to embed build info (packages and their directories)
   105         *  into the generated executable for debugging/diagnostic purposes.
   106         *  Setting this to 'false' may reduce the static data size by around 1K.
   107         *  Applies to all configurations.
   108         */
   109        config Bool embedBuildInfo = true;
   110    
   111        /*!
   112         *  ======== addObjectToProgramInfoFile ========
   113         *  Internal method for adding an object to an XML-like program info file
   114         *  created alongside the executable
   115         * @_nodoc
   116         */
   117        function addObjectToProgramInfoFile( objName, obj );
   118    
   119        /*!
   120         *  ======== parseInfoFile ========
   121         *  Internal method for parsing an XML-like server program file
   122         *  that lies alongside the executable
   123         * @_nodoc
   124         */
   125        function parseInfoFile( infoFile );
   126    
   127        /*!
   128         *  ======== validate ========
   129         *  Internal validate method (see package.xs)
   130         * @_nodoc
   131         */
   132        function validate();
   133    
   134    }
   135    /*
   136     *  @(#) ti.sdo.ce.osal; 2, 0, 2,1; 2-24-2012 19:30:12; /db/atree/library/trees/ce/ce-t06/src/ xlibrary
   137    
   138     */
   139