1/*- 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. 4 * 5 * GPL LICENSE SUMMARY 6 * 7 * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved. 8 * 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. 12 * 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. 17 * 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. 23 * 24 * BSD LICENSE 25 * 26 * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved. 27 * All rights reserved. 28 * 29 * Redistribution and use in source and binary forms, with or without 30 * modification, are permitted provided that the following conditions 31 * are met: 32 * 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 38 * distribution. 39 * 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. 51 * 52 * $FreeBSD$ 53 */ 54#ifndef _SCI_CONTROLLER_CONSTANTS_H_ 55#define _SCI_CONTROLLER_CONSTANTS_H_ 56 57/** 58 * @file 59 * 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. 64 */ 65 66#ifdef __cplusplus 67extern "C" { 68#endif // __cplusplus 69 70#ifdef SCIC_SDS_4_ENABLED 71 72#ifndef SCI_MAX_PHYS 73/** 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. 77 */ 78#define SCI_MAX_PHYS (4) 79#endif 80 81#ifndef SCI_MAX_PORTS 82/** 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. 86 */ 87#define SCI_MAX_PORTS SCI_MAX_PHYS 88#endif 89 90#ifndef SCI_MIN_SMP_PHYS 91/** 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 95 * phys. 96 */ 97#define SCI_MIN_SMP_PHYS (38) 98#endif 99 100#ifndef SCI_MAX_SMP_PHYS 101/** 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. 105 */ 106#define SCI_MAX_SMP_PHYS (384) 107#endif 108 109#ifndef SCI_MAX_REMOTE_DEVICES 110/** 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. 114 */ 115#define SCI_MAX_REMOTE_DEVICES (256) 116#endif 117 118#ifndef SCI_MIN_REMOTE_DEVICES 119/** 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 124 */ 125#define SCI_MIN_REMOTE_DEVICES (16) 126#endif 127 128#ifndef SCI_MAX_IO_REQUESTS 129/** 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. 133 */ 134#define SCI_MAX_IO_REQUESTS (256) 135#endif 136 137#ifndef SCI_MIN_IO_REQUESTS 138/** 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. 143 */ 144#define SCI_MIN_IO_REQUESTS (1) 145#endif 146 147#ifndef SCI_MAX_SCATTER_GATHER_ELEMENTS 148/** 149 * This constant defines the maximum number of Scatter-Gather Elements 150 * to be used by any SCI component. 151 */ 152#define SCI_MAX_SCATTER_GATHER_ELEMENTS 130 153#endif 154 155#ifndef SCI_MIN_SCATTER_GATHER_ELEMENTS 156/** 157 * This constant defines the minimum number of Scatter-Gather Elements 158 * to be used by any SCI component. 159 */ 160#define SCI_MIN_SCATTER_GATHER_ELEMENTS 1 161#endif 162 163#else // SCIC_SDS_4_ENABLED 164 165#error "SCI Core configuration left unspecified (e.g. SCIC_SDS_4_ENABLED)" 166 167#endif // SCIC_SDS_4_ENABLED 168 169/** 170 * This constant defines the maximum number of PCI devices that can be supported 171 * by the driver. 172 */ 173#define SCI_MAX_PCI_DEVICES (2) 174 175/** 176 * This constant defines the maximum number of controllers that can 177 * occur in a single silicon package. 178 */ 179#define SCI_MAX_CONTROLLERS_PER_PCI_DEVICE (2) 180 181/** 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. 186 */ 187#if !defined(SCI_MAX_CONTROLLERS) 188#define SCI_MAX_CONTROLLERS (2) 189#endif 190 191#ifndef SCI_MAX_MSIX_MESSAGES_PER_CONTROLLER 192/** 193 * This constant defines the maximum number of MSI-X interrupt vectors/messages 194 * supported for an SCU hardware controller instance. 195 */ 196#define SCI_MAX_MSIX_MESSAGES_PER_CONTROLLER (2) 197#endif 198 199/** 200 * This constant defines the maximum number of MSI-X interrupt vectors/messages 201 * supported for an SCU device. 202 */ 203#define SCI_MAX_MSIX_MESSAGES \ 204 (SCI_MAX_MSIX_MESSAGES_PER_CONTROLLER * SCI_MAX_CONTROLLERS) 205 206/** 207 * The maximum number of supported domain objects is currently tied to the 208 * maximum number of support port objects. 209 */ 210#define SCI_MAX_DOMAINS SCI_MAX_PORTS 211 212#ifdef __cplusplus 213} 214#endif // __cplusplus 215 216#endif // _SCI_CONTROLLER_CONSTANTS_H_ 217 218