xref: /reactos/drivers/storage/ide/uniata/config.h (revision 845faec4)
1 #ifndef __UNIATA_CONFIG__H__
2 #define __UNIATA_CONFIG__H__
3 
4 
5 /***************************************************/
6 /*        Options                                  */
7 /***************************************************/
8 
9 /***************************************/
10 // Send Debug messages directly to DbgPrintLonner using its SDK
11 /***************************************/
12 
13 //#define USE_DBGPRINT_LOGGER
14 
15 /***************************************/
16 // Send Debug messages via ScsiPort API
17 /***************************************/
18 
19 //#define SCSI_PORT_DBG_PRINT
20 
21 /***************************************/
22 // Using DbgPrint on raised IRQL will crash w2k
23 // this will not happen immediately, so we shall see some logs.
24 // You can tune Irql checking here
25 // Note: you can avoid crashes if configure DbgPrintLogger to check Irql
26 /***************************************/
27 
28 #define LOG_ON_RAISED_IRQL_W2K    TRUE
29 //#define LOG_ON_RAISED_IRQL_W2K    FALSE
30 
31 /***************************************/
32 // Use hack to avoid PCI-ISA DMA limitations (physical memory must
33 // be allocated below 16Mb). Actually there is no such limitation,
34 // so we have to pretent to be PIO and converl logical addresses
35 // to physical manually
36 /***************************************/
37 
38 #define USE_OWN_DMA
39 
40 /***************************************/
41 // Special option, enables dumping of ATAPI cammands and data buffers
42 // via DbgPrint API
43 /***************************************/
44 
45 //#define UNIATA_DUMP_ATAPI
46 #define UNIATA_DUMP_RW
47 
48 /***************************************/
49 // Optimization for uni-processor machines
50 /***************************************/
51 
52 //#define UNI_CPU_OPTIMIZATION
53 
54 /***************************************/
55 // Enable/disable performance statistics
56 /***************************************/
57 
58 #define QUEUE_STATISTICS
59 
60 #define IO_STATISTICS
61 
62 /***************************************/
63 // Misc
64 /***************************************/
65 
66 //#define NAVO_TEST
67 
68 /***************************************************/
69 /*    Validate Options                             */
70 /***************************************************/
71 
72 #ifdef _DEBUG
73 
74  #ifndef DBG
75   #define DBG
76  #endif //DBG
77 
78 #else //_DEBUG
79 
80  #ifdef USE_DBGPRINT_LOGGER
81   #undef USE_DBGPRINT_LOGGER
82  #endif //USE_DBGPRINT_LOGGER
83 
84 #endif // !_DEBUG
85 
86 /***************************************************/
87 /*  Compiler dependencies                          */
88 /***************************************************/
89 
90 /* ReactOS-specific defines */
91 #ifdef __REACTOS__
92  #define USE_REACTOS_DDK
93 #endif //__REACTOS__
94 
95 #ifdef USE_REACTOS_DDK
96  #define ULONGIO_PTR     ULONG_PTR
97  #define CRNT_ILK_TYPE
98  #define CRNT_ILK_PTYPE
99  #define REGRTL_STR_PTYPE
100 #else
101  #define ULONG_PTR       ULONG
102  #define ULONGIO_PTR     ULONG
103  #define CRNT_ILK_TYPE   (PVOID)
104  #define CRNT_ILK_PTYPE  (PVOID*)
105  #define REGRTL_STR_PTYPE  (PWCHAR)
106 #endif //USE_REACTOS_DDK
107 
108 /* Are we under GNU C (mingw) ??? */
109 #if __GNUC__ >=3
110 
111  #define  DEF_U64(x)     (x##ULL)
112  #define  DEF_I64(x)     (x##LL)
113 
114  /* ReactOS-specific defines */
115 
116  #ifndef DDKAPI
117   #define DDKAPI          __attribute__((stdcall))
118  #endif
119  #ifndef DDKCDECLAPI
120   #define DDKCDECLAPI     __attribute__((cdecl))
121  #endif
122  #ifndef DDKFASTAPI
123   #define DDKFASTAPI      __attribute__((fastcall))
124  #endif
125 
126  #define DECLSPEC_NAKED   __attribute__((naked))
127 
128 #else // !__GNUC__ => MSVC/Intel
129 
130  #define  DEF_U64(x)     (x##UI64)
131  #define  DEF_I64(x)     (x##I64)
132 
133  /* ReactOS-specific defines */
134 
135  #ifndef DDKAPI
136   #define DDKAPI          __stdcall
137  #endif
138  #ifndef DDKCDECLAPI
139   #define DDKCDECLAPI     _cdecl
140  #endif
141  #ifndef DDKFASTAPI
142   #define DDKFASTAPI      __fastcall
143  #endif
144 
145  #define DECLSPEC_NAKED   __declspec(naked)
146 
147 #endif //__GNUC__
148 
149 
150 #endif //__UNIATA_CONFIG__H__
151