]> CyberLeo.Net >> Repos - FreeBSD/releng/8.2.git/blob - sys/contrib/octeon-sdk/cvmx-resources.config
Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release.
[FreeBSD/releng/8.2.git] / sys / contrib / octeon-sdk / cvmx-resources.config
1 /***********************license start***************
2  * Copyright (c) 2003-2008 Cavium Networks (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 Networks 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  * TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
24  * AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS
25  * OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH
26  * RESPECT TO THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY
27  * REPRESENTATION OR DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT
28  * DEFECTS, AND CAVIUM SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES
29  * OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR
30  * PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET
31  * POSSESSION OR CORRESPONDENCE TO DESCRIPTION.  THE ENTIRE RISK ARISING OUT
32  * OF USE OR PERFORMANCE OF THE SOFTWARE LIES WITH YOU.
33  *
34  *
35  * For any questions regarding licensing please contact marketing@caviumnetworks.com
36  *
37  ***********************license end**************************************/
38
39
40
41
42
43 /*
44  * File version info: $Id: cvmx-resources.config 42150 2009-04-10 21:43:27Z pkapoor $
45  *
46  */
47 #ifndef __CVMX_RESOURCES_CONFIG__
48 #define __CVMX_RESOURCES_CONFIG__
49
50
51 #if (CVMX_HELPER_FIRST_MBUFF_SKIP > 256)
52 #error CVMX_HELPER_FIRST_MBUFF_SKIP is greater than the maximum of 256
53 #endif
54
55 #if (CVMX_HELPER_NOT_FIRST_MBUFF_SKIP > 256)
56 #error CVMX_HELPER_NOT_FIRST_MBUFF_SKIP is greater than the maximum of 256
57 #endif
58
59
60 /* Content below this point is only used by the cvmx-config tool, and is
61 ** not used by any C files as CAVIUM_COMPONENT_REQUIREMENT is never
62 defined.
63 */
64  #ifdef CAVIUM_COMPONENT_REQUIREMENT
65     /* Define the number of LLM ports (interfaces), can be 1 or 2 */
66     cvmxconfig
67     {
68         #if CVMX_LLM_CONFIG_NUM_PORTS == 2
69             define CVMX_LLM_NUM_PORTS value = 2;
70         #else
71             define CVMX_LLM_NUM_PORTS value = 1;
72         #endif
73     }
74     /* Control the setting of Null pointer detection, default to enabled */
75     cvmxconfig {
76         #ifdef CVMX_CONFIG_NULL_POINTER_PROTECT
77             define CVMX_NULL_POINTER_PROTECT value = CVMX_CONFIG_NULL_POINTER_PROTECT;
78         #else
79             define CVMX_NULL_POINTER_PROTECT value = 1;
80         #endif
81     }
82     /* Control Debug prints, default to enabled */
83     cvmxconfig {
84         #ifdef CVMX_CONFIG_ENABLE_DEBUG_PRINTS
85             define CVMX_ENABLE_DEBUG_PRINTS value = CVMX_CONFIG_ENABLE_DEBUG_PRINTS;
86         #else
87             define CVMX_ENABLE_DEBUG_PRINTS value = 1;
88         #endif
89     }
90
91     /* Define CVMX_ENABLE_DFA_FUNCTIONS to allocate resources for the DFA functions */
92     #ifdef CVMX_ENABLE_DFA_FUNCTIONS
93         cvmxconfig
94         {
95                 fpa CVMX_FPA_DFA_POOL
96                     size        = 2
97                     protected   = 1
98                     description = "DFA command buffers";
99                 fau CVMX_FAU_DFA_STATE
100                     size        = 8
101                     count       = 1
102                     description = "FAU registers for the state of the DFA command queue";
103         }
104     #endif
105
106     /* Define CVMX_ENABLE_PKO_FUNCTIONS to allocate resources for the PKO functions */
107     #ifdef CVMX_ENABLE_PKO_FUNCTIONS
108         cvmxconfig
109         {
110                 define CVMX_PKO_QUEUES_PER_PORT_INTERFACE0
111                     value       = CVMX_HELPER_PKO_QUEUES_PER_PORT_INTERFACE0
112                     description = "PKO queues per port for interface 0 (ports 0-15)";
113                 define CVMX_PKO_QUEUES_PER_PORT_INTERFACE1
114                     value       = CVMX_HELPER_PKO_QUEUES_PER_PORT_INTERFACE1
115                     description = "PKO queues per port for interface 1 (ports 16-31)";
116                 define CVMX_PKO_MAX_PORTS_INTERFACE0
117                     value       = CVMX_HELPER_PKO_MAX_PORTS_INTERFACE0
118                     description = "Limit on the number of PKO ports enabled for interface 0";
119                 define CVMX_PKO_MAX_PORTS_INTERFACE1
120                     value       = CVMX_HELPER_PKO_MAX_PORTS_INTERFACE1
121                     description = "Limit on the number of PKO ports enabled for interface 1";
122                 define CVMX_PKO_QUEUES_PER_PORT_PCI
123                     value       = 1
124                     description = "PKO queues per port for PCI (ports 32-35)";
125                 define CVMX_PKO_QUEUES_PER_PORT_LOOP
126                     value       = 1
127                     description = "PKO queues per port for Loop devices (ports 36-39)";
128                 fpa CVMX_FPA_PACKET_POOL
129                     pool        = 0
130                     size        = 16
131                     priority    = 1
132                     protected   = 1
133                     description = "Packet buffers";
134                 fpa CVMX_FPA_OUTPUT_BUFFER_POOL
135                     size        = 8
136                     protected   = 1
137                     description = "PKO queue command buffers";
138                 scratch CVMX_SCR_SCRATCH
139                     size        = 8
140                     iobdma      = true
141                     permanent   = false
142                     description = "Generic scratch iobdma area";
143         }
144     #endif
145
146     /* Define CVMX_ENABLE_HELPER_FUNCTIONS to allocate resources for the helper functions */
147     #ifdef CVMX_ENABLE_HELPER_FUNCTIONS
148         cvmxconfig
149         {
150                 fpa CVMX_FPA_WQE_POOL
151                     size        = 1
152                     priority    = 1
153                     protected   = 1
154                     description = "Work queue entrys";
155         }
156     #endif
157
158     /* Define CVMX_ENABLE_TIMER_FUNCTIONS to allocate resources for the timer functions */
159     #ifdef CVMX_ENABLE_TIMER_FUNCTIONS
160         cvmxconfig
161         {
162                 fpa CVMX_FPA_TIMER_POOL
163                     size        = 8
164                     protected   = 1
165                     description = "TIM command buffers";
166         }
167     #endif
168
169 #endif
170
171
172 #endif  /* __CVMX_RESOURCES_CONFIG__ */