IPC API
3.00.04.29
Main Page
Modules
Data Structures
Files
Related Pages
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
ti
ipc
mm
MmRpc.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2012-2013, 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
43
#ifndef ti_ipc_mm_MmRpc__include
44
#define ti_ipc_mm_MmRpc__include
45
46
/* add includes here */
47
#include <stddef.h>
48
#include <stdint.h>
49
50
#if defined(__cplusplus)
51
extern
"C"
{
52
#endif
53
57
#define MmRpc_S_SUCCESS (0)
58
62
#define MmRpc_E_FAIL (-1)
63
67
#define MmRpc_E_INVALIDPARAM (-2)
68
72
#define MmRpc_MAX_PARAMS (10)
73
77
#define MmRpc_MAX_TRANSLATIONS (1024)
78
94
#define MmRpc_OFFSET(base, field) ((unsigned int)(field)-(unsigned int)(base))
95
99
typedef
struct
MmRpc_Object *
MmRpc_Handle
;
100
104
typedef
enum
{
105
MmRpc_ParamType_Scalar
= 1,
106
MmRpc_ParamType_Ptr
,
107
MmRpc_ParamType_Elem
108
}
MmRpc_ParamType
;
109
113
typedef
struct
{
114
MmRpc_ParamType
type
;
116
union
{
117
struct
{
118
size_t
size
;
119
size_t
data
;
120
} scalar;
121
122
struct
{
123
size_t
size;
124
size_t
addr
;
125
size_t
handle
;
126
} ptr;
127
128
#if 0
/* TBD */
129
struct
{
130
size_t
size;
131
size_t
offset;
132
size_t
base;
133
size_t
handle;
134
} elem;
135
#endif
136
} param;
137
}
MmRpc_Param
;
138
139
typedef
struct
{
140
uint32_t
index
;
141
ptrdiff_t
offset
;
142
size_t
handle
;
143
}
MmRpc_Xlt
;
144
148
typedef
struct
{
149
uint32_t
fxn_id
;
150
uint32_t
num_params
;
151
MmRpc_Param
params[
MmRpc_MAX_PARAMS
];
153
uint32_t
num_xlts
;
154
MmRpc_Xlt
*
xltAry
;
155
}
MmRpc_FxnCtx
;
156
160
typedef
struct
{
161
int
reserved
;
162
}
MmRpc_Params
;
163
168
int
MmRpc_call
(MmRpc_Handle handle,
MmRpc_FxnCtx
*ctx, int32_t *ret);
169
174
int
MmRpc_create
(
const
char
*service,
const
MmRpc_Params
*params,
175
MmRpc_Handle *handlPtr);
176
181
int
MmRpc_delete
(MmRpc_Handle *handlePtr);
182
187
void
MmRpc_Params_init
(
MmRpc_Params
*params);
188
189
190
191
#if defined(__cplusplus)
192
}
193
#endif
194
#endif
/* ti_ipc_mm_MmRpc__include */
Copyright 2013, Texas Instruments Incorporated