1    /* --COPYRIGHT--,BSD
     2     * Copyright (c) $(CPYYEAR), 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     * --/COPYRIGHT--*/
    32    /*
    33     *  ======== IGateMPSupport.xdc ========
    34     *
    35     *! Revision History
    36     *! ================
    37     *! 31-Mar-2010 skp     Fixed [resource/region]Id types
    38     */
    39    
    40    import xdc.runtime.IGateProvider;
    41    
    42    /*!
    43     *  ======== IGateMPSupport ========
    44     */
    45    interface IGateMPSupport inherits IGateProvider 
    46    {
    47        /*!
    48         *  ======== getNumResources ========
    49         *  Returns the number of resources offered by the GateMP delegate
    50         */
    51        metaonly UInt getNumResources();
    52        
    53        /*!
    54         *  ======== getReservedMask ========
    55         *  @_nodoc
    56         *  Used by GateMP to query which HW resources are reserved
    57         */
    58        @DirectCall
    59        Bits32 *getReservedMask();
    60        
    61        /*!
    62         *  ======== sharedMemReq ========
    63         *  Amount of shared memory required for creation of each instance
    64         *
    65         *  The value returned by this function may depend on the cache alignment
    66         *  requirements for the shared region from which memory will be used.
    67         *
    68         *  @param(params)      Pointer to the parameters that will be used in
    69         *                      the create.
    70         *
    71         *  @a(returns)         Number of MAUs needed to create the instance.
    72         */
    73        @DirectCall
    74        SizeT sharedMemReq(const Params *params);
    75    
    76        /*!
    77         *  ======== getRemoteStatus$view ========
    78         *  @_nodoc
    79         *  ROV helper function that returns the status of the remote gate
    80         *
    81         *  @b(returns)     Gate status
    82         */
    83        metaonly String getRemoteStatus$view(IGateProvider.Handle handle);
    84        
    85    instance:
    86    
    87        /*! 
    88         *  Logical resource id
    89         */
    90        config UInt resourceId = 0;
    91        
    92        /*! @_nodoc
    93         *  ======== openFlag ========    
    94         */
    95        config Bool openFlag = false;
    96            
    97        /*!
    98         *  ======== regionId ========
    99         *  @_nodoc
   100         *  Shared Region Id
   101         * 
   102         *  The ID corresponding to the shared region in which this shared instance
   103         *  is to be placed.
   104         */
   105        config UInt16 regionId = 0;
   106    
   107        /*!
   108         *  ======== sharedAddr ========
   109         *  Physical address of the shared memory
   110         *
   111         *  This parameter is only used by GateMP delegates that use shared memory
   112         */
   113        config Ptr sharedAddr = null;
   114        
   115        /*!
   116         *  ======== create ========     
   117         *  Create a remote gate instance.
   118         *
   119         *  A Non-NULL gate for local protection must be passed to the create
   120         *  call.  If no local protection is desired, a 
   121         *  {@link xdc.runtime.GateNull} handle must be passed in.
   122         *
   123         *  @param(localGate)       Gate to use for local protection.
   124         */
   125        create(IGateProvider.Handle localGate);
   126    }