OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [start/] [gdb-5.0/] [utils/] [amd-udi/] [udi/] [udiproc.h] - Blame information for rev 1778

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 106 markom
#ifndef _UDIPROC_H
2
#define _UDIPROC_H
3
 
4
/******************************************************************************
5
 * Copyright 1991 Advanced Micro Devices, Inc.
6
 *
7
 * This software is the property of Advanced Micro Devices, Inc  (AMD)  which
8
 * specifically  grants the user the right to modify, use and distribute this
9
 * software provided this notice is not removed or altered.  All other rights
10
 * are reserved by AMD.
11
 *
12
 * AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
13
 * SOFTWARE.  IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
14
 * DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
15
 * USE OF THIS SOFTWARE.
16
 *
17
 * Comments about this software should be directed to udi@amd.com. If access
18
 * to electronic mail isn't available, send mail to:
19
 *
20
 * Advanced Micro Devices, Inc.
21
 * 29K Support Products
22
 * Mail Stop 573
23
 * 5900 E. Ben White Blvd.
24
 * Austin, TX 78741
25
 *
26
 * For more detailed information about the values, types, and functions
27
 * defined and declared here, see the corresponding UDI spec available
28
 * from AMD at the address above.
29
 *****************************************************************************
30
 *       $Id: udiproc.h,v 1.1.1.1 2001-05-18 11:28:00 markom Exp $
31
 *       $Id: @(#)udiproc.h     2.12, AMD
32
 */
33
 
34
/* local type decs. and macro defs. not in a .h  file ************* MACRO/TYPE
35
*/
36
#include "udiphcfg.h"   /* Get host specific configuration */
37
#include "udiptcfg.h"   /* Get target specific configuration */
38
 
39
/* Here are all of the CPU Families for which UDI is currently defined */
40
#define Am29K           1       /* AMD's Am290xx and Am292xx parts */
41
 
42
typedef UDIInt          UDIError;
43
typedef UDIInt          UDISessionId;
44
typedef UDIInt          UDIPId;
45
typedef UDIInt          UDIStepType;
46
typedef UDIInt          UDIBreakType;
47
typedef UDIUInt         UDIBreakId;
48
typedef UDIUInt         UDIMode;
49
 
50
typedef UDIStruct
51
{
52
    CPUSpace    Space;
53
    CPUOffset   Offset;
54
} UDIResource;
55
 
56
typedef UDIStruct
57
{
58
    CPUOffset   Low;
59
    CPUOffset   High;
60
} UDIRange;
61
 
62
typedef UDIStruct
63
{
64
    CPUSpace    Space;
65
    CPUOffset   Offset;
66
    CPUSizeT    Size;
67
    } UDIMemoryRange;
68
 
69
/* Values for UDIStepType parameters */
70
#define UDIStepNatural          0x0000
71
#define UDIStepOverTraps        0x0001
72
#define UDIStepOverCalls        0x0002
73
#define UDIStepInRange          0x0004
74
#define UDIStepNatural          0x0000
75
 
76
/* Values for UDIBreakType parameters */
77
#define UDIBreakFlagExecute     0x0001
78
#define UDIBreakFlagRead        0x0002
79
#define UDIBreakFlagWrite       0x0004
80
#define UDIBreakFlagFetch       0x0008
81
 
82
/* Special values for UDIWait MaxTime parameter */
83
#define UDIWaitForever  (UDIInt32) -1   /* Infinite time delay */
84
 
85
/* Special values for PId */
86
#define UDIProcessProcessor     -1      /* Raw Hardware, if possible */
87
 
88
/* Values for UDIWait StopReason */
89
#define UDIGrossState           0xff
90
#define UDITrapped              0        /* Fine state - which trap */
91
#define UDINotExecuting         1
92
#define UDIRunning              2
93
#define UDIStopped              3
94
#define UDIWarned               4
95
#define UDIStepped              5
96
#define UDIWaiting              6
97
#define UDIHalted               7
98
#define UDIStdoutReady          8       /* fine state - size */
99
#define UDIStderrReady          9       /* fine state - size */
100
#define UDIStdinNeeded          10      /* fine state - size */
101
#define UDIStdinModeX           11      /* fine state - mode */
102
#define UDIBreak                12      /* Fine state - Breakpoint Id */
103
#define UDIExited               13      /* Fine state - exit code */
104
 
105
/* Enumerate the return values from the callback function
106
   for UDIEnumerateTIPs.
107
*/
108
#define UDITerminateEnumeration 0
109
#define UDIContinueEnumeration  1
110
 
111
/* Enumerate values for Terminate parameter to UDIDisconnect */
112
#define UDITerminateSession     1
113
#define UDIContinueSession      0
114
 
115
/* Error codes */
116
#define UDINoError                      0        /* No error occured */
117
#define UDIErrorNoSuchConfiguration     1
118
#define UDIErrorCantHappen              2
119
#define UDIErrorCantConnect             3
120
#define UDIErrorNoSuchConnection        4
121
#define UDIErrorNoConnection            5
122
#define UDIErrorCantOpenConfigFile      6
123
#define UDIErrorCantStartTIP            7
124
#define UDIErrorConnectionUnavailable   8
125
#define UDIErrorTryAnotherTIP           9
126
#define UDIErrorExecutableNotTIP        10
127
#define UDIErrorInvalidTIPOption        11
128
#define UDIErrorCantDisconnect          12
129
#define UDIErrorUnknownError            13
130
#define UDIErrorCantCreateProcess       14
131
#define UDIErrorNoSuchProcess           15
132
#define UDIErrorUnknownResourceSpace    16
133
#define UDIErrorInvalidResource         17
134
#define UDIErrorUnsupportedStepType     18
135
#define UDIErrorCantSetBreakpoint       19
136
#define UDIErrorTooManyBreakpoints      20
137
#define UDIErrorInvalidBreakId          21
138
#define UDIErrorNoMoreBreakIds          22
139
#define UDIErrorUnsupportedService      23
140
#define UDIErrorTryAgain                24
141
#define UDIErrorIPCLimitation           25
142
#define UDIErrorIncomplete              26
143
#define UDIErrorAborted                 27
144
#define UDIErrorTransDone               28
145
#define UDIErrorCantAccept              29
146
#define UDIErrorTransInputNeeded        30
147
#define UDIErrorTransModeX              31
148
#define UDIErrorInvalidSize             32
149
#define UDIErrorBadConfigFileEntry      33
150
#define UDIErrorIPCInternal             34
151
/* TBD */
152
 
153
/****************************************************************** PROCEDURES
154
*/
155
 
156
UDIError UDIConnect UDIParams((
157
  char          *Configuration,         /* In */
158
  UDISessionId  *Session                /* Out */
159
  ));
160
 
161
UDIError UDIDisconnect UDIParams((
162
  UDISessionId  Session,                /* In */
163
  UDIBool       Terminate               /* In */
164
  ));
165
 
166
UDIError UDISetCurrentConnection UDIParams((
167
  UDISessionId  Session                 /* In */
168
  ));
169
 
170
UDIError UDICapabilities UDIParams((
171
  UDIUInt32     *TIPId,                 /* Out */
172
  UDIUInt32     *TargetId,              /* Out */
173
  UDIUInt32     DFEId,                  /* In */
174
  UDIUInt32     DFE,                    /* In */
175
  UDIUInt32     *TIP,                   /* Out */
176
  UDIUInt32     *DFEIPCId,              /* Out */
177
  UDIUInt32     *TIPIPCId,              /* Out */
178
  char          *TIPString              /* Out */
179
  ));
180
 
181
UDIError UDIEnumerateTIPs UDIParams((
182
  UDIInt        (*UDIETCallback)        /* In */
183
    UDIParams(( char *Configuration ))  /* In to callback() */
184
  ));
185
 
186
UDIError UDIGetErrorMsg UDIParams((
187
  UDIError      ErrorCode,              /* In */
188
  UDISizeT      MsgSize,                /* In */
189
  char          *Msg,                   /* Out */
190
  UDISizeT      *CountDone              /* Out */
191
  ));
192
 
193
UDIError UDIGetTargetConfig UDIParams((
194
  UDIMemoryRange KnownMemory[],         /* Out */
195
  UDIInt        *NumberOfRanges,        /* In/Out */
196
  UDIUInt32     ChipVersions[],         /* Out */
197
  UDIInt        *NumberOfChips          /* In/Out */
198
  ));
199
 
200
UDIError UDICreateProcess UDIParams((
201
  UDIPId        *PId                    /* Out */
202
  ));
203
 
204
UDIError UDISetCurrentProcess UDIParams((
205
  UDIPId        PId                     /* In */
206
  ));
207
 
208
UDIError UDIDestroyProcess UDIParams((
209
  UDIPId        PId                     /* In */
210
  ));
211
 
212
UDIError UDIInitializeProcess UDIParams((
213
  UDIMemoryRange ProcessMemory[],       /* In */
214
  UDIInt        NumberOfRanges,         /* In */
215
  UDIResource   EntryPoint,             /* In */
216
  CPUSizeT      StackSizes[],           /* In */
217
  UDIInt        NumberOfStacks,         /* In */
218
  char          *ArgString              /* In */
219
  ));
220
 
221
UDIError UDIRead UDIParams((
222
  UDIResource   From,                   /* In */
223
  UDIHostMemPtr To,                     /* Out */
224
  UDICount      Count,                  /* In */
225
  UDISizeT      Size,                   /* In */
226
  UDICount      *CountDone,             /* Out */
227
  UDIBool       HostEndian              /* In */
228
  ));
229
 
230
UDIError UDIWrite UDIParams((
231
  UDIHostMemPtr From,                   /* In */
232
  UDIResource   To,                     /* In */
233
  UDICount      Count,                  /* In */
234
  UDISizeT      Size,                   /* In */
235
  UDICount      *CountDone,             /* Out */
236
  UDIBool       HostEndian              /* In */
237
  ));
238
 
239
UDIError UDICopy UDIParams((
240
  UDIResource   From,                   /* In */
241
  UDIResource   To,                     /* In */
242
  UDICount      Count,                  /* In */
243
  UDISizeT      Size,                   /* In */
244
  UDICount      *CountDone,             /* Out */
245
  UDIBool       Direction               /* In */
246
  ));
247
 
248
UDIError UDIExecute UDIParams((
249
  void
250
  ));
251
 
252
UDIError UDIStep UDIParams((
253
  UDIUInt32     Steps,                  /* In */
254
  UDIStepType   StepType,               /* In */
255
  UDIRange      Range                   /* In */
256
  ));
257
 
258
UDIVoid UDIStop UDIParams((
259
  void
260
  ));
261
 
262
UDIError UDIWait UDIParams((
263
  UDIInt32      MaxTime,                /* In */
264
  UDIPId        *PId,                   /* Out */
265
  UDIUInt32     *StopReason             /* Out */
266
  ));
267
 
268
UDIError UDISetBreakpoint UDIParams((
269
  UDIResource   Addr,                   /* In */
270
  UDIInt32      PassCount,              /* In */
271
  UDIBreakType  Type,                   /* In */
272
  UDIBreakId    *BreakId                /* Out */
273
  ));
274
 
275
UDIError UDIQueryBreakpoint UDIParams((
276
  UDIBreakId    BreakId,                /* In */
277
  UDIResource   *Addr,                  /* Out */
278
  UDIInt32      *PassCount,             /* Out */
279
  UDIBreakType  *Type,                  /* Out */
280
  UDIInt32      *CurrentCount           /* Out */
281
  ));
282
 
283
UDIError UDIClearBreakpoint UDIParams((
284
  UDIBreakId    BreakId                 /* In */
285
  ));
286
 
287
UDIError UDIGetStdout UDIParams((
288
  UDIHostMemPtr Buf,                    /* Out */
289
  UDISizeT      BufSize,                /* In */
290
  UDISizeT      *CountDone              /* Out */
291
  ));
292
 
293
UDIError UDIGetStderr UDIParams((
294
  UDIHostMemPtr Buf,                    /* Out */
295
  UDISizeT      BufSize,                /* In */
296
  UDISizeT      *CountDone              /* Out */
297
  ));
298
 
299
UDIError UDIPutStdin UDIParams((
300
  UDIHostMemPtr Buf,                    /* In */
301
  UDISizeT      Count,                  /* In */
302
  UDISizeT      *CountDone              /* Out */
303
  ));
304
 
305
UDIError UDIStdinMode UDIParams((
306
  UDIMode       *Mode                   /* Out */
307
  ));
308
 
309
UDIError UDIPutTrans UDIParams((
310
  UDIHostMemPtr Buf,                    /* In */
311
  UDISizeT      Count,                  /* In */
312
  UDISizeT      *CountDone              /* Out */
313
  ));
314
 
315
UDIError UDIGetTrans UDIParams((
316
  UDIHostMemPtr Buf,                    /* Out */
317
  UDISizeT      BufSize,                /* In */
318
  UDISizeT      *CountDone              /* Out */
319
  ));
320
 
321
UDIError UDITransMode UDIParams((
322
  UDIMode       *Mode                   /* Out */
323
  ));
324
 
325
#endif /* _UDIPROC_H */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.