1 /*-
2 * Copyright (c) 1996-1999 Distributed Processing Technology Corporation
3 * All rights reserved.
4 *
5 * Redistribution and use in source form, with or without modification, are
6 * permitted provided that redistributions of source code must retain the
7 * above copyright notice, this list of conditions and the following disclaimer.
8 *
9 * This software is provided `as is' by Distributed Processing Technology and
10 * any express or implied warranties, including, but not limited to, the
11 * implied warranties of merchantability and fitness for a particular purpose,
12 * are disclaimed. In no event shall Distributed Processing Technology be
13 * liable for any direct, indirect, incidental, special, exemplary or
14 * consequential damages (including, but not limited to, procurement of
15 * substitute goods or services; loss of use, data, or profits; or business
16 * interruptions) however caused and on any theory of liability, whether in
17 * contract, strict liability, or tort (including negligence or otherwise)
18 * arising in any way out of the use of this driver software, even if advised
19 * of the possibility of such damage.
20 *
21 * $FreeBSD: src/sys/dev/asr/sys_info.h,v 1.9 2005/01/06 01:42:29 imp Exp $
22 */
23
24 #ifndef __SYS_INFO_H
25 #define __SYS_INFO_H
26
27 /*File - SYS_INFO.H
28 ****************************************************************************
29 *
30 *Description:
31 *
32 * This file contains structure definitions for the OS dependent
33 *layer system information buffers.
34 *
35 *Copyright Distributed Processing Technology, Corp.
36 * 140 Candace Dr.
37 * Maitland, Fl. 32751 USA
38 * Phone: (407) 830-5522 Fax: (407) 260-5366
39 * All Rights Reserved
40 *
41 *Author: Don Kemper
42 *Date: 5/10/94
43 *
44 *Editors:
45 *
46 *Remarks:
47 *
48 *
49 *****************************************************************************/
50
51
52 /*Include Files ------------------------------------------------------------- */
53
54 #include "osd_util.h"
55
56 #ifndef NO_PACK
57 #if defined(_DPT_AIX)
58 #pragma options align=packed
59 #else
60 #pragma pack(1)
61 #endif /* aix */
62 #endif /* no unpack */
63
64
65 /*struct - driveParam_S - start
66 *===========================================================================
67 *
68 *Description:
69 *
70 * This structure defines the drive parameters seen during
71 *booting.
72 *
73 *---------------------------------------------------------------------------*/
74
75 #ifdef __cplusplus
76 struct driveParam_S {
77 #else
78 typedef struct {
79 #endif
80
81 uSHORT cylinders; /* Upto 1024 */
82 uCHAR heads; /* Upto 255 */
83 uCHAR sectors; /* Upto 63 */
84
85 #ifdef __cplusplus
86
87 /*---------- Portability Additions ----------- in sp_sinfo.cpp */
88 #ifdef DPT_PORTABLE
89 uSHORT netInsert(dptBuffer_S *buffer);
90 uSHORT netExtract(dptBuffer_S *buffer);
91 #endif /* DPT PORTABLE */
92 /*--------------------------------------------*/
93
94 };
95 #else
96 } driveParam_S;
97 #endif
98 /*driveParam_S - end */
99
100
101 /*struct - sysInfo_S - start
102 *===========================================================================
103 *
104 *Description:
105 *
106 * This structure defines the command system information that
107 *should be returned by every OS dependent layer.
108 *
109 *---------------------------------------------------------------------------*/
110
111 /*flags - bit definitions */
112 #define SI_CMOS_Valid 0x0001
113 #define SI_NumDrivesValid 0x0002
114 #define SI_ProcessorValid 0x0004
115 #define SI_MemorySizeValid 0x0008
116 #define SI_DriveParamsValid 0x0010
117 #define SI_SmartROMverValid 0x0020
118 #define SI_OSversionValid 0x0040
119 #define SI_OSspecificValid 0x0080 /* 1 if OS structure returned */
120 #define SI_BusTypeValid 0x0100
121
122 #define SI_ALL_VALID 0x0FFF /* All Std SysInfo is valid */
123 #define SI_NO_SmartROM 0x8000
124
125 /*busType - definitions */
126 #define SI_ISA_BUS 0x00
127 #define SI_MCA_BUS 0x01
128 #define SI_EISA_BUS 0x02
129 #define SI_PCI_BUS 0x04
130
131 #ifdef __cplusplus
132 struct sysInfo_S {
133 #else
134 typedef struct {
135 #endif
136
137 uCHAR drive0CMOS; /* CMOS Drive 0 Type */
138 uCHAR drive1CMOS; /* CMOS Drive 1 Type */
139 uCHAR numDrives; /* 0040:0075 contents */
140 uCHAR processorFamily; /* Same as DPTSIG's definition */
141 uCHAR processorType; /* Same as DPTSIG's definition */
142 uCHAR smartROMMajorVersion;
143 uCHAR smartROMMinorVersion; /* SmartROM version */
144 uCHAR smartROMRevision;
145 uSHORT flags; /* See bit definitions above */
146 uSHORT conventionalMemSize; /* in KB */
147 uLONG extendedMemSize; /* in KB */
148 uLONG osType; /* Same as DPTSIG's definition */
149 uCHAR osMajorVersion;
150 uCHAR osMinorVersion; /* The OS version */
151 uCHAR osRevision;
152 #ifdef _SINIX_ADDON
153 uCHAR busType; /* See defininitions above */
154 uSHORT osSubRevision;
155 uCHAR pad[2]; /* For alignment */
156 #else
157 uCHAR osSubRevision;
158 uCHAR busType; /* See defininitions above */
159 uCHAR pad[3]; /* For alignment */
160 #endif
161 driveParam_S drives[16]; /* SmartROM Logical Drives */
162
163 #ifdef __cplusplus
164
165 /*---------- Portability Additions ----------- in sp_sinfo.cpp */
166 #ifdef DPT_PORTABLE
167 uSHORT netInsert(dptBuffer_S *buffer);
168 uSHORT netExtract(dptBuffer_S *buffer);
169 #endif /* DPT PORTABLE */
170 /*--------------------------------------------*/
171
172 };
173 #else
174 } sysInfo_S;
175 #endif
176 /*sysInfo_S - end */
177
178
179 /*struct - DOS_Info_S - start
180 *===========================================================================
181 *
182 *Description:
183 *
184 * This structure defines the system information specific to a
185 *DOS workstation.
186 *
187 *---------------------------------------------------------------------------*/
188
189 /*flags - bit definitions */
190 #define DI_DOS_HIGH 0x01 /* DOS is loaded high */
191 #define DI_DPMI_VALID 0x02 /* DPMI version is valid */
192
193 #ifdef __cplusplus
194 struct DOS_Info_S {
195 #else
196 typedef struct {
197 #endif
198
199 uCHAR flags; /* See bit definitions above */
200 uSHORT driverLocation; /* SmartROM BIOS address */
201 uSHORT DOS_version;
202 uSHORT DPMI_version;
203
204 #ifdef __cplusplus
205
206 /*---------- Portability Additions ----------- in sp_sinfo.cpp */
207 #ifdef DPT_PORTABLE
208 uSHORT netInsert(dptBuffer_S *buffer);
209 uSHORT netExtract(dptBuffer_S *buffer);
210 #endif /* DPT PORTABLE */
211 /*--------------------------------------------*/
212
213 };
214 #else
215 } DOS_Info_S;
216 #endif
217 /*DOS_Info_S - end */
218
219
220 /*struct - Netware_Info_S - start
221 *===========================================================================
222 *
223 *Description:
224 *
225 * This structure defines the system information specific to a
226 *Netware machine.
227 *
228 *---------------------------------------------------------------------------*/
229
230 #ifdef __cplusplus
231 struct Netware_Info_S {
232 #else
233 typedef struct {
234 #endif
235
236 uCHAR driverName[13]; /* ie PM12NW31.DSK */
237 uCHAR serverName[48];
238 uCHAR netwareVersion; /* The Netware OS version */
239 uCHAR netwareSubVersion;
240 uCHAR netwareRevision;
241 uSHORT maxConnections; /* Probably 250 or 1000 */
242 uSHORT connectionsInUse;
243 uSHORT maxVolumes;
244 uCHAR unused;
245 uCHAR SFTlevel;
246 uCHAR TTSlevel;
247
248 uCHAR clibMajorVersion; /* The CLIB.NLM version */
249 uCHAR clibMinorVersion;
250 uCHAR clibRevision;
251
252 #ifdef __cplusplus
253
254 /*---------- Portability Additions ----------- in sp_sinfo.cpp */
255 #ifdef DPT_PORTABLE
256 uSHORT netInsert(dptBuffer_S *buffer);
257 uSHORT netExtract(dptBuffer_S *buffer);
258 #endif /* DPT PORTABLE */
259 /*--------------------------------------------*/
260
261 };
262 #else
263 } Netware_Info_S;
264 #endif
265 /*Netware_Info_S - end */
266
267
268 /*struct - OS2_Info_S - start
269 *===========================================================================
270 *
271 *Description:
272 *
273 * This structure defines the system information specific to an
274 *OS/2 machine.
275 *
276 *---------------------------------------------------------------------------*/
277
278 #ifdef __cplusplus
279 struct OS2_Info_S {
280 #else
281 typedef struct {
282 #endif
283
284 uCHAR something;
285
286 #ifdef __cplusplus
287
288 /*---------- Portability Additions ----------- in sp_sinfo.cpp */
289 #ifdef DPT_PORTABLE
290 uSHORT netInsert(dptBuffer_S *buffer);
291 uSHORT netExtract(dptBuffer_S *buffer);
292 #endif /* DPT PORTABLE */
293 /*--------------------------------------------*/
294
295 };
296 #else
297 } OS2_Info_S;
298 #endif
299 /*OS2_Info_S - end */
300
301
302 /*struct - WinNT_Info_S - start
303 *===========================================================================
304 *
305 *Description:
306 *
307 * This structure defines the system information specific to a
308 *Windows NT machine.
309 *
310 *---------------------------------------------------------------------------*/
311
312 #ifdef __cplusplus
313 struct WinNT_Info_S {
314 #else
315 typedef struct {
316 #endif
317
318 uCHAR something;
319
320 #ifdef __cplusplus
321
322 /*---------- Portability Additions ----------- in sp_sinfo.cpp */
323 #ifdef DPT_PORTABLE
324 uSHORT netInsert(dptBuffer_S *buffer);
325 uSHORT netExtract(dptBuffer_S *buffer);
326 #endif /* DPT PORTABLE */
327 /*--------------------------------------------*/
328
329 };
330 #else
331 } WinNT_Info_S;
332 #endif
333 /*WinNT_Info_S - end */
334
335
336 /*struct - SCO_Info_S - start
337 *===========================================================================
338 *
339 *Description:
340 *
341 * This structure defines the system information specific to an
342 *SCO UNIX machine.
343 *
344 *---------------------------------------------------------------------------*/
345
346 #ifdef __cplusplus
347 struct SCO_Info_S {
348 #else
349 typedef struct {
350 #endif
351
352 uCHAR something;
353
354 #ifdef __cplusplus
355
356 /*---------- Portability Additions ----------- in sp_sinfo.cpp */
357 #ifdef DPT_PORTABLE
358 uSHORT netInsert(dptBuffer_S *buffer);
359 uSHORT netExtract(dptBuffer_S *buffer);
360 #endif /* DPT PORTABLE */
361 /*--------------------------------------------*/
362
363 };
364 #else
365 } SCO_Info_S;
366 #endif
367 /*SCO_Info_S - end */
368
369
370 /*struct - USL_Info_S - start
371 *===========================================================================
372 *
373 *Description:
374 *
375 * This structure defines the system information specific to a
376 *USL UNIX machine.
377 *
378 *---------------------------------------------------------------------------*/
379
380 #ifdef __cplusplus
381 struct USL_Info_S {
382 #else
383 typedef struct {
384 #endif
385
386 uCHAR something;
387
388 #ifdef __cplusplus
389
390 /*---------- Portability Additions ----------- in sp_sinfo.cpp */
391 #ifdef DPT_PORTABLE
392 uSHORT netInsert(dptBuffer_S *buffer);
393 uSHORT netExtract(dptBuffer_S *buffer);
394 #endif /* DPT PORTABLE */
395 /*--------------------------------------------*/
396
397 };
398 #else
399 } USL_Info_S;
400 #endif
401 /*USL_Info_S - end */
402
403
404 /* Restore default structure packing */
405 #ifndef NO_UNPACK
406 #if defined(_DPT_AIX)
407 #pragma options align=reset
408 #elif defined(UNPACK_FOUR)
409 #pragma pack(4)
410 #else
411 #pragma pack()
412 #endif /* aix */
413 #endif /* no unpack */
414
415 #ifdef DPT_MEASURE_PERFORMANCE
416 typedef struct dpt_metrics {
417 u_int32_t command_count[256]; /* We assume MAX 256 SCSI commands */
418 u_int32_t max_command_time[256];
419 u_int32_t min_command_time[256];
420
421 u_int32_t min_intr_time;
422 u_int32_t max_intr_time;
423 u_int32_t max_intr_gap;
424 u_int32_t max_ht_time;
425 u_int32_t aborted_interrupts;
426 u_int32_t spurious_interrupts;
427 u_int32_t aborted_requests;
428 u_int32_t retried_requests;
429
430 u_int32_t max_waiting_count;
431 u_int32_t max_submit_count;
432 u_int32_t max_complete_count;
433
434 u_int32_t min_waiting_time;
435 u_int32_t min_submit_time;
436 u_int32_t min_complete_time;
437
438 u_int32_t max_waiting_time;
439 u_int32_t max_submit_time;
440 u_int32_t max_complete_time;
441
442 u_int32_t command_collisions;
443 u_int32_t command_too_busy;
444 u_int32_t max_eata_tries;
445 u_int32_t min_eata_tries;
446
447 u_int32_t read_by_size_count[10];
448 u_int32_t write_by_size_count[10];
449 u_int32_t read_by_size_min_time[10];
450 u_int32_t read_by_size_max_time[10];
451 struct timeval read_by_size_total_time[10];
452 u_int32_t write_by_size_min_time[10];
453 u_int32_t write_by_size_max_time[10];
454 struct timeval write_by_size_total_time[10];
455
456 #define SIZE_512 0
457 #define SIZE_1K 1
458 #define SIZE_2K 2
459 #define SIZE_4K 3
460 #define SIZE_8K 4
461 #define SIZE_16K 5
462 #define SIZE_32K 6
463 #define SIZE_64K 7
464 #define SIZE_BIGGER 8
465 #define SIZE_OTHER 9
466
467 struct timeval intr_started;
468 } dpt_perf_t;
469 #endif
470
471 #endif /* __SYS_INFO_H */
472
Cache object: f4cab2593b43d95e2afc83d1bc55e791
|