4 /******************************************************************************
5 * Copyright 1991 Advanced Micro Devices, Inc.
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.
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.
17 * Comments about this software should be directed to udi@amd.com. If access
18 * to electronic mail isn't available, send mail to:
20 * Advanced Micro Devices, Inc.
21 * 29K Support Products
23 * 5900 E. Ben White Blvd.
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 *****************************************************************************
31 * $Id: @(#)udiproc.h 2.12, AMD
34 /* local type decs. and macro defs. not in a .h file ************* MACRO/TYPE
36 #include "udiphcfg.h" /* Get host specific configuration */
37 #include "udiptcfg.h" /* Get target specific configuration */
39 /* Here are all of the CPU Families for which UDI is currently defined */
40 #define Am29K 1 /* AMD's Am290xx and Am292xx parts */
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;
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
76 /* Values for UDIBreakType parameters */
77 #define UDIBreakFlagExecute 0x0001
78 #define UDIBreakFlagRead 0x0002
79 #define UDIBreakFlagWrite 0x0004
80 #define UDIBreakFlagFetch 0x0008
82 /* Special values for UDIWait MaxTime parameter */
83 #define UDIWaitForever (UDIInt32) -1 /* Infinite time delay */
85 /* Special values for PId */
86 #define UDIProcessProcessor -1 /* Raw Hardware, if possible */
88 /* Values for UDIWait StopReason */
89 #define UDIGrossState 0xff
90 #define UDITrapped 0 /* Fine state - which trap */
91 #define UDINotExecuting 1
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 */
105 /* Enumerate the return values from the callback function
106 for UDIEnumerateTIPs.
108 #define UDITerminateEnumeration 0
109 #define UDIContinueEnumeration 1
111 /* Enumerate values for Terminate parameter to UDIDisconnect */
112 #define UDITerminateSession 1
113 #define UDIContinueSession 0
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
153 /****************************************************************** PROCEDURES
156 UDIError UDIConnect UDIParams((
157 char *Configuration, /* In */
158 UDISessionId *Session /* Out */
161 UDIError UDIDisconnect UDIParams((
162 UDISessionId Session, /* In */
163 UDIBool Terminate /* In */
166 UDIError UDISetCurrentConnection UDIParams((
167 UDISessionId Session /* In */
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 */
181 UDIError UDIEnumerateTIPs UDIParams((
182 UDIInt (*UDIETCallback) /* In */
183 UDIParams(( char *Configuration )) /* In to callback() */
186 UDIError UDIGetErrorMsg UDIParams((
187 UDIError ErrorCode, /* In */
188 UDISizeT MsgSize, /* In */
190 UDISizeT *CountDone /* Out */
193 UDIError UDIGetTargetConfig UDIParams((
194 UDIMemoryRange KnownMemory[], /* Out */
195 UDIInt *NumberOfRanges, /* In/Out */
196 UDIUInt32 ChipVersions[], /* Out */
197 UDIInt *NumberOfChips /* In/Out */
200 UDIError UDICreateProcess UDIParams((
201 UDIPId *PId /* Out */
204 UDIError UDISetCurrentProcess UDIParams((
208 UDIError UDIDestroyProcess UDIParams((
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 */
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 */
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 */
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 */
248 UDIError UDIExecute UDIParams((
252 UDIError UDIStep UDIParams((
253 UDIUInt32 Steps, /* In */
254 UDIStepType StepType, /* In */
255 UDIRange Range /* In */
258 UDIVoid UDIStop UDIParams((
262 UDIError UDIWait UDIParams((
263 UDIInt32 MaxTime, /* In */
264 UDIPId *PId, /* Out */
265 UDIUInt32 *StopReason /* Out */
268 UDIError UDISetBreakpoint UDIParams((
269 UDIResource Addr, /* In */
270 UDIInt32 PassCount, /* In */
271 UDIBreakType Type, /* In */
272 UDIBreakId *BreakId /* Out */
275 UDIError UDIQueryBreakpoint UDIParams((
276 UDIBreakId BreakId, /* In */
277 UDIResource *Addr, /* Out */
278 UDIInt32 *PassCount, /* Out */
279 UDIBreakType *Type, /* Out */
280 UDIInt32 *CurrentCount /* Out */
283 UDIError UDIClearBreakpoint UDIParams((
284 UDIBreakId BreakId /* In */
287 UDIError UDIGetStdout UDIParams((
288 UDIHostMemPtr Buf, /* Out */
289 UDISizeT BufSize, /* In */
290 UDISizeT *CountDone /* Out */
293 UDIError UDIGetStderr UDIParams((
294 UDIHostMemPtr Buf, /* Out */
295 UDISizeT BufSize, /* In */
296 UDISizeT *CountDone /* Out */
299 UDIError UDIPutStdin UDIParams((
300 UDIHostMemPtr Buf, /* In */
301 UDISizeT Count, /* In */
302 UDISizeT *CountDone /* Out */
305 UDIError UDIStdinMode UDIParams((
306 UDIMode *Mode /* Out */
309 UDIError UDIPutTrans UDIParams((
310 UDIHostMemPtr Buf, /* In */
311 UDISizeT Count, /* In */
312 UDISizeT *CountDone /* Out */
315 UDIError UDIGetTrans UDIParams((
316 UDIHostMemPtr Buf, /* Out */
317 UDISizeT BufSize, /* In */
318 UDISizeT *CountDone /* Out */
321 UDIError UDITransMode UDIParams((
322 UDIMode *Mode /* Out */
325 #endif /* _UDIPROC_H */