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.
21 * $FreeBSD: src/sys/dev/asr/sys_info.h,v 1.9 2005/01/06 01:42:29 imp Exp $
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 ------------------------------------------------------------- */
58 #pragma options align=packed
62 #endif /* no unpack */
65 /*struct - driveParam_S - start
66 *===========================================================================
70 * This structure defines the drive parameters seen during
73 *---------------------------------------------------------------------------*/
81 uSHORT cylinders; /* Upto 1024 */
82 uCHAR heads; /* Upto 255 */
83 uCHAR sectors; /* Upto 63 */
87 /*---------- Portability Additions ----------- in sp_sinfo.cpp */
89 uSHORT netInsert(dptBuffer_S *buffer);
90 uSHORT netExtract(dptBuffer_S *buffer);
91 #endif /* DPT PORTABLE */
92 /*--------------------------------------------*/
98 /*driveParam_S - end */
101 /*struct - sysInfo_S - start
102 *===========================================================================
106 * This structure defines the command system information that
107 *should be returned by every OS dependent layer.
109 *---------------------------------------------------------------------------*/
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
122 #define SI_ALL_VALID 0x0FFF /* All Std SysInfo is valid */
123 #define SI_NO_SmartROM 0x8000
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
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 */
153 uCHAR busType; /* See defininitions above */
154 uSHORT osSubRevision;
155 uCHAR pad[2]; /* For alignment */
158 uCHAR busType; /* See defininitions above */
159 uCHAR pad[3]; /* For alignment */
161 driveParam_S drives[16]; /* SmartROM Logical Drives */
165 /*---------- Portability Additions ----------- in sp_sinfo.cpp */
167 uSHORT netInsert(dptBuffer_S *buffer);
168 uSHORT netExtract(dptBuffer_S *buffer);
169 #endif /* DPT PORTABLE */
170 /*--------------------------------------------*/
179 /*struct - DOS_Info_S - start
180 *===========================================================================
184 * This structure defines the system information specific to a
187 *---------------------------------------------------------------------------*/
189 /*flags - bit definitions */
190 #define DI_DOS_HIGH 0x01 /* DOS is loaded high */
191 #define DI_DPMI_VALID 0x02 /* DPMI version is valid */
199 uCHAR flags; /* See bit definitions above */
200 uSHORT driverLocation; /* SmartROM BIOS address */
206 /*---------- Portability Additions ----------- in sp_sinfo.cpp */
208 uSHORT netInsert(dptBuffer_S *buffer);
209 uSHORT netExtract(dptBuffer_S *buffer);
210 #endif /* DPT PORTABLE */
211 /*--------------------------------------------*/
217 /*DOS_Info_S - end */
220 /*struct - Netware_Info_S - start
221 *===========================================================================
225 * This structure defines the system information specific to a
228 *---------------------------------------------------------------------------*/
231 struct Netware_Info_S {
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;
248 uCHAR clibMajorVersion; /* The CLIB.NLM version */
249 uCHAR clibMinorVersion;
254 /*---------- Portability Additions ----------- in sp_sinfo.cpp */
256 uSHORT netInsert(dptBuffer_S *buffer);
257 uSHORT netExtract(dptBuffer_S *buffer);
258 #endif /* DPT PORTABLE */
259 /*--------------------------------------------*/
265 /*Netware_Info_S - end */
268 /*struct - OS2_Info_S - start
269 *===========================================================================
273 * This structure defines the system information specific to an
276 *---------------------------------------------------------------------------*/
288 /*---------- Portability Additions ----------- in sp_sinfo.cpp */
290 uSHORT netInsert(dptBuffer_S *buffer);
291 uSHORT netExtract(dptBuffer_S *buffer);
292 #endif /* DPT PORTABLE */
293 /*--------------------------------------------*/
299 /*OS2_Info_S - end */
302 /*struct - WinNT_Info_S - start
303 *===========================================================================
307 * This structure defines the system information specific to a
310 *---------------------------------------------------------------------------*/
313 struct WinNT_Info_S {
322 /*---------- Portability Additions ----------- in sp_sinfo.cpp */
324 uSHORT netInsert(dptBuffer_S *buffer);
325 uSHORT netExtract(dptBuffer_S *buffer);
326 #endif /* DPT PORTABLE */
327 /*--------------------------------------------*/
333 /*WinNT_Info_S - end */
336 /*struct - SCO_Info_S - start
337 *===========================================================================
341 * This structure defines the system information specific to an
344 *---------------------------------------------------------------------------*/
356 /*---------- Portability Additions ----------- in sp_sinfo.cpp */
358 uSHORT netInsert(dptBuffer_S *buffer);
359 uSHORT netExtract(dptBuffer_S *buffer);
360 #endif /* DPT PORTABLE */
361 /*--------------------------------------------*/
367 /*SCO_Info_S - end */
370 /*struct - USL_Info_S - start
371 *===========================================================================
375 * This structure defines the system information specific to a
378 *---------------------------------------------------------------------------*/
390 /*---------- Portability Additions ----------- in sp_sinfo.cpp */
392 uSHORT netInsert(dptBuffer_S *buffer);
393 uSHORT netExtract(dptBuffer_S *buffer);
394 #endif /* DPT PORTABLE */
395 /*--------------------------------------------*/
401 /*USL_Info_S - end */
404 /* Restore default structure packing */
406 #if defined(_DPT_AIX)
407 #pragma options align=reset
408 #elif defined(UNPACK_FOUR)
413 #endif /* no unpack */
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];
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;
430 u_int32_t max_waiting_count;
431 u_int32_t max_submit_count;
432 u_int32_t max_complete_count;
434 u_int32_t min_waiting_time;
435 u_int32_t min_submit_time;
436 u_int32_t min_complete_time;
438 u_int32_t max_waiting_time;
439 u_int32_t max_submit_time;
440 u_int32_t max_complete_time;
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;
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];
464 #define SIZE_BIGGER 8
467 struct timeval intr_started;
471 #endif /* __SYS_INFO_H */