1 /*******************************************************************************
2 *Copyright (c) 2014 PMC-Sierra, Inc. All rights reserved.
4 *Redistribution and use in source and binary forms, with or without modification, are permitted provided
5 *that the following conditions are met:
6 *1. Redistributions of source code must retain the above copyright notice, this list of conditions and the
8 *2. Redistributions in binary form must reproduce the above copyright notice,
9 *this list of conditions and the following disclaimer in the documentation and/or other materials provided
10 *with the distribution.
12 *THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED
13 *WARRANTIES,INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
14 *FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
15 *FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16 *NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
17 *BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
18 *LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
19 *SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
23 *******************************************************************************/
24 /***************************************************************************
26 Version Control Information:
31 Note: This file defines the working enviornment of the system. All
32 defines listed in this file could also be compiler flags.
33 I am listing all the defines (even if used as a compiler flag)
34 so that they can be seen and documented.
35 ***************************************************************************/
39 #include <dev/pms/freebsd/driver/common/osstring.h>
42 ** Define the protocols to compile with. Currently, these defines are
43 ** only for this header file and are used further down to define the protocol
44 ** specific enviornment:
46 ** #define AG_PROTOCOL_ISCSI
47 ** #define AG_PROTOCOL_FC
51 ** Define the application types:
53 ** #define INITIATOR_DRIVER
54 ** #define TARGET_DRIVER
58 ** Define the endian-ness of the host CPU using one of the following:
60 ** #define AG_CPU_LITTLE_ENDIAN
61 ** #define AG_CPU_BIG_ENDIAN
65 ** Define the host CPU word size
67 ** #define AG_CPU_32_BIT
68 ** #define AG_CPU_64_BIT
78 ** The following allow the code to use defines for word alignment and adding
79 ** to allow for 32bit and 64bit system differences.
82 #define AG_WORD_ALIGN_ADD 3
83 #define AG_WORD_ALIGN_MASK 0xfffffffc
85 #define AG_WORD_ALIGN_ADD 7
86 #define AG_WORD_ALIGN_MASK 0xfffffff8
89 /***************************************************************************
90 iSCSI enviornment - The following is used for compiling the iSCSI
92 **************************************************************************/
95 ** Define the existance of an external bus swapper using on of the
98 ** #define AG_SWAPPING_BUS
99 ** #define AG_NON_SWAPPING_BUS
104 ** Define the use of cache memory for message system:
106 ** #define AG_CACHED_MSG_SYSTEM
109 /* #define AG_CACHED_MSG_SYSTEM */
111 /***************************************************************************
112 FC enviornment - The following is used for compiling the FC protocol.
113 **************************************************************************/
116 ** Define if an PMC-Sierra card is being used:
118 ** #define CCFLAGS_PMC_SIERRA_BOARD
123 ** Define if the TSDK is being used:
125 ** #define FCLayer_Tsdk
130 ** The following defines are not changed directly, but use either previous
131 ** defines, or compiler directives.
134 #ifdef AG_CPU_LITTLE_ENDIAN
135 #define FC_DMA_LITTLE_ENDIAN
136 #define FC_CPU_LITTLE_ENDIAN
137 #define SA_DMA_LITTLE_ENDIAN
138 #define SA_CPU_LITTLE_ENDIAN
141 #ifdef AG_CPU_BIG_ENDIAN
142 #define FC_DMA_BIG_ENDIAN
143 #define FC_CPU_BIG_ENDIAN
144 #define SA_DMA_BIG_ENDIAN
145 #define SA_CPU_BIG_ENDIAN
148 /* warning: leave this next line as-is. it is used for FC-Layer testing */
151 #endif /* __OSENV_H__ */