blob: 6ff808297c1077b1fd12abd6c7f0590cc4c73e67 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
|
/*
* dspapi-ioctl.h
*
* DSP-BIOS Bridge driver support functions for TI OMAP processors.
*
* Contains structures and commands that are used for interaction
* between the DDSP API and Bridge driver.
*
* Copyright (C) 2008 Texas Instruments, Inc.
*
* This package is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#ifndef DSPAPIIOCTL_
#define DSPAPIIOCTL_
#include <dspbridge/cmm.h>
#include <dspbridge/strmdefs.h>
#include <dspbridge/dbdcd.h>
union trapped_args {
/* MGR Module */
struct {
u32 node_id;
struct dsp_ndbprops __user *ndb_props;
u32 ndb_props_size;
u32 __user *num_nodes;
} args_mgr_enumnode_info;
struct {
u32 processor_id;
struct dsp_processorinfo __user *processor_info;
u32 processor_info_size;
u32 __user *num_procs;
} args_mgr_enumproc_info;
struct {
struct dsp_uuid *uuid_obj;
enum dsp_dcdobjtype obj_type;
char *sz_path_name;
} args_mgr_registerobject;
struct {
struct dsp_uuid *uuid_obj;
enum dsp_dcdobjtype obj_type;
} args_mgr_unregisterobject;
struct {
struct dsp_notification __user *__user *anotifications;
u32 count;
u32 __user *index;
u32 timeout;
} args_mgr_wait;
/* PROC Module */
struct {
u32 processor_id;
struct dsp_processorattrin __user *attr_in;
void *__user *ph_processor;
} args_proc_attach;
struct {
void *processor;
u32 cmd;
struct dsp_cbdata __user *args;
} args_proc_ctrl;
struct {
void *processor;
} args_proc_detach;
struct {
void *processor;
void *__user *node_tab;
u32 node_tab_size;
u32 __user *num_nodes;
u32 __user *allocated;
} args_proc_enumnode_info;
struct {
void *processor;
u32 resource_type;
struct dsp_resourceinfo *resource_info;
u32 resource_info_size;
} args_proc_enumresources;
struct {
void *processor;
struct dsp_processorstate __user *proc_state_obj;
u32 state_info_size;
} args_proc_getstate;
struct {
void *processor;
u8 __user *buf;
u8 __user *size;
u32 max_size;
} args_proc_gettrace;
struct {
void *processor;
s32 argc_index;
char __user *__user *user_args;
char *__user *user_envp;
} args_proc_load;
struct {
void *processor;
u32 event_mask;
u32 notify_type;
struct dsp_notification __user *notification;
} args_proc_register_notify;
struct {
void *processor;
u32 size;
void *__user *rsv_addr;
} args_proc_rsvmem;
struct {
void *processor;
u32 size;
void *rsv_addr;
} args_proc_unrsvmem;
struct {
void *processor;
void *mpu_addr;
u32 size;
void *req_addr;
void *__user *map_addr;
u32 map_attr;
} args_proc_mapmem;
struct {
void *processor;
u32 size;
void *map_addr;
} args_proc_unmapmem;
struct {
void *processor;
void *mpu_addr;
u32 size;
u32 dir;
} args_proc_dma;
struct {
void *processor;
void *mpu_addr;
u32 size;
u32 flags;
} args_proc_flushmemory;
struct {
void *processor;
void *mpu_addr;
u32 size;
} args_proc_invalidatememory;
/* NODE Module */
struct {
void *processor;
struct dsp_uuid __user *node_id_ptr;
struct dsp_cbdata __user *args;
struct dsp_nodeattrin __user *attr_in;
void *__user *node;
} args_node_allocate;
struct {
void *node;
u32 size;
struct dsp_bufferattr __user *attr;
u8 *__user *buffer;
} args_node_allocmsgbuf;
struct {
void *node;
s32 prio;
} args_node_changepriority;
struct {
void *node;
u32 stream_id;
void *other_node;
u32 other_stream;
struct dsp_strmattr __user *attrs;
struct dsp_cbdata __user *conn_param;
} args_node_connect;
struct {
void *node;
} args_node_create;
struct {
void *node;
} args_node_delete;
struct {
void *node;
struct dsp_bufferattr __user *attr;
u8 *buffer;
} args_node_freemsgbuf;
struct {
void *node;
struct dsp_nodeattr __user *attr;
u32 attr_size;
} args_node_getattr;
struct {
void *node;
struct dsp_msg __user *message;
u32 timeout;
} args_node_getmessage;
struct {
void *node;
} args_node_pause;
struct {
void *node;
struct dsp_msg __user *message;
u32 timeout;
} args_node_putmessage;
struct {
void *node;
u32 event_mask;
u32 notify_type;
struct dsp_notification __user *notification;
} args_node_registernotify;
struct {
void *node;
} args_node_run;
struct {
void *node;
int __user *status;
} args_node_terminate;
struct {
void *processor;
struct dsp_uuid __user *node_id_ptr;
struct dsp_ndbprops __user *node_props;
} args_node_getuuidprops;
/* STRM module */
struct {
void *stream;
u32 size;
u8 *__user *ap_buffer;
u32 num_bufs;
} args_strm_allocatebuffer;
struct {
void *stream;
} args_strm_close;
struct {
void *stream;
u8 *__user *ap_buffer;
u32 num_bufs;
} args_strm_freebuffer;
struct {
void *stream;
void **event;
} args_strm_geteventhandle;
struct {
void *stream;
struct stream_info __user *stream_info;
u32 stream_info_size;
} args_strm_getinfo;
struct {
void *stream;
bool flush_flag;
} args_strm_idle;
struct {
void *stream;
u8 *buffer;
u32 bytes;
u32 buf_size;
u32 arg;
} args_strm_issue;
struct {
void *node;
u32 direction;
u32 index;
struct strm_attr __user *attr_in;
void *__user *stream;
} args_strm_open;
struct {
void *stream;
u8 *__user *buf_ptr;
u32 __user *bytes;
u32 __user *buf_size_ptr;
u32 __user *arg;
} args_strm_reclaim;
struct {
void *stream;
u32 event_mask;
u32 notify_type;
struct dsp_notification __user *notification;
} args_strm_registernotify;
struct {
void *__user *stream_tab;
u32 strm_num;
u32 __user *mask;
u32 timeout;
} args_strm_select;
/* CMM Module */
struct {
struct cmm_object *cmm_mgr;
u32 size;
struct cmm_attrs *attrs;
void
|