Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
sdp_hdr.h
Go to the documentation of this file.
1 
2 /*
3  *
4  Copyright (c) Eicon Networks, 2002.
5  *
6  This source file is supplied for the use with
7  Eicon Networks range of DIVA Server Adapters.
8  *
9  Eicon File Revision : 2.1
10  *
11  This program is free software; you can redistribute it and/or modify
12  it under the terms of the GNU General Public License as published by
13  the Free Software Foundation; either version 2, or (at your option)
14  any later version.
15  *
16  This program is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY
18  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19  See the GNU General Public License for more details.
20  *
21  You should have received a copy of the GNU General Public License
22  along with this program; if not, write to the Free Software
23  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24  *
25  */
26 #ifndef __DIVA_SOFT_DSP_TASK_ENTRY_H__
27 #define __DIVA_SOFT_DSP_TASK_ENTRY_H__
28 /*
29  The soft DSP image is described by binary header contained on begin of this
30  image:
31  OFFSET FROM IMAGE START | VARIABLE
32  ------------------------------------------------------------------------
33  DIVA_MIPS_TASK_IMAGE_LINK_OFFS | link to the next image
34  ----------------------------------------------------------------------
35  DIVA_MIPS_TASK_IMAGE_GP_OFFS | image gp register value, void*
36  ----------------------------------------------------------------------
37  DIVA_MIPS_TASK_IMAGE_ENTRY_OFFS | diva_mips_sdp_task_entry_t*
38  ----------------------------------------------------------------------
39  DIVA_MIPS_TASK_IMAGE_LOAD_ADDR_OFFS | image image start address (void*)
40  ----------------------------------------------------------------------
41  DIVA_MIPS_TASK_IMAGE_END_ADDR_OFFS | image image end address (void*)
42  ----------------------------------------------------------------------
43  DIVA_MIPS_TASK_IMAGE_ID_STRING_OFFS | image id string char[...];
44  ----------------------------------------------------------------------
45 */
46 #define DIVA_MIPS_TASK_IMAGE_LINK_OFFS 0x6C
47 #define DIVA_MIPS_TASK_IMAGE_GP_OFFS 0x70
48 #define DIVA_MIPS_TASK_IMAGE_ENTRY_OFFS 0x74
49 #define DIVA_MIPS_TASK_IMAGE_LOAD_ADDR_OFFS 0x78
50 #define DIVA_MIPS_TASK_IMAGE_END_ADDR_OFFS 0x7c
51 #define DIVA_MIPS_TASK_IMAGE_ID_STRING_OFFS 0x80
52 /*
53  This function is called in order to set GP register of this task
54  This function should be always called before any function of the
55  task is called
56 */
57 typedef void (*diva_task_set_prog_gp_proc_t)(void *new_gp);
58 /*
59  This function is called to clear .bss at task initialization step
60 */
62 /*
63  This function is called in order to provide GP of master call to
64  task, that will be used by calls from the task to the master
65 */
66 typedef void (*diva_task_set_main_gp_proc_t)(void *main_gp);
67 /*
68  This function is called to provide address of 'dprintf' function
69  to the task
70 */
71 typedef word (*diva_prt_proc_t)(char *, ...);
73 /*
74  This function is called to set task PID
75 */
77 /*
78  This function is called for run-time task init
79 */
81 /*
82  This function is called from system scheduler or from timer
83 */
85 /*
86  This callback is used by task to get current time im mS
87 */
90  diva_task_get_tick_count_proc_t fn);
91 typedef struct _diva_mips_sdp_task_entry {
103 /*
104  'last_entry_proc' should be set to zero and is used for future extensuios
105 */
106 typedef struct _diva_mips_sw_task {
108  void *sdp_gp_reg;
109  void *own_gp_reg;
111 #if !defined(DIVA_BRI2F_SDP_1_NAME)
112 #define DIVA_BRI2F_SDP_1_NAME "sdp0.2q0"
113 #endif
114 #if !defined(DIVA_BRI2F_SDP_2_NAME)
115 #define DIVA_BRI2F_SDP_2_NAME "sdp1.2q0"
116 #endif
117 #endif