1 /* $FreeBSD: src/sys/dev/asr/sys_info.h,v 1.1.2.2 2001/08/23 05:21:29 scottl Exp $ */
2 /* $DragonFly: src/sys/dev/raid/asr/sys_info.h,v 1.5 2004/02/12 00:00:19 dillon Exp $ */
4 * Copyright (c) 1996-1999 Distributed Processing Technology Corporation
7 * Redistribution and use in source form, with or without modification, are
8 * permitted provided that redistributions of source code must retain the
9 * above copyright notice, this list of conditions and the following disclaimer.
11 * This software is provided `as is' by Distributed Processing Technology and
12 * any express or implied warranties, including, but not limited to, the
13 * implied warranties of merchantability and fitness for a particular purpose,
14 * are disclaimed. In no event shall Distributed Processing Technology be
15 * liable for any direct, indirect, incidental, special, exemplary or
16 * consequential damages (including, but not limited to, procurement of
17 * substitute goods or services; loss of use, data, or profits; or business
18 * interruptions) however caused and on any theory of liability, whether in
19 * contract, strict liability, or tort (including negligence or otherwise)
20 * arising in any way out of the use of this driver software, even if advised
21 * of the possibility of such damage.
29 ****************************************************************************
33 * This file contains structure definitions for the OS dependent
34 *layer system information buffers.
36 *Copyright Distributed Processing Technology, Corp.
38 * Maitland, Fl. 32751 USA
39 * Phone: (407) 830-5522 Fax: (407) 260-5366
50 *****************************************************************************/
53 /*Include Files ------------------------------------------------------------- */
55 #if (defined(KERNEL) && defined(__bsdi__))
56 # include "i386/isa/dpt_osd_util.h"
57 #elif ((defined(KERNEL) || defined(_KERNEL)) && defined(__DragonFly__))
58 # if (KERN_VERSION < 3)
59 # include "i386/isa/dpt_osd_util.h"
61 # include "osd_util.h"
64 # include "osd_util.h"
68 #if defined (_DPT_AIX)
69 #pragma options align=packed
73 #endif /* no unpack */
76 /*struct - driveParam_S - start
77 *===========================================================================
81 * This structure defines the drive parameters seen during
84 *---------------------------------------------------------------------------*/
92 uSHORT cylinders; /* Upto 1024 */
93 uCHAR heads; /* Upto 255 */
94 uCHAR sectors; /* Upto 63 */
98 //---------- Portability Additions ----------- in sp_sinfo.cpp
100 uSHORT netInsert(dptBuffer_S *buffer);
101 uSHORT netExtract(dptBuffer_S *buffer);
103 //--------------------------------------------
109 /*driveParam_S - end */
112 /*struct - sysInfo_S - start
113 *===========================================================================
117 * This structure defines the command system information that
118 *should be returned by every OS dependent layer.
120 *---------------------------------------------------------------------------*/
122 /*flags - bit definitions */
123 #define SI_CMOS_Valid 0x0001
124 #define SI_NumDrivesValid 0x0002
125 #define SI_ProcessorValid 0x0004
126 #define SI_MemorySizeValid 0x0008
127 #define SI_DriveParamsValid 0x0010
128 #define SI_SmartROMverValid 0x0020
129 #define SI_OSversionValid 0x0040
130 #define SI_OSspecificValid 0x0080 /* 1 if OS structure returned */
131 #define SI_BusTypeValid 0x0100
133 #define SI_ALL_VALID 0x0FFF /* All Std SysInfo is valid */
134 #define SI_NO_SmartROM 0x8000
136 /*busType - definitions */
137 #define SI_ISA_BUS 0x00
138 #define SI_MCA_BUS 0x01
139 #define SI_EISA_BUS 0x02
140 #define SI_PCI_BUS 0x04
148 uCHAR drive0CMOS; /* CMOS Drive 0 Type */
149 uCHAR drive1CMOS; /* CMOS Drive 1 Type */
150 uCHAR numDrives; /* 0040:0075 contents */
151 uCHAR processorFamily; /* Same as DPTSIG's definition */
152 uCHAR processorType; /* Same as DPTSIG's definition */
153 uCHAR smartROMMajorVersion;
154 uCHAR smartROMMinorVersion; /* SmartROM version */
155 uCHAR smartROMRevision;
156 uSHORT flags; /* See bit definitions above */
157 uSHORT conventionalMemSize; /* in KB */
158 uLONG extendedMemSize; /* in KB */
159 uLONG osType; /* Same as DPTSIG's definition */
160 uCHAR osMajorVersion;
161 uCHAR osMinorVersion; /* The OS version */
164 uCHAR busType; /* See defininitions above */
165 uSHORT osSubRevision;
166 uCHAR pad[2]; /* For alignment */
169 uCHAR busType; /* See defininitions above */
170 uCHAR pad[3]; /* For alignment */
172 driveParam_S drives[16]; /* SmartROM Logical Drives */
176 //---------- Portability Additions ----------- in sp_sinfo.cpp
178 uSHORT netInsert(dptBuffer_S *buffer);
179 uSHORT netExtract(dptBuffer_S *buffer);
181 //--------------------------------------------
190 /*struct - DOS_Info_S - start
191 *===========================================================================
195 * This structure defines the system information specific to a
198 *---------------------------------------------------------------------------*/
200 /*flags - bit definitions */
201 #define DI_DOS_HIGH 0x01 /* DOS is loaded high */
202 #define DI_DPMI_VALID 0x02 /* DPMI version is valid */
210 uCHAR flags; /* See bit definitions above */
211 uSHORT driverLocation; /* SmartROM BIOS address */
217 //---------- Portability Additions ----------- in sp_sinfo.cpp
219 uSHORT netInsert(dptBuffer_S *buffer);
220 uSHORT netExtract(dptBuffer_S *buffer);
221 #endif // DPT PORTABLE
222 //--------------------------------------------
228 /*DOS_Info_S - end */
231 /*struct - Netware_Info_S - start
232 *===========================================================================
236 * This structure defines the system information specific to a
239 *---------------------------------------------------------------------------*/
242 struct Netware_Info_S {
247 uCHAR driverName[13]; /* ie PM12NW31.DSK */
248 uCHAR serverName[48];
249 uCHAR netwareVersion; /* The Netware OS version */
250 uCHAR netwareSubVersion;
251 uCHAR netwareRevision;
252 uSHORT maxConnections; /* Probably 250 or 1000 */
253 uSHORT connectionsInUse;
259 uCHAR clibMajorVersion; /* The CLIB.NLM version */
260 uCHAR clibMinorVersion;
265 //---------- Portability Additions ----------- in sp_sinfo.cpp
267 uSHORT netInsert(dptBuffer_S *buffer);
268 uSHORT netExtract(dptBuffer_S *buffer);
269 #endif // DPT PORTABLE
270 //--------------------------------------------
276 /*Netware_Info_S - end */
279 /*struct - OS2_Info_S - start
280 *===========================================================================
284 * This structure defines the system information specific to an
287 *---------------------------------------------------------------------------*/
299 //---------- Portability Additions ----------- in sp_sinfo.cpp
301 uSHORT netInsert(dptBuffer_S *buffer);
302 uSHORT netExtract(dptBuffer_S *buffer);
303 #endif // DPT PORTABLE
304 //--------------------------------------------
310 /*OS2_Info_S - end */
313 /*struct - WinNT_Info_S - start
314 *===========================================================================
318 * This structure defines the system information specific to a
321 *---------------------------------------------------------------------------*/
324 struct WinNT_Info_S {
333 //---------- Portability Additions ----------- in sp_sinfo.cpp
335 uSHORT netInsert(dptBuffer_S *buffer);
336 uSHORT netExtract(dptBuffer_S *buffer);
337 #endif // DPT PORTABLE
338 //--------------------------------------------
344 /*WinNT_Info_S - end */
347 /*struct - SCO_Info_S - start
348 *===========================================================================
352 * This structure defines the system information specific to an
355 *---------------------------------------------------------------------------*/
367 //---------- Portability Additions ----------- in sp_sinfo.cpp
369 uSHORT netInsert(dptBuffer_S *buffer);
370 uSHORT netExtract(dptBuffer_S *buffer);
371 #endif // DPT PORTABLE
372 //--------------------------------------------
378 /*SCO_Info_S - end */
381 /*struct - USL_Info_S - start
382 *===========================================================================
386 * This structure defines the system information specific to a
389 *---------------------------------------------------------------------------*/
401 //---------- Portability Additions ----------- in sp_sinfo.cpp
403 uSHORT netInsert(dptBuffer_S *buffer);
404 uSHORT netExtract(dptBuffer_S *buffer);
405 #endif // DPT PORTABLE
406 //--------------------------------------------
412 /*USL_Info_S - end */
415 /* Restore default structure packing */
417 #if defined (_DPT_AIX)
418 #pragma options align=reset
419 #elif defined (UNPACK_FOUR)
426 #ifdef DPT_MEASURE_PERFORMANCE
427 typedef struct dpt_metrics {
428 u_int32_t command_count[256]; /* We assume MAX 256 SCSI commands */
429 u_int32_t max_command_time[256];
430 u_int32_t min_command_time[256];
432 u_int32_t min_intr_time;
433 u_int32_t max_intr_time;
434 u_int32_t max_intr_gap;
435 u_int32_t max_ht_time;
436 u_int32_t aborted_interrupts;
437 u_int32_t spurious_interrupts;
438 u_int32_t aborted_requests;
439 u_int32_t retried_requests;
441 u_int32_t max_waiting_count;
442 u_int32_t max_submit_count;
443 u_int32_t max_complete_count;
445 u_int32_t min_waiting_time;
446 u_int32_t min_submit_time;
447 u_int32_t min_complete_time;
449 u_int32_t max_waiting_time;
450 u_int32_t max_submit_time;
451 u_int32_t max_complete_time;
453 u_int32_t command_collisions;
454 u_int32_t command_too_busy;
455 u_int32_t max_eata_tries;
456 u_int32_t min_eata_tries;
458 u_int32_t read_by_size_count[10];
459 u_int32_t write_by_size_count[10];
460 u_int32_t read_by_size_min_time[10];
461 u_int32_t read_by_size_max_time[10];
462 struct timeval read_by_size_total_time[10];
463 u_int32_t write_by_size_min_time[10];
464 u_int32_t write_by_size_max_time[10];
465 struct timeval write_by_size_total_time[10];
475 #define SIZE_BIGGER 8
478 struct timeval intr_started;
482 #endif // __SYS_INFO_H