1 |
106 |
markom |
/******************************************************************************
|
2 |
|
|
* Copyright 1991 Advanced Micro Devices, Inc.
|
3 |
|
|
*
|
4 |
|
|
* This software is the property of Advanced Micro Devices, Inc (AMD) which
|
5 |
|
|
* specifically grants the user the right to modify, use and distribute this
|
6 |
|
|
* software provided this notice is not removed or altered. All other rights
|
7 |
|
|
* are reserved by AMD.
|
8 |
|
|
*
|
9 |
|
|
* AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
|
10 |
|
|
* SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
|
11 |
|
|
* DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
|
12 |
|
|
* USE OF THIS SOFTWARE.
|
13 |
|
|
*
|
14 |
|
|
* Comments about this software should be directed to udi@amd.com. If access
|
15 |
|
|
* to electronic mail isn't available, send mail to:
|
16 |
|
|
*
|
17 |
|
|
* Advanced Micro Devices, Inc.
|
18 |
|
|
* 29K Support Products
|
19 |
|
|
* Mail Stop 573
|
20 |
|
|
* 5900 E. Ben White Blvd.
|
21 |
|
|
* Austin, TX 78741
|
22 |
|
|
*****************************************************************************
|
23 |
|
|
* $Id: udidos.h,v 1.1.1.1 2001-05-18 11:27:57 markom Exp $
|
24 |
|
|
* $Id: @(#)udidos.h 2.8, AMD
|
25 |
|
|
*/
|
26 |
|
|
|
27 |
|
|
/* Modified: M.Typaldos 11/92 - Added '386 specific code (just changed
|
28 |
|
|
* far to _FAR really).
|
29 |
|
|
*/
|
30 |
|
|
|
31 |
|
|
#ifdef DOS386
|
32 |
|
|
#include <pharlap.h>
|
33 |
|
|
#include <pltypes.h>
|
34 |
|
|
#define _FAR
|
35 |
|
|
typedef REALPTR RealUDIVecRecPtr;
|
36 |
|
|
#else
|
37 |
|
|
#define _FAR far
|
38 |
|
|
typedef struct UDIVecRec far *RealUDIVecRecPtr;
|
39 |
|
|
#endif
|
40 |
|
|
|
41 |
|
|
/* Structure used to deal with shutting down of TIPs. This
|
42 |
|
|
structure is primarily used by assembly language code.
|
43 |
|
|
*/
|
44 |
|
|
typedef UDIStruct DOSTerm {
|
45 |
|
|
void (far *TermFunc)(void);
|
46 |
|
|
UDIUInt16 sds;
|
47 |
|
|
UDIUInt16 sss;
|
48 |
|
|
UDIUInt16 ssi;
|
49 |
|
|
UDIUInt16 sdi;
|
50 |
|
|
UDIUInt16 ssp;
|
51 |
|
|
UDIUInt16 retval;
|
52 |
|
|
UDIUInt16 sbp;
|
53 |
|
|
} DOSTerm;
|
54 |
|
|
|
55 |
|
|
|
56 |
|
|
|
57 |
|
|
union rec {
|
58 |
|
|
unsigned char c[4];
|
59 |
|
|
long l;
|
60 |
|
|
};
|
61 |
|
|
|
62 |
|
|
|
63 |
|
|
#define UDIDOSTIPRecognizer "\xcfudi"
|
64 |
|
|
#define InitRecognizer( x ) memcpy( (x), UDIDOSTIPRecognizer, 4 )
|
65 |
|
|
|
66 |
|
|
struct UDIVecRec {
|
67 |
|
|
union rec recognizer; /* Our "who we are" matching string */
|
68 |
|
|
RealUDIVecRecPtr Next; /* Pointer to next TIP */
|
69 |
|
|
RealUDIVecRecPtr Prev; /* Pointer to previous TIP */
|
70 |
|
|
char _FAR *exeName; /* Name of the executable we were loaded as */
|
71 |
|
|
UDIError (_FAR *UDIConnect) UDIParams((
|
72 |
|
|
char far *Configuration, /* In */
|
73 |
|
|
UDISessionId far *Session, /* Out */
|
74 |
|
|
DOSTerm far *TermStruct /* In - not seen in UDIP */
|
75 |
|
|
));
|
76 |
|
|
UDIError (_FAR *UDIDisconnect) UDIParams((
|
77 |
|
|
UDISessionId Session, /* In */
|
78 |
|
|
UDIBool Terminate, /* In */
|
79 |
|
|
DOSTerm far *TermStruct /* In - not seen in UDIP */
|
80 |
|
|
));
|
81 |
|
|
UDIError (_FAR *UDISetCurrentConnection) UDIParams((
|
82 |
|
|
UDISessionId Session /* In */
|
83 |
|
|
));
|
84 |
|
|
UDIError (_FAR *UDICapabilities) UDIParams((
|
85 |
|
|
UDIUInt32 far *TIPId, /* Out */
|
86 |
|
|
UDIUInt32 far *TargetId, /* Out */
|
87 |
|
|
UDIUInt32 DFEId, /* In */
|
88 |
|
|
UDIUInt32 DFE, /* In */
|
89 |
|
|
UDIUInt32 far *TIP, /* Out */
|
90 |
|
|
UDIUInt32 far *DFEIPCId, /* Out */
|
91 |
|
|
UDIUInt32 far *TIPIPCId, /* Out */
|
92 |
|
|
char far *TIPString /* Out */
|
93 |
|
|
));
|
94 |
|
|
UDIError (_FAR *UDIGetErrorMsg) UDIParams((
|
95 |
|
|
UDIError ErrorCode, /* In */
|
96 |
|
|
UDISizeT MsgSize, /* In */
|
97 |
|
|
char far *Msg, /* Out */
|
98 |
|
|
UDISizeT far *CountDone /* Out */
|
99 |
|
|
));
|
100 |
|
|
UDIError (_FAR *UDIGetTargetConfig) UDIParams((
|
101 |
|
|
UDIMemoryRange far KnownMemory[], /* Out */
|
102 |
|
|
UDIInt far *NumberOfRanges, /* In/Out */
|
103 |
|
|
UDIUInt32 far ChipVersions[], /* Out */
|
104 |
|
|
UDIInt far *NumberOfChips /* In/Out */
|
105 |
|
|
));
|
106 |
|
|
UDIError (_FAR *UDICreateProcess) UDIParams((
|
107 |
|
|
UDIPId far *PId /* Out */
|
108 |
|
|
));
|
109 |
|
|
UDIError (_FAR *UDISetCurrentProcess) UDIParams((
|
110 |
|
|
UDIPId PId /* In */
|
111 |
|
|
));
|
112 |
|
|
UDIError (_FAR *UDIDestroyProcess) UDIParams((
|
113 |
|
|
UDIPId PId /* In */
|
114 |
|
|
));
|
115 |
|
|
UDIError (_FAR *UDIInitializeProcess) UDIParams((
|
116 |
|
|
UDIMemoryRange far ProcessMemory[], /* In */
|
117 |
|
|
UDIInt NumberOfRanges, /* In */
|
118 |
|
|
UDIResource EntryPoint, /* In */
|
119 |
|
|
CPUSizeT far StackSizes[], /* In */
|
120 |
|
|
UDIInt NumberOfStacks, /* In */
|
121 |
|
|
char far *ArgString /* In */
|
122 |
|
|
));
|
123 |
|
|
UDIError (_FAR *UDIRead) UDIParams((
|
124 |
|
|
UDIResource From, /* In */
|
125 |
|
|
UDIHostMemPtr To, /* Out */
|
126 |
|
|
UDICount Count, /* In */
|
127 |
|
|
UDISizeT Size, /* In */
|
128 |
|
|
UDICount far *CountDone, /* Out */
|
129 |
|
|
UDIBool HostEndian /* In */
|
130 |
|
|
));
|
131 |
|
|
UDIError (_FAR *UDIWrite) UDIParams((
|
132 |
|
|
UDIHostMemPtr From, /* In */
|
133 |
|
|
UDIResource To, /* In */
|
134 |
|
|
UDICount Count, /* In */
|
135 |
|
|
UDISizeT Size, /* In */
|
136 |
|
|
UDICount far *CountDone, /* Out */
|
137 |
|
|
UDIBool HostEndian /* In */
|
138 |
|
|
));
|
139 |
|
|
UDIError (_FAR *UDICopy) UDIParams((
|
140 |
|
|
UDIResource From, /* In */
|
141 |
|
|
UDIResource To, /* In */
|
142 |
|
|
UDICount Count, /* In */
|
143 |
|
|
UDISizeT Size, /* In */
|
144 |
|
|
UDICount far *CountDone, /* Out */
|
145 |
|
|
UDIBool Direction /* In */
|
146 |
|
|
));
|
147 |
|
|
UDIError (_FAR *UDIExecute) UDIParams((
|
148 |
|
|
void
|
149 |
|
|
));
|
150 |
|
|
UDIError (_FAR *UDIStep) UDIParams((
|
151 |
|
|
UDIUInt32 Steps, /* In */
|
152 |
|
|
UDIStepType StepType, /* In */
|
153 |
|
|
UDIRange Range /* In */
|
154 |
|
|
));
|
155 |
|
|
UDIVoid (_FAR *UDIStop) UDIParams((
|
156 |
|
|
void
|
157 |
|
|
));
|
158 |
|
|
UDIError (_FAR *UDIWait) UDIParams((
|
159 |
|
|
UDIInt32 MaxTime, /* In */
|
160 |
|
|
UDIPId far *PId, /* Out */
|
161 |
|
|
UDIUInt32 far *StopReason /* Out */
|
162 |
|
|
));
|
163 |
|
|
UDIError (_FAR *UDISetBreakpoint) UDIParams((
|
164 |
|
|
UDIResource Addr, /* In */
|
165 |
|
|
UDIInt32 PassCount, /* In */
|
166 |
|
|
UDIBreakType Type, /* In */
|
167 |
|
|
UDIBreakId far *BreakId /* Out */
|
168 |
|
|
));
|
169 |
|
|
UDIError (_FAR *UDIQueryBreakpoint) UDIParams((
|
170 |
|
|
UDIBreakId BreakId, /* In */
|
171 |
|
|
UDIResource far *Addr, /* Out */
|
172 |
|
|
UDIInt32 far *PassCount, /* Out */
|
173 |
|
|
UDIBreakType far *Type, /* Out */
|
174 |
|
|
UDIInt32 far *CurrentCount /* Out */
|
175 |
|
|
));
|
176 |
|
|
UDIError (_FAR *UDIClearBreakpoint) UDIParams((
|
177 |
|
|
unsigned int BreakId /* In */
|
178 |
|
|
));
|
179 |
|
|
UDIError (_FAR *UDIGetStdout) UDIParams((
|
180 |
|
|
UDIHostMemPtr Buf, /* Out */
|
181 |
|
|
UDISizeT BufSize, /* In */
|
182 |
|
|
UDISizeT far *CountDone /* Out */
|
183 |
|
|
));
|
184 |
|
|
UDIError (_FAR *UDIGetStderr) UDIParams((
|
185 |
|
|
UDIHostMemPtr Buf, /* Out */
|
186 |
|
|
UDISizeT BufSize, /* In */
|
187 |
|
|
UDISizeT far *CountDone /* Out */
|
188 |
|
|
));
|
189 |
|
|
UDIError (_FAR *UDIPutStdin) UDIParams((
|
190 |
|
|
UDIHostMemPtr Buf, /* In */
|
191 |
|
|
UDISizeT Count, /* In */
|
192 |
|
|
UDISizeT far *CountDone /* Out */
|
193 |
|
|
));
|
194 |
|
|
UDIError (_FAR *UDIStdinMode) UDIParams((
|
195 |
|
|
UDIMode far *Mode /* Out */
|
196 |
|
|
));
|
197 |
|
|
UDIError (_FAR *UDIPutTrans) UDIParams((
|
198 |
|
|
UDIHostMemPtr Buf, /* In */
|
199 |
|
|
UDISizeT Count, /* In */
|
200 |
|
|
UDISizeT far *CountDone /* Out */
|
201 |
|
|
));
|
202 |
|
|
UDIError (_FAR *UDIGetTrans) UDIParams((
|
203 |
|
|
UDIHostMemPtr Buf, /* Out */
|
204 |
|
|
UDISizeT BufSize, /* In */
|
205 |
|
|
UDISizeT far *CountDone /* Out */
|
206 |
|
|
));
|
207 |
|
|
UDIError (_FAR *UDITransMode) UDIParams((
|
208 |
|
|
UDIMode far *Mode /* Out */
|
209 |
|
|
));
|
210 |
|
|
};
|
211 |
|
|
|
212 |
|
|
|