Home | History | Annotate | Line # | Download | only in vchi
      1  1.1  jmcneill /**
      2  1.1  jmcneill  * Copyright (c) 2010-2012 Broadcom. All rights reserved.
      3  1.1  jmcneill  *
      4  1.1  jmcneill  * Redistribution and use in source and binary forms, with or without
      5  1.1  jmcneill  * modification, are permitted provided that the following conditions
      6  1.1  jmcneill  * are met:
      7  1.1  jmcneill  * 1. Redistributions of source code must retain the above copyright
      8  1.1  jmcneill  *    notice, this list of conditions, and the following disclaimer,
      9  1.1  jmcneill  *    without modification.
     10  1.1  jmcneill  * 2. Redistributions in binary form must reproduce the above copyright
     11  1.1  jmcneill  *    notice, this list of conditions and the following disclaimer in the
     12  1.1  jmcneill  *    documentation and/or other materials provided with the distribution.
     13  1.1  jmcneill  * 3. The names of the above-listed copyright holders may not be used
     14  1.1  jmcneill  *    to endorse or promote products derived from this software without
     15  1.1  jmcneill  *    specific prior written permission.
     16  1.1  jmcneill  *
     17  1.1  jmcneill  * ALTERNATIVELY, this software may be distributed under the terms of the
     18  1.1  jmcneill  * GNU General Public License ("GPL") version 2, as published by the Free
     19  1.1  jmcneill  * Software Foundation.
     20  1.1  jmcneill  *
     21  1.1  jmcneill  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
     22  1.1  jmcneill  * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
     23  1.1  jmcneill  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     24  1.1  jmcneill  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
     25  1.1  jmcneill  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
     26  1.1  jmcneill  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     27  1.1  jmcneill  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
     28  1.1  jmcneill  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
     29  1.1  jmcneill  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
     30  1.1  jmcneill  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
     31  1.1  jmcneill  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     32  1.1  jmcneill  */
     33  1.1  jmcneill 
     34  1.1  jmcneill #ifndef VCHI_H_
     35  1.1  jmcneill #define VCHI_H_
     36  1.1  jmcneill 
     37  1.1  jmcneill #include "interface/vchi/vchi_cfg.h"
     38  1.1  jmcneill #include "interface/vchi/vchi_common.h"
     39  1.1  jmcneill #include "interface/vchi/connections/connection.h"
     40  1.1  jmcneill #include "vchi_mh.h"
     41  1.1  jmcneill 
     42  1.1  jmcneill 
     43  1.1  jmcneill /******************************************************************************
     44  1.1  jmcneill  Global defs
     45  1.1  jmcneill  *****************************************************************************/
     46  1.1  jmcneill 
     47  1.1  jmcneill #define VCHI_BULK_ROUND_UP(x)     ((((unsigned long)(x))+VCHI_BULK_ALIGN-1) & ~(VCHI_BULK_ALIGN-1))
     48  1.1  jmcneill #define VCHI_BULK_ROUND_DOWN(x)   (((unsigned long)(x)) & ~(VCHI_BULK_ALIGN-1))
     49  1.1  jmcneill #define VCHI_BULK_ALIGN_NBYTES(x) (VCHI_BULK_ALIGNED(x) ? 0 : (VCHI_BULK_ALIGN - ((unsigned long)(x) & (VCHI_BULK_ALIGN-1))))
     50  1.1  jmcneill 
     51  1.1  jmcneill #ifdef USE_VCHIQ_ARM
     52  1.1  jmcneill #define VCHI_BULK_ALIGNED(x)      1
     53  1.1  jmcneill #else
     54  1.1  jmcneill #define VCHI_BULK_ALIGNED(x)      (((unsigned long)(x) & (VCHI_BULK_ALIGN-1)) == 0)
     55  1.1  jmcneill #endif
     56  1.1  jmcneill 
     57  1.1  jmcneill struct vchi_version {
     58  1.1  jmcneill 	uint32_t version;
     59  1.1  jmcneill 	uint32_t version_min;
     60  1.1  jmcneill };
     61  1.1  jmcneill #define VCHI_VERSION(v_) { v_, v_ }
     62  1.1  jmcneill #define VCHI_VERSION_EX(v_, m_) { v_, m_ }
     63  1.1  jmcneill 
     64  1.1  jmcneill typedef enum
     65  1.1  jmcneill {
     66  1.1  jmcneill    VCHI_VEC_POINTER,
     67  1.1  jmcneill    VCHI_VEC_HANDLE,
     68  1.1  jmcneill    VCHI_VEC_LIST
     69  1.1  jmcneill } VCHI_MSG_VECTOR_TYPE_T;
     70  1.1  jmcneill 
     71  1.1  jmcneill typedef struct vchi_msg_vector_ex {
     72  1.1  jmcneill 
     73  1.1  jmcneill    VCHI_MSG_VECTOR_TYPE_T type;
     74  1.1  jmcneill    union
     75  1.1  jmcneill    {
     76  1.1  jmcneill       // a memory handle
     77  1.1  jmcneill       struct
     78  1.1  jmcneill       {
     79  1.1  jmcneill          VCHI_MEM_HANDLE_T handle;
     80  1.1  jmcneill          uint32_t offset;
     81  1.1  jmcneill          int32_t vec_len;
     82  1.1  jmcneill       } handle;
     83  1.1  jmcneill 
     84  1.1  jmcneill       // an ordinary data pointer
     85  1.1  jmcneill       struct
     86  1.1  jmcneill       {
     87  1.1  jmcneill          const void *vec_base;
     88  1.1  jmcneill          int32_t vec_len;
     89  1.1  jmcneill       } ptr;
     90  1.1  jmcneill 
     91  1.1  jmcneill       // a nested vector list
     92  1.1  jmcneill       struct
     93  1.1  jmcneill       {
     94  1.1  jmcneill          struct vchi_msg_vector_ex *vec;
     95  1.1  jmcneill          uint32_t vec_len;
     96  1.1  jmcneill       } list;
     97  1.1  jmcneill    } u;
     98  1.1  jmcneill } VCHI_MSG_VECTOR_EX_T;
     99  1.1  jmcneill 
    100  1.1  jmcneill 
    101  1.1  jmcneill // Construct an entry in a msg vector for a pointer (p) of length (l)
    102  1.1  jmcneill #define VCHI_VEC_POINTER(p,l)  VCHI_VEC_POINTER, { { (VCHI_MEM_HANDLE_T)(p), (l) } }
    103  1.1  jmcneill 
    104  1.1  jmcneill // Construct an entry in a msg vector for a message handle (h), starting at offset (o) of length (l)
    105  1.1  jmcneill #define VCHI_VEC_HANDLE(h,o,l) VCHI_VEC_HANDLE,  { { (h), (o), (l) } }
    106  1.1  jmcneill 
    107  1.1  jmcneill // Macros to manipulate 'FOURCC' values
    108  1.1  jmcneill #define MAKE_FOURCC(x) ((int32_t)( (x[0] << 24) | (x[1] << 16) | (x[2] << 8) | x[3] ))
    109  1.1  jmcneill #define FOURCC_TO_CHAR(x) (x >> 24) & 0xFF,(x >> 16) & 0xFF,(x >> 8) & 0xFF, x & 0xFF
    110  1.1  jmcneill 
    111  1.1  jmcneill 
    112  1.1  jmcneill // Opaque service information
    113  1.1  jmcneill struct opaque_vchi_service_t;
    114  1.1  jmcneill 
    115  1.1  jmcneill // Descriptor for a held message. Allocated by client, initialised by vchi_msg_hold,
    116  1.1  jmcneill // vchi_msg_iter_hold or vchi_msg_iter_hold_next. Fields are for internal VCHI use only.
    117  1.1  jmcneill typedef struct
    118  1.1  jmcneill {
    119  1.1  jmcneill    struct opaque_vchi_service_t *service;
    120  1.1  jmcneill    void *message;
    121  1.1  jmcneill } VCHI_HELD_MSG_T;
    122  1.1  jmcneill 
    123  1.1  jmcneill 
    124  1.1  jmcneill 
    125  1.1  jmcneill // structure used to provide the information needed to open a server or a client
    126  1.1  jmcneill typedef struct {
    127  1.1  jmcneill 	struct vchi_version version;
    128  1.1  jmcneill 	int32_t service_id;
    129  1.1  jmcneill 	VCHI_CONNECTION_T *connection;
    130  1.1  jmcneill 	uint32_t rx_fifo_size;
    131  1.1  jmcneill 	uint32_t tx_fifo_size;
    132  1.1  jmcneill 	VCHI_CALLBACK_T callback;
    133  1.1  jmcneill 	void *callback_param;
    134  1.1  jmcneill 	/* client intends to receive bulk transfers of
    135  1.1  jmcneill 		odd lengths or into unaligned buffers */
    136  1.1  jmcneill 	int32_t want_unaligned_bulk_rx;
    137  1.1  jmcneill 	/* client intends to transmit bulk transfers of
    138  1.1  jmcneill 		odd lengths or out of unaligned buffers */
    139  1.1  jmcneill 	int32_t want_unaligned_bulk_tx;
    140  1.1  jmcneill 	/* client wants to check CRCs on (bulk) xfers.
    141  1.1  jmcneill 		Only needs to be set at 1 end - will do both directions. */
    142  1.1  jmcneill 	int32_t want_crc;
    143  1.1  jmcneill } SERVICE_CREATION_T;
    144  1.1  jmcneill 
    145  1.1  jmcneill // Opaque handle for a VCHI instance
    146  1.1  jmcneill typedef struct opaque_vchi_instance_handle_t *VCHI_INSTANCE_T;
    147  1.1  jmcneill 
    148  1.1  jmcneill // Opaque handle for a server or client
    149  1.1  jmcneill typedef struct opaque_vchi_service_handle_t *VCHI_SERVICE_HANDLE_T;
    150  1.1  jmcneill 
    151  1.1  jmcneill // Service registration & startup
    152  1.1  jmcneill typedef void (*VCHI_SERVICE_INIT)(VCHI_INSTANCE_T initialise_instance, VCHI_CONNECTION_T **connections, uint32_t num_connections);
    153  1.1  jmcneill 
    154  1.1  jmcneill typedef struct service_info_tag {
    155  1.1  jmcneill    const char * const vll_filename; /* VLL to load to start this service. This is an empty string if VLL is "static" */
    156  1.1  jmcneill    VCHI_SERVICE_INIT init;          /* Service initialisation function */
    157  1.1  jmcneill    void *vll_handle;                /* VLL handle; NULL when unloaded or a "static VLL" in build */
    158  1.1  jmcneill } SERVICE_INFO_T;
    159  1.1  jmcneill 
    160  1.1  jmcneill /******************************************************************************
    161  1.1  jmcneill  Global funcs - implementation is specific to which side you are on (local / remote)
    162  1.1  jmcneill  *****************************************************************************/
    163  1.1  jmcneill 
    164  1.1  jmcneill #ifdef __cplusplus
    165  1.1  jmcneill extern "C" {
    166  1.1  jmcneill #endif
    167  1.1  jmcneill 
    168  1.1  jmcneill extern /*@observer@*/ VCHI_CONNECTION_T * vchi_create_connection( const VCHI_CONNECTION_API_T * function_table,
    169  1.1  jmcneill                                                    const VCHI_MESSAGE_DRIVER_T * low_level);
    170  1.1  jmcneill 
    171  1.1  jmcneill 
    172  1.1  jmcneill // Routine used to initialise the vchi on both local + remote connections
    173  1.1  jmcneill extern int32_t vchi_initialise( VCHI_INSTANCE_T *instance_handle );
    174  1.1  jmcneill 
    175  1.1  jmcneill extern int32_t vchi_exit( void );
    176  1.1  jmcneill 
    177  1.1  jmcneill extern int32_t vchi_connect( VCHI_CONNECTION_T **connections,
    178  1.1  jmcneill                              const uint32_t num_connections,
    179  1.1  jmcneill                              VCHI_INSTANCE_T instance_handle );
    180  1.1  jmcneill 
    181  1.1  jmcneill //When this is called, ensure that all services have no data pending.
    182  1.1  jmcneill //Bulk transfers can remain 'queued'
    183  1.1  jmcneill extern int32_t vchi_disconnect( VCHI_INSTANCE_T instance_handle );
    184  1.1  jmcneill 
    185  1.1  jmcneill // Global control over bulk CRC checking
    186  1.1  jmcneill extern int32_t vchi_crc_control( VCHI_CONNECTION_T *connection,
    187  1.1  jmcneill                                  VCHI_CRC_CONTROL_T control );
    188  1.1  jmcneill 
    189  1.1  jmcneill // helper functions
    190  1.1  jmcneill extern void * vchi_allocate_buffer(VCHI_SERVICE_HANDLE_T handle, uint32_t *length);
    191  1.1  jmcneill extern void vchi_free_buffer(VCHI_SERVICE_HANDLE_T handle, void *address);
    192  1.1  jmcneill extern uint32_t vchi_current_time(VCHI_INSTANCE_T instance_handle);
    193  1.1  jmcneill 
    194  1.1  jmcneill 
    195  1.1  jmcneill /******************************************************************************
    196  1.1  jmcneill  Global service API
    197  1.1  jmcneill  *****************************************************************************/
    198  1.1  jmcneill // Routine to create a named service
    199  1.1  jmcneill extern int32_t vchi_service_create( VCHI_INSTANCE_T instance_handle,
    200  1.1  jmcneill                                     SERVICE_CREATION_T *setup,
    201  1.1  jmcneill                                     VCHI_SERVICE_HANDLE_T *handle );
    202  1.1  jmcneill 
    203  1.1  jmcneill // Routine to destory a service
    204  1.1  jmcneill extern int32_t vchi_service_destroy( const VCHI_SERVICE_HANDLE_T handle );
    205  1.1  jmcneill 
    206  1.1  jmcneill // Routine to open a named service
    207  1.1  jmcneill extern int32_t vchi_service_open( VCHI_INSTANCE_T instance_handle,
    208  1.1  jmcneill                                   SERVICE_CREATION_T *setup,
    209  1.1  jmcneill                                   VCHI_SERVICE_HANDLE_T *handle);
    210  1.1  jmcneill 
    211  1.1  jmcneill extern int32_t vchi_get_peer_version( const VCHI_SERVICE_HANDLE_T handle,
    212  1.1  jmcneill                                       short *peer_version );
    213  1.1  jmcneill 
    214  1.1  jmcneill // Routine to close a named service
    215  1.1  jmcneill extern int32_t vchi_service_close( const VCHI_SERVICE_HANDLE_T handle );
    216  1.1  jmcneill 
    217  1.1  jmcneill // Routine to increment ref count on a named service
    218  1.1  jmcneill extern int32_t vchi_service_use( const VCHI_SERVICE_HANDLE_T handle );
    219  1.1  jmcneill 
    220  1.1  jmcneill // Routine to decrement ref count on a named service
    221  1.1  jmcneill extern int32_t vchi_service_release( const VCHI_SERVICE_HANDLE_T handle );
    222  1.1  jmcneill 
    223  1.2     skrll // Routine to set a control option for a named service
    224  1.2     skrll extern int32_t vchi_service_set_option( const VCHI_SERVICE_HANDLE_T handle,
    225  1.2     skrll 					VCHI_SERVICE_OPTION_T option,
    226  1.2     skrll 					int value);
    227  1.2     skrll 
    228  1.2     skrll // Routine to send a message across a service
    229  1.1  jmcneill extern int32_t vchi_msg_queue( VCHI_SERVICE_HANDLE_T handle,
    230  1.1  jmcneill                                const void *data,
    231  1.1  jmcneill                                uint32_t data_size,
    232  1.1  jmcneill                                VCHI_FLAGS_T flags,
    233  1.1  jmcneill                                void *msg_handle );
    234  1.1  jmcneill 
    235  1.1  jmcneill // scatter-gather (vector) and send message
    236  1.1  jmcneill int32_t vchi_msg_queuev_ex( VCHI_SERVICE_HANDLE_T handle,
    237  1.1  jmcneill                             VCHI_MSG_VECTOR_EX_T *vector,
    238  1.1  jmcneill                             uint32_t count,
    239  1.1  jmcneill                             VCHI_FLAGS_T flags,
    240  1.1  jmcneill                             void *msg_handle );
    241  1.1  jmcneill 
    242  1.1  jmcneill // legacy scatter-gather (vector) and send message, only handles pointers
    243  1.1  jmcneill int32_t vchi_msg_queuev( VCHI_SERVICE_HANDLE_T handle,
    244  1.1  jmcneill                          VCHI_MSG_VECTOR_T *vector,
    245  1.1  jmcneill                          uint32_t count,
    246  1.1  jmcneill                          VCHI_FLAGS_T flags,
    247  1.1  jmcneill                          void *msg_handle );
    248  1.1  jmcneill 
    249  1.1  jmcneill // Routine to receive a msg from a service
    250  1.1  jmcneill // Dequeue is equivalent to hold, copy into client buffer, release
    251  1.1  jmcneill extern int32_t vchi_msg_dequeue( VCHI_SERVICE_HANDLE_T handle,
    252  1.1  jmcneill                                  void *data,
    253  1.1  jmcneill                                  uint32_t max_data_size_to_read,
    254  1.1  jmcneill                                  uint32_t *actual_msg_size,
    255  1.1  jmcneill                                  VCHI_FLAGS_T flags );
    256  1.1  jmcneill 
    257  1.1  jmcneill // Routine to look at a message in place.
    258  1.1  jmcneill // The message is not dequeued, so a subsequent call to peek or dequeue
    259  1.1  jmcneill // will return the same message.
    260  1.1  jmcneill extern int32_t vchi_msg_peek( VCHI_SERVICE_HANDLE_T handle,
    261  1.1  jmcneill                               void **data,
    262  1.1  jmcneill                               uint32_t *msg_size,
    263  1.1  jmcneill                               VCHI_FLAGS_T flags );
    264  1.1  jmcneill 
    265  1.1  jmcneill // Routine to remove a message after it has been read in place with peek
    266  1.1  jmcneill // The first message on the queue is dequeued.
    267  1.1  jmcneill extern int32_t vchi_msg_remove( VCHI_SERVICE_HANDLE_T handle );
    268  1.1  jmcneill 
    269  1.1  jmcneill // Routine to look at a message in place.
    270  1.1  jmcneill // The message is dequeued, so the caller is left holding it; the descriptor is
    271  1.1  jmcneill // filled in and must be released when the user has finished with the message.
    272  1.1  jmcneill extern int32_t vchi_msg_hold( VCHI_SERVICE_HANDLE_T handle,
    273  1.1  jmcneill                               void **data,        // } may be NULL, as info can be
    274  1.1  jmcneill                               uint32_t *msg_size, // } obtained from HELD_MSG_T
    275  1.1  jmcneill                               VCHI_FLAGS_T flags,
    276  1.1  jmcneill                               VCHI_HELD_MSG_T *message_descriptor );
    277  1.1  jmcneill 
    278  1.1  jmcneill // Initialise an iterator to look through messages in place
    279  1.1  jmcneill extern int32_t vchi_msg_look_ahead( VCHI_SERVICE_HANDLE_T handle,
    280  1.1  jmcneill                                     VCHI_MSG_ITER_T *iter,
    281  1.1  jmcneill                                     VCHI_FLAGS_T flags );
    282  1.1  jmcneill 
    283  1.1  jmcneill /******************************************************************************
    284  1.1  jmcneill  Global service support API - operations on held messages and message iterators
    285  1.1  jmcneill  *****************************************************************************/
    286  1.1  jmcneill 
    287  1.1  jmcneill // Routine to get the address of a held message
    288  1.1  jmcneill extern void *vchi_held_msg_ptr( const VCHI_HELD_MSG_T *message );
    289  1.1  jmcneill 
    290  1.1  jmcneill // Routine to get the size of a held message
    291  1.1  jmcneill extern int32_t vchi_held_msg_size( const VCHI_HELD_MSG_T *message );
    292  1.1  jmcneill 
    293  1.1  jmcneill // Routine to get the transmit timestamp as written into the header by the peer
    294  1.1  jmcneill extern uint32_t vchi_held_msg_tx_timestamp( const VCHI_HELD_MSG_T *message );
    295  1.1  jmcneill 
    296  1.1  jmcneill // Routine to get the reception timestamp, written as we parsed the header
    297  1.1  jmcneill extern uint32_t vchi_held_msg_rx_timestamp( const VCHI_HELD_MSG_T *message );
    298  1.1  jmcneill 
    299  1.1  jmcneill // Routine to release a held message after it has been processed
    300  1.1  jmcneill extern int32_t vchi_held_msg_release( VCHI_HELD_MSG_T *message );
    301  1.1  jmcneill 
    302  1.1  jmcneill // Indicates whether the iterator has a next message.
    303  1.1  jmcneill extern int32_t vchi_msg_iter_has_next( const VCHI_MSG_ITER_T *iter );
    304  1.1  jmcneill 
    305  1.1  jmcneill // Return the pointer and length for the next message and advance the iterator.
    306  1.1  jmcneill extern int32_t vchi_msg_iter_next( VCHI_MSG_ITER_T *iter,
    307  1.1  jmcneill                                    void **data,
    308  1.1  jmcneill                                    uint32_t *msg_size );
    309  1.1  jmcneill 
    310  1.1  jmcneill // Remove the last message returned by vchi_msg_iter_next.
    311  1.1  jmcneill // Can only be called once after each call to vchi_msg_iter_next.
    312  1.1  jmcneill extern int32_t vchi_msg_iter_remove( VCHI_MSG_ITER_T *iter );
    313  1.1  jmcneill 
    314  1.1  jmcneill // Hold the last message returned by vchi_msg_iter_next.
    315  1.1  jmcneill // Can only be called once after each call to vchi_msg_iter_next.
    316  1.1  jmcneill extern int32_t vchi_msg_iter_hold( VCHI_MSG_ITER_T *iter,
    317  1.1  jmcneill                                    VCHI_HELD_MSG_T *message );
    318  1.1  jmcneill 
    319  1.1  jmcneill // Return information for the next message, and hold it, advancing the iterator.
    320  1.1  jmcneill extern int32_t vchi_msg_iter_hold_next( VCHI_MSG_ITER_T *iter,
    321  1.1  jmcneill                                         void **data,        // } may be NULL
    322  1.1  jmcneill                                         uint32_t *msg_size, // }
    323  1.1  jmcneill                                         VCHI_HELD_MSG_T *message );
    324  1.1  jmcneill 
    325  1.1  jmcneill 
    326  1.1  jmcneill /******************************************************************************
    327  1.1  jmcneill  Global bulk API
    328  1.1  jmcneill  *****************************************************************************/
    329  1.1  jmcneill 
    330  1.1  jmcneill // Routine to prepare interface for a transfer from the other side
    331  1.1  jmcneill extern int32_t vchi_bulk_queue_receive( VCHI_SERVICE_HANDLE_T handle,
    332  1.1  jmcneill                                         void *data_dst,
    333  1.1  jmcneill                                         uint32_t data_size,
    334  1.1  jmcneill                                         VCHI_FLAGS_T flags,
    335  1.1  jmcneill                                         void *transfer_handle );
    336  1.1  jmcneill 
    337  1.1  jmcneill 
    338  1.1  jmcneill // Prepare interface for a transfer from the other side into relocatable memory.
    339  1.1  jmcneill int32_t vchi_bulk_queue_receive_reloc( const VCHI_SERVICE_HANDLE_T handle,
    340  1.1  jmcneill                                        VCHI_MEM_HANDLE_T h_dst,
    341  1.1  jmcneill                                        uint32_t offset,
    342  1.1  jmcneill                                        uint32_t data_size,
    343  1.1  jmcneill                                        const VCHI_FLAGS_T flags,
    344  1.1  jmcneill                                        void * const bulk_handle );
    345  1.1  jmcneill 
    346  1.1  jmcneill // Routine to queue up data ready for transfer to the other (once they have signalled they are ready)
    347  1.1  jmcneill extern int32_t vchi_bulk_queue_transmit( VCHI_SERVICE_HANDLE_T handle,
    348  1.1  jmcneill                                          void *data_src,
    349  1.1  jmcneill                                          uint32_t data_size,
    350  1.1  jmcneill                                          VCHI_FLAGS_T flags,
    351  1.1  jmcneill                                          void *transfer_handle );
    352  1.1  jmcneill 
    353  1.1  jmcneill 
    354  1.1  jmcneill /******************************************************************************
    355  1.1  jmcneill  Configuration plumbing
    356  1.1  jmcneill  *****************************************************************************/
    357  1.1  jmcneill 
    358  1.1  jmcneill // function prototypes for the different mid layers (the state info gives the different physical connections)
    359  1.1  jmcneill extern const VCHI_CONNECTION_API_T *single_get_func_table( void );
    360  1.1  jmcneill //extern const VCHI_CONNECTION_API_T *local_server_get_func_table( void );
    361  1.1  jmcneill //extern const VCHI_CONNECTION_API_T *local_client_get_func_table( void );
    362  1.1  jmcneill 
    363  1.1  jmcneill // declare all message drivers here
    364  1.1  jmcneill const VCHI_MESSAGE_DRIVER_T *vchi_mphi_message_driver_func_table( void );
    365  1.1  jmcneill 
    366  1.1  jmcneill #ifdef __cplusplus
    367  1.1  jmcneill }
    368  1.1  jmcneill #endif
    369  1.1  jmcneill 
    370  1.1  jmcneill extern int32_t vchi_bulk_queue_transmit_reloc( VCHI_SERVICE_HANDLE_T handle,
    371  1.1  jmcneill                                                VCHI_MEM_HANDLE_T h_src,
    372  1.1  jmcneill                                                uint32_t offset,
    373  1.1  jmcneill                                                uint32_t data_size,
    374  1.1  jmcneill                                                VCHI_FLAGS_T flags,
    375  1.1  jmcneill                                                void *transfer_handle );
    376  1.1  jmcneill #endif /* VCHI_H_ */
    377  1.1  jmcneill 
    378  1.1  jmcneill /****************************** End of file **********************************/
    379