2 * Copyright (c) 1996-1999 Distributed Processing Technology Corporation
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.
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.
28 ****************************************************************************
32 * This file contains structure definitions for the OS dependent
33 *layer system information buffers.
35 *Copyright Distributed Processing Technology, Corp.
37 * Maitland, Fl. 32751 USA
38 * Phone: (407) 830-5522 Fax: (407) 260-5366
49 *****************************************************************************/
52 /*Include Files ------------------------------------------------------------- */
54 #if (defined(KERNEL) && defined(__bsdi__))
55 # include "i386/isa/dpt_osd_util.h"
56 #elif ((defined(KERNEL) || defined(_KERNEL)) && defined(__FreeBSD__))
57 # if (KERN_VERSION < 3)
58 # include "i386/isa/dpt_osd_util.h"
60 # include "dev/asr/osd_util.h"
63 # include "osd_util.h"
67 #if defined (_DPT_AIX)
68 #pragma options align=packed
72 #endif /* no unpack */
75 /*struct - driveParam_S - start
76 *===========================================================================
80 * This structure defines the drive parameters seen during
83 *---------------------------------------------------------------------------*/
91 uSHORT cylinders; /* Upto 1024 */
92 uCHAR heads; /* Upto 255 */
93 uCHAR sectors; /* Upto 63 */
97 /*---------- Portability Additions ----------- in sp_sinfo.cpp */
99 uSHORT netInsert(dptBuffer_S *buffer);
100 uSHORT netExtract(dptBuffer_S *buffer);
101 #endif /* DPT PORTABLE */
102 /*--------------------------------------------*/
108 /*driveParam_S - end */
111 /*struct - sysInfo_S - start
112 *===========================================================================
116 * This structure defines the command system information that
117 *should be returned by every OS dependent layer.
119 *---------------------------------------------------------------------------*/
121 /*flags - bit definitions */
122 #define SI_CMOS_Valid 0x0001
123 #define SI_NumDrivesValid 0x0002
124 #define SI_ProcessorValid 0x0004
125 #define SI_MemorySizeValid 0x0008
126 #define SI_DriveParamsValid 0x0010
127 #define SI_SmartROMverValid 0x0020
128 #define SI_OSversionValid 0x0040
129 #define SI_OSspecificValid 0x0080 /* 1 if OS structure returned */
130 #define SI_BusTypeValid 0x0100
132 #define SI_ALL_VALID 0x0FFF /* All Std SysInfo is valid */
133 #define SI_NO_SmartROM 0x8000
135 /*busType - definitions */
136 #define SI_ISA_BUS 0x00
137 #define SI_MCA_BUS 0x01
138 #define SI_EISA_BUS 0x02
139 #define SI_PCI_BUS 0x04
147 uCHAR drive0CMOS; /* CMOS Drive 0 Type */
148 uCHAR drive1CMOS; /* CMOS Drive 1 Type */
149 uCHAR numDrives; /* 0040:0075 contents */
150 uCHAR processorFamily; /* Same as DPTSIG's definition */
151 uCHAR processorType; /* Same as DPTSIG's definition */
152 uCHAR smartROMMajorVersion;
153 uCHAR smartROMMinorVersion; /* SmartROM version */
154 uCHAR smartROMRevision;
155 uSHORT flags; /* See bit definitions above */
156 uSHORT conventionalMemSize; /* in KB */
157 uLONG extendedMemSize; /* in KB */
158 uLONG osType; /* Same as DPTSIG's definition */
159 uCHAR osMajorVersion;
160 uCHAR osMinorVersion; /* The OS version */
163 uCHAR busType; /* See defininitions above */
164 uSHORT osSubRevision;
165 uCHAR pad[2]; /* For alignment */
168 uCHAR busType; /* See defininitions above */
169 uCHAR pad[3]; /* For alignment */
171 driveParam_S drives[16]; /* SmartROM Logical Drives */
175 /*---------- Portability Additions ----------- in sp_sinfo.cpp */
177 uSHORT netInsert(dptBuffer_S *buffer);
178 uSHORT netExtract(dptBuffer_S *buffer);
179 #endif /* DPT PORTABLE */
180 /*--------------------------------------------*/
189 /*struct - DOS_Info_S - start
190 *===========================================================================
194 * This structure defines the system information specific to a
197 *---------------------------------------------------------------------------*/
199 /*flags - bit definitions */
200 #define DI_DOS_HIGH 0x01 /* DOS is loaded high */
201 #define DI_DPMI_VALID 0x02 /* DPMI version is valid */
209 uCHAR flags; /* See bit definitions above */
210 uSHORT driverLocation; /* SmartROM BIOS address */
216 /*---------- Portability Additions ----------- in sp_sinfo.cpp */
218 uSHORT netInsert(dptBuffer_S *buffer);
219 uSHORT netExtract(dptBuffer_S *buffer);
220 #endif /* DPT PORTABLE */
221 /*--------------------------------------------*/
227 /*DOS_Info_S - end */
230 /*struct - Netware_Info_S - start
231 *===========================================================================
235 * This structure defines the system information specific to a
238 *---------------------------------------------------------------------------*/
241 struct Netware_Info_S {
246 uCHAR driverName[13]; /* ie PM12NW31.DSK */
247 uCHAR serverName[48];
248 uCHAR netwareVersion; /* The Netware OS version */
249 uCHAR netwareSubVersion;
250 uCHAR netwareRevision;
251 uSHORT maxConnections; /* Probably 250 or 1000 */
252 uSHORT connectionsInUse;
258 uCHAR clibMajorVersion; /* The CLIB.NLM version */
259 uCHAR clibMinorVersion;
264 /*---------- Portability Additions ----------- in sp_sinfo.cpp */
266 uSHORT netInsert(dptBuffer_S *buffer);
267 uSHORT netExtract(dptBuffer_S *buffer);
268 #endif /* DPT PORTABLE */
269 /*--------------------------------------------*/
275 /*Netware_Info_S - end */
278 /*struct - OS2_Info_S - start
279 *===========================================================================
283 * This structure defines the system information specific to an
286 *---------------------------------------------------------------------------*/
298 /*---------- Portability Additions ----------- in sp_sinfo.cpp */
300 uSHORT netInsert(dptBuffer_S *buffer);
301 uSHORT netExtract(dptBuffer_S *buffer);
302 #endif /* DPT PORTABLE */
303 /*--------------------------------------------*/
309 /*OS2_Info_S - end */
312 /*struct - WinNT_Info_S - start
313 *===========================================================================
317 * This structure defines the system information specific to a
320 *---------------------------------------------------------------------------*/
323 struct WinNT_Info_S {
332 /*---------- Portability Additions ----------- in sp_sinfo.cpp */
334 uSHORT netInsert(dptBuffer_S *buffer);
335 uSHORT netExtract(dptBuffer_S *buffer);
336 #endif /* DPT PORTABLE */
337 /*--------------------------------------------*/
343 /*WinNT_Info_S - end */
346 /*struct - SCO_Info_S - start
347 *===========================================================================
351 * This structure defines the system information specific to an
354 *---------------------------------------------------------------------------*/
366 /*---------- Portability Additions ----------- in sp_sinfo.cpp */
368 uSHORT netInsert(dptBuffer_S *buffer);
369 uSHORT netExtract(dptBuffer_S *buffer);
370 #endif /* DPT PORTABLE */
371 /*--------------------------------------------*/
377 /*SCO_Info_S - end */
380 /*struct - USL_Info_S - start
381 *===========================================================================
385 * This structure defines the system information specific to a
388 *---------------------------------------------------------------------------*/
400 /*---------- Portability Additions ----------- in sp_sinfo.cpp */
402 uSHORT netInsert(dptBuffer_S *buffer);
403 uSHORT netExtract(dptBuffer_S *buffer);
404 #endif /* DPT PORTABLE */
405 /*--------------------------------------------*/
411 /*USL_Info_S - end */
414 /* Restore default structure packing */
416 #if defined (_DPT_AIX)
417 #pragma options align=reset
418 #elif defined (UNPACK_FOUR)
423 #endif /* no unpack */
425 #ifdef DPT_MEASURE_PERFORMANCE
426 typedef struct dpt_metrics {
427 u_int32_t command_count[256]; /* We assume MAX 256 SCSI commands */
428 u_int32_t max_command_time[256];
429 u_int32_t min_command_time[256];
431 u_int32_t min_intr_time;
432 u_int32_t max_intr_time;
433 u_int32_t max_intr_gap;
434 u_int32_t max_ht_time;
435 u_int32_t aborted_interrupts;
436 u_int32_t spurious_interrupts;
437 u_int32_t aborted_requests;
438 u_int32_t retried_requests;
440 u_int32_t max_waiting_count;
441 u_int32_t max_submit_count;
442 u_int32_t max_complete_count;
444 u_int32_t min_waiting_time;
445 u_int32_t min_submit_time;
446 u_int32_t min_complete_time;
448 u_int32_t max_waiting_time;
449 u_int32_t max_submit_time;
450 u_int32_t max_complete_time;
452 u_int32_t command_collisions;
453 u_int32_t command_too_busy;
454 u_int32_t max_eata_tries;
455 u_int32_t min_eata_tries;
457 u_int32_t read_by_size_count[10];
458 u_int32_t write_by_size_count[10];
459 u_int32_t read_by_size_min_time[10];
460 u_int32_t read_by_size_max_time[10];
461 struct timeval read_by_size_total_time[10];
462 u_int32_t write_by_size_min_time[10];
463 u_int32_t write_by_size_max_time[10];
464 struct timeval write_by_size_total_time[10];
474 #define SIZE_BIGGER 8
477 struct timeval intr_started;
481 #endif /* __SYS_INFO_H */