1    /* 
     2     * Copyright (c) 2010, 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     *  ======== IOsal ========
    35     *  OSAL interface
    36     *
    37     */
    38    metaonly interface IIpc
    39    {
    40        /*!
    41         *  ======== ArmDspLinkConfigMemTableEntry ========
    42         *  Description of one DSP memory segment entry.
    43         *
    44         *  @field(addr)   The beginning address of the segment
    45         *  @field(gppAddr) The GPP physical address of the segment (when needed)
    46         *  @field(size)   Size of the segment in bytes
    47         *  @field(type)   One of the following types:
    48         *                 "main"     -- main code/data segment (i.e. DDR2)
    49         *                 "link"     -- DSPLINKMEM segment
    50         *                 "reset"    -- RESETCTRL segment
    51         *                 "poolmem"  -- POOLMEM segment
    52         *                 "code"     -- dsp code/data, must map into GPP space
    53         *                 "other"    -- anything else
    54         */
    55        struct ArmDspLinkConfigMemTableEntry {
    56            UInt32 addr;
    57            UInt32 gppAddr;
    58            UInt32 size;
    59            String type;
    60        }
    61    
    62        /*!
    63         *  ======== DspManagement ========
    64         *  Value for controlling DSP from ARM w/ DspLink
    65         *
    66         *  @field(BootAndLoadDsp)    DspLink boots DSP and loads executable
    67         *  @field(BootDspAutonomously)    DspLink boots DSP w/o loading executable
    68         *  @field(None)    DspLink neither boots DSP nor loads executable
    69         */
    70        enum DspManagement {
    71            BootAndLoadDsp,
    72            BootDspAutonomously,
    73            None
    74        };
    75    
    76        /*!
    77         *  ======== ArmDspLinkConfig ========
    78         *  Configuration for the DspLink on the Arm side
    79         *
    80         *  Of the many fields that Link exposes for configuration,
    81         *  selected ones are exposed through this interface.
    82         *
    83         *  @field(memTable)    Memory table, describing all DSP segments.
    84         *                      NOTE: segments "DDR2" (or whatever is the name of
    85         *                      the main segment), "DSPLINKMEM", and
    86         *                      "RESETCTRL" must be present
    87         *
    88         *  @field(doPowerControl)    Flag indicating if Link should implement
    89         *                      power control of DSP.
    90         *
    91         *  @field(dspManagement)    Flag indicating how Link should boot/load DSP
    92         */
    93        struct ArmDspLinkConfig {
    94            ArmDspLinkConfigMemTableEntry memTable[string];
    95            Bool doPowerControl;
    96            DspManagement dspManagement;
    97            /* TODO:M add other select params here... */
    98        }
    99    
   100        /*!
   101         *  ======== LinkConfigEntry ========
   102         *  This structure associates a sever executable with an ipc link
   103         *  configuration. The type of the linkCfg field is left as "Any",
   104         *  since it will depend on the module that implements the IIpc
   105         *  interface. This is an internal field used only by codec engine
   106         *  scripting.
   107         *
   108         *  @_nodoc
   109         */
   110        struct LinkConfigEntry {
   111            string serverName;              /* Name of the server executable */
   112            ArmDspLinkConfig    linkCfg;         /* Link configuration */
   113        }
   114    
   115        /*!
   116         *  ======== linkConfigs ========
   117         *  Link configurations per server; if left undefined will be
   118         *  set to DEFAULT_ARMDSPLINKCONFIG, but with a warning. This is an
   119         *  internal field, set by the Engine scripting.
   120         *
   121         *  @_nodoc
   122         */
   123        config LinkConfigEntry linkConfigs[string];
   124    }
   125    /*
   126     *  @(#) ti.sdo.ce.ipc; 2, 0, 1,183; 12-2-2010 21:24:05; /db/atree/library/trees/ce/ce-r11x/src/ xlibrary
   127    
   128     */
   129