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     *  ======== IGateMPSupport.xdc ========
    34     *
    35     */
    36    
    37    import xdc.runtime.Error;
    38    import xdc.runtime.IGateProvider;
    39    
    40    /*!
    41     *  ======== IGateMPSupport ========
    42     */
    43    interface IGateMPSupport inherits IGateProvider {
    44    
    45        /*!
    46         *  Local protection enum
    47         *
    48         *  Must be the same GateMP. 
    49         */
    50        enum LocalProtect {
    51            LocalProtect_NONE      = 0,
    52            LocalProtect_INTERRUPT = 1,
    53            LocalProtect_TASKLET   = 2,
    54            LocalProtect_THREAD    = 3,
    55            LocalProtect_PROCESS   = 4
    56        };
    57        
    58        /*!
    59         *  ======== getNumResources ========
    60         *  Number of  gates instance within the module
    61         */
    62        metaonly UInt getNumResources();
    63        
    64        /*!
    65         *  ======== sharedMemReq ========
    66         *  Amount of shared memory required for creation of each instance
    67         *
    68         *  The value returned by this function may depend on the cache alignment
    69         *  requirements for the shared region from which memory will be used.
    70         *
    71         *  @param(params)      Pointer to the parameters that will be used in
    72         *                      the create.
    73         *
    74         *  @a(returns)         Number of MAUs needed to create the instance.
    75         */
    76        SizeT sharedMemReq(const Params *params);
    77    
    78        /*!
    79         *  ======== getRemoteStatus$view ========
    80         *  @_nodoc
    81         *  Returns the status of the remote gate
    82         *
    83         *  @b(returns)     Gate status
    84         */
    85        metaonly String getRemoteStatus$view(IGateProvider.Handle handle);
    86        
    87    instance:
    88        /*! 
    89         *  Logical resource id
    90         */
    91        config UInt resourceId = 0;
    92        
    93        /*! @_nodoc
    94         *  ======== openFlag ========    
    95         */
    96        config Bool openFlag = false;
    97            
    98        /*!
    99         *  ======== regionId ========
   100         *  @_nodoc
   101         *  Shared Region Id
   102         * 
   103         *  The ID corresponding to the shared region in which this shared instance
   104         *  is to be placed.
   105         */
   106        config UInt16 regionId = 0;
   107    
   108        /*!
   109         *  ======== sharedAddr ========
   110         *  Physical address of the shared memory
   111         *
   112         *  The creator must supply the shared memory that will be used
   113         *  for maintaining shared state information.  This parameter is used
   114         *  only when {@link #Type} is set to {@link #Type_SHARED}
   115         */
   116        config Ptr sharedAddr = null;
   117        
   118        /*!
   119         *  ======== create ========     
   120         *  Create a remote gate instance
   121         */
   122        create(LocalProtect localProtect);
   123    }
   124    /*
   125     *  @(#) ti.sdo.ipc.interfaces; 1, 0, 0, 0,347; 8-10-2010 17:49:15; /db/vtree/library/trees/ipc/ipc-e23x/src/
   126     */
   127