2 * This file is provided under a dual BSD/GPLv2 license. When using or
3 * redistributing this file, you may do so under either license.
7 * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of version 2 of the GNU General Public License as
11 * published by the Free Software Foundation.
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
21 * The full GNU General Public License is included in this distribution
22 * in the file called LICENSE.GPL.
26 * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
27 * All rights reserved.
29 * Redistribution and use in source and binary forms, with or without
30 * modification, are permitted provided that the following conditions
33 * * Redistributions of source code must retain the above copyright
34 * notice, this list of conditions and the following disclaimer.
35 * * Redistributions in binary form must reproduce the above copyright
36 * notice, this list of conditions and the following disclaimer in
37 * the documentation and/or other materials provided with the
40 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
41 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
42 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
43 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
44 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
45 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
46 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
47 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
48 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
49 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
50 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
54 #ifndef _SCI_CONTROLLER_CONSTANTS_H_
55 #define _SCI_CONTROLLER_CONSTANTS_H_
60 * @brief This file contains constant values that change based on the type
61 * of core or framework being managed. These constants are exported
62 * in order to provide the user with information as to the bounds
63 * (i.e. how many) of specific objects.
70 #ifdef SCIC_SDS_4_ENABLED
74 * This constant defines the maximum number of phy objects that can be
75 * supported for the SCU Driver Standard (SDS) library. This is tied
76 * directly to silicon capabilities.
78 #define SCI_MAX_PHYS (4)
83 * This constant defines the maximum number of port objects that can be
84 * supported for the SCU Driver Standard (SDS) library. This is tied
85 * directly to silicon capabilities.
87 #define SCI_MAX_PORTS SCI_MAX_PHYS
90 #ifndef SCI_MIN_SMP_PHYS
92 * This constant defines the minimum number of SMP phy objects that
93 * can be supported for a single expander level.
94 * This was determined by using 36 physical phys and room for 2 virtual
97 #define SCI_MIN_SMP_PHYS (38)
100 #ifndef SCI_MAX_SMP_PHYS
102 * This constant defines the maximum number of SMP phy objects that
103 * can be supported for the SCU Driver Standard (SDS) library.
104 * This number can be increased if required.
106 #define SCI_MAX_SMP_PHYS (384)
109 #ifndef SCI_MAX_REMOTE_DEVICES
111 * This constant defines the maximum number of remote device objects that
112 * can be supported for the SCU Driver Standard (SDS) library. This is tied
113 * directly to silicon capabilities.
115 #define SCI_MAX_REMOTE_DEVICES (256)
118 #ifndef SCI_MIN_REMOTE_DEVICES
120 * This constant defines the minimum number of remote device objects that
121 * can be supported for the SCU Driver Standard (SDS) library. This # can
122 * be configured for minimum memory environments to any value less than
123 * SCI_MAX_REMOTE_DEVICES
125 #define SCI_MIN_REMOTE_DEVICES (16)
128 #ifndef SCI_MAX_IO_REQUESTS
130 * This constant defines the maximum number of IO request objects that
131 * can be supported for the SCU Driver Standard (SDS) library. This is tied
132 * directly to silicon capabilities.
134 #define SCI_MAX_IO_REQUESTS (256)
137 #ifndef SCI_MIN_IO_REQUESTS
139 * This constant defines the minimum number of IO request objects that
140 * can be supported for the SCU Driver Standard (SDS) library. This #
141 * can be configured for minimum memory environments to any value less
142 * than SCI_MAX_IO_REQUESTS.
144 #define SCI_MIN_IO_REQUESTS (1)
147 #ifndef SCI_MAX_SCATTER_GATHER_ELEMENTS
149 * This constant defines the maximum number of Scatter-Gather Elements
150 * to be used by any SCI component.
152 #define SCI_MAX_SCATTER_GATHER_ELEMENTS 130
155 #ifndef SCI_MIN_SCATTER_GATHER_ELEMENTS
157 * This constant defines the minimum number of Scatter-Gather Elements
158 * to be used by any SCI component.
160 #define SCI_MIN_SCATTER_GATHER_ELEMENTS 1
163 #else // SCIC_SDS_4_ENABLED
165 #error "SCI Core configuration left unspecified (e.g. SCIC_SDS_4_ENABLED)"
167 #endif // SCIC_SDS_4_ENABLED
170 * This constant defines the maximum number of PCI devices that can be supported
173 #define SCI_MAX_PCI_DEVICES (2)
176 * This constant defines the maximum number of controllers that can
177 * occur in a single silicon package.
179 #define SCI_MAX_CONTROLLERS_PER_PCI_DEVICE (2)
182 * This constant defines the maximum number of controllers that can
183 * be supported by a library object. The user specified maximum controller
184 * count must be less than or equal to this number. This is a driver
185 * specific constant that is not tied to silicon capabilities.
187 #if !defined(SCI_MAX_CONTROLLERS)
188 #define SCI_MAX_CONTROLLERS (2)
191 #ifndef SCI_MAX_MSIX_MESSAGES_PER_CONTROLLER
193 * This constant defines the maximum number of MSI-X interrupt vectors/messages
194 * supported for an SCU hardware controller instance.
196 #define SCI_MAX_MSIX_MESSAGES_PER_CONTROLLER (2)
200 * This constant defines the maximum number of MSI-X interrupt vectors/messages
201 * supported for an SCU device.
203 #define SCI_MAX_MSIX_MESSAGES \
204 (SCI_MAX_MSIX_MESSAGES_PER_CONTROLLER * SCI_MAX_CONTROLLERS)
207 * The maximum number of supported domain objects is currently tied to the
208 * maximum number of support port objects.
210 #define SCI_MAX_DOMAINS SCI_MAX_PORTS
214 #endif // __cplusplus
216 #endif // _SCI_CONTROLLER_CONSTANTS_H_