]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - sys/contrib/octeon-sdk/cvmx-resources.config
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / sys / contrib / octeon-sdk / cvmx-resources.config
1 /***********************license start***************
2  * Copyright (c) 2003-2010  Cavium Inc. (support@cavium.com). All rights 
3  * reserved.
4  *
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions are
8  * met:
9  *
10  *   * Redistributions of source code must retain the above copyright
11  *     notice, this list of conditions and the following disclaimer.
12  *
13  *   * Redistributions in binary form must reproduce the above
14  *     copyright notice, this list of conditions and the following
15  *     disclaimer in the documentation and/or other materials provided
16  *     with the distribution.
17
18  *   * Neither the name of Cavium Inc. nor the names of
19  *     its contributors may be used to endorse or promote products
20  *     derived from this software without specific prior written
21  *     permission.  
22
23  * This Software, including technical data, may be subject to U.S. export  control
24  * laws, including the U.S. Export Administration Act and its  associated
25  * regulations, and may be subject to export or import  regulations in other
26  * countries. 
27
28  * TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" 
29  * AND WITH ALL FAULTS AND CAVIUM INC. MAKES NO PROMISES, REPRESENTATIONS OR
30  * WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO
31  * THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY REPRESENTATION OR
32  * DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT DEFECTS, AND CAVIUM
33  * SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES OF TITLE,
34  * MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF
35  * VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR
36  * CORRESPONDENCE TO DESCRIPTION. THE ENTIRE  RISK ARISING OUT OF USE OR
37  * PERFORMANCE OF THE SOFTWARE LIES WITH YOU.
38  ***********************license end**************************************/
39
40
41
42
43
44
45 /*
46  * File version info: $Id: cvmx-resources.config 70030 2012-02-16 04:23:43Z cchavva $
47  *
48  */
49 #ifndef __CVMX_RESOURCES_CONFIG__
50 #define __CVMX_RESOURCES_CONFIG__
51
52
53 #if (CVMX_HELPER_FIRST_MBUFF_SKIP > 256)
54 #error CVMX_HELPER_FIRST_MBUFF_SKIP is greater than the maximum of 256
55 #endif
56
57 #if (CVMX_HELPER_NOT_FIRST_MBUFF_SKIP > 256)
58 #error CVMX_HELPER_NOT_FIRST_MBUFF_SKIP is greater than the maximum of 256
59 #endif
60
61
62 /* Content below this point is only used by the cvmx-config tool, and is
63 ** not used by any C files as CAVIUM_COMPONENT_REQUIREMENT is never
64 defined.
65 */
66  #ifdef CAVIUM_COMPONENT_REQUIREMENT
67     /* Define the number of LLM ports (interfaces), can be 1 or 2 */
68     cvmxconfig
69     {
70         #if CVMX_LLM_CONFIG_NUM_PORTS == 2
71             define CVMX_LLM_NUM_PORTS value = 2;
72         #else
73             define CVMX_LLM_NUM_PORTS value = 1;
74         #endif
75     }
76     /* Control the setting of Null pointer detection, default to enabled */
77     cvmxconfig {
78         #ifdef CVMX_CONFIG_NULL_POINTER_PROTECT
79             define CVMX_NULL_POINTER_PROTECT value = CVMX_CONFIG_NULL_POINTER_PROTECT;
80         #else
81             define CVMX_NULL_POINTER_PROTECT value = 1;
82         #endif
83     }
84     /* Control Debug prints, default to enabled */
85     cvmxconfig {
86         #ifdef CVMX_CONFIG_ENABLE_DEBUG_PRINTS
87             define CVMX_ENABLE_DEBUG_PRINTS value = CVMX_CONFIG_ENABLE_DEBUG_PRINTS;
88         #else
89             define CVMX_ENABLE_DEBUG_PRINTS value = 1;
90         #endif
91     }
92
93     /* Define CVMX_ENABLE_DFA_FUNCTIONS to allocate resources for the DFA functions */
94     #ifdef CVMX_ENABLE_DFA_FUNCTIONS
95         cvmxconfig
96         {
97                 fpa CVMX_FPA_DFA_POOL
98                     size        = 2
99                     protected   = 1
100                     description = "DFA command buffers";
101                 fau CVMX_FAU_DFA_STATE
102                     size        = 8
103                     count       = 1
104                     description = "FAU registers for the state of the DFA command queue";
105         }
106     #endif
107
108     /* Define CVMX_ENABLE_PKO_FUNCTIONS to allocate resources for the PKO functions */
109     #ifdef CVMX_ENABLE_PKO_FUNCTIONS
110         cvmxconfig
111         {
112                 define CVMX_PKO_QUEUES_PER_PORT_INTERFACE0
113                     value       = CVMX_HELPER_PKO_QUEUES_PER_PORT_INTERFACE0
114                     description = "PKO queues per port for interface 0 (ports 0-15)";
115                 define CVMX_PKO_QUEUES_PER_PORT_INTERFACE1
116                     value       = CVMX_HELPER_PKO_QUEUES_PER_PORT_INTERFACE1
117                     description = "PKO queues per port for interface 1 (ports 16-31)";
118                 define CVMX_PKO_QUEUES_PER_PORT_INTERFACE2
119                     value       = CVMX_HELPER_PKO_QUEUES_PER_PORT_INTERFACE2
120                     description = "PKO queues per port for interface 2";
121                 define CVMX_PKO_QUEUES_PER_PORT_INTERFACE3
122                     value       = CVMX_HELPER_PKO_QUEUES_PER_PORT_INTERFACE3
123                     description = "PKO queues per port for interface 3";
124                 define CVMX_PKO_QUEUES_PER_PORT_INTERFACE4
125                     value       = CVMX_HELPER_PKO_QUEUES_PER_PORT_INTERFACE4
126                     description = "PKO queues per port for interface 4";
127                 define CVMX_PKO_MAX_PORTS_INTERFACE0
128                     value       = CVMX_HELPER_PKO_MAX_PORTS_INTERFACE0
129                     description = "Limit on the number of PKO ports enabled for interface 0";
130                 define CVMX_PKO_MAX_PORTS_INTERFACE1
131                     value       = CVMX_HELPER_PKO_MAX_PORTS_INTERFACE1
132                     description = "Limit on the number of PKO ports enabled for interface 1";
133                 define CVMX_PKO_QUEUES_PER_PORT_PCI
134                     value       = 1
135                     description = "PKO queues per port for PCI (ports 32-35)";
136                 define CVMX_PKO_QUEUES_PER_PORT_LOOP
137                     value       = 1
138                     description = "PKO queues per port for Loop devices (ports 36-39)";
139                 /* We use two queues per port for SRIO0. Having two queues per
140                     port with two ports gives us four queues, one for each mailbox */
141                 define CVMX_PKO_QUEUES_PER_PORT_SRIO0
142                     value       = 2
143                     description = "PKO queues per port for SRIO0 devices (ports 40-41)";
144                 /* We use two queues per port for SRIO1. Having two queues per
145                     port with two ports gives us four queues, one for each mailbox */
146                 define CVMX_PKO_QUEUES_PER_PORT_SRIO1
147                     value       = 2
148                     description = "PKO queues per port for SRIO1 devices (ports 42-43)";
149                 /* Set the IPD cache mode, select from cvmx_ipd_mode_t. */
150                 define CVMX_IPD_DRAM_MODE
151                     value       = CVMX_HELPER_IPD_DRAM_MODE
152                     description = "set the IPD cache mode to CVMX_IPD_OPC_MODE_STT";
153                 fpa CVMX_FPA_PACKET_POOL
154                     pool        = 0
155                     size        = 16
156                     priority    = 1
157                     protected   = 1
158                     description = "Packet buffers";
159                 fpa CVMX_FPA_OUTPUT_BUFFER_POOL
160                     size        = 8
161                     protected   = 1
162                     description = "PKO queue command buffers";
163                 scratch CVMX_SCR_SCRATCH
164                     size        = 8
165                     iobdma      = true
166                     permanent   = false
167                     description = "Generic scratch iobdma area";
168         }
169     #endif
170
171     /* Define CVMX_ENABLE_HELPER_FUNCTIONS to allocate resources for the helper functions */
172     #ifdef CVMX_ENABLE_HELPER_FUNCTIONS
173         cvmxconfig
174         {
175                 fpa CVMX_FPA_WQE_POOL
176                     size        = 1
177                     priority    = 1
178                     protected   = 1
179                     description = "Work queue entrys";
180         }
181     #endif
182
183     /* Define CVMX_ENABLE_TIMER_FUNCTIONS to allocate resources for the timer functions */
184     #ifdef CVMX_ENABLE_TIMER_FUNCTIONS
185         cvmxconfig
186         {
187                 fpa CVMX_FPA_TIMER_POOL
188                     size        = 8
189                     protected   = 1
190                     description = "TIM command buffers";
191         }
192     #endif
193
194 #endif
195
196
197 #endif  /* __CVMX_RESOURCES_CONFIG__ */