fixes for bc_cat
[sgx.git] / pvr / sgx_options.h
1 /**********************************************************************
2  *
3  * Copyright(c) 2008 Imagination Technologies Ltd. All rights reserved.
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms and conditions of the GNU General Public License,
7  * version 2, as published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope it will be useful but, except
10  * as otherwise stated in writing, without any warranty; without even the
11  * implied warranty of merchantability or fitness for a particular purpose.
12  * See the GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along with
15  * this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
17  *
18  * The full GNU General Public License is included in this distribution in
19  * the file called "COPYING".
20  *
21  * Contact Information:
22  * Imagination Technologies Ltd. <gpl-support@imgtec.com>
23  * Home Park Estate, Kings Langley, Herts, WD4 8LZ, UK
24  *
25  ******************************************************************************/
26
27 #if defined(CONFIG_PVR_DEBUG_EXTRA) || defined(INTERNAL_TEST)
28 #define DEBUG_SET_OFFSET                                OPTIONS_BIT0
29 #define OPTIONS_BIT0                                    0x1
30 #else
31 #define OPTIONS_BIT0                                    0x0
32 #endif
33
34 #if defined(PDUMP) || defined(INTERNAL_TEST)
35 #define PDUMP_SET_OFFSET                                OPTIONS_BIT1
36 #define OPTIONS_BIT1                                    (0x1 << 1)
37 #else
38 #define OPTIONS_BIT1                                    0x0
39 #endif
40
41 #if defined(PVRSRV_USSE_EDM_STATUS_DEBUG) || defined(INTERNAL_TEST)
42 #define PVRSRV_USSE_EDM_STATUS_DEBUG_SET_OFFSET         OPTIONS_BIT2
43 #define OPTIONS_BIT2                                    (0x1 << 2)
44 #else
45 #define OPTIONS_BIT2                                    0x0
46 #endif
47
48 #define SUPPORT_HW_RECOVERY_SET_OFFSET                  OPTIONS_BIT3
49 #define OPTIONS_BIT3                                    (0x1 << 3)
50
51 #define PVR_SECURE_HANDLES_SET_OFFSET                   OPTIONS_BIT4
52 #define OPTIONS_BIT4                                    (0x1 << 4)
53
54 #if defined(INTERNAL_TEST)
55 #define SGX_BYPASS_SYSTEM_CACHE_SET_OFFSET              OPTIONS_BIT5
56 #define OPTIONS_BIT5                                    (0x1 << 5)
57 #else
58 #define OPTIONS_BIT5                                    0x0
59 #endif
60
61 #if defined(INTERNAL_TEST)
62 #define SGX_DMS_AGE_ENABLE_SET_OFFSET                   OPTIONS_BIT6
63 #define OPTIONS_BIT6                                    (0x1 << 6)
64 #else
65 #define OPTIONS_BIT6                                    0x0
66 #endif
67
68 #if defined(INTERNAL_TEST)
69 #define SGX_DONT_SWITCH_OFF_FEATURES_SET_OFFSET         OPTIONS_BIT7
70 #define OPTIONS_BIT7                                    (0x1 << 7)
71 #else
72 #define OPTIONS_BIT7                                    0x0
73 #endif
74
75 #if defined(INTERNAL_TEST)
76 #define SGX_FAST_DPM_INIT_SET_OFFSET                    OPTIONS_BIT8
77 #define OPTIONS_BIT8                                    (0x1 << 8)
78 #else
79 #define OPTIONS_BIT8                                    0x0
80 #endif
81
82 #if defined(INTERNAL_TEST)
83 #define SGX_FEATURE_DCU_SET_OFFSET                      OPTIONS_BIT9
84 #define OPTIONS_BIT9                                    (0x1 << 9)
85 #else
86 #define OPTIONS_BIT9                                    0x0
87 #endif
88
89 #if defined(INTERNAL_TEST)
90 #define SGX_FEATURE_MP_SET_OFFSET                       OPTIONS_BIT10
91 #define OPTIONS_BIT10                                   (0x1 << 10)
92 #else
93 #define OPTIONS_BIT10                                   0x0
94 #endif
95
96 #if defined(INTERNAL_TEST)
97 #define SGX_FEATURE_MULTITHREADED_UKERNEL_SET_OFFSET    OPTIONS_BIT11
98 #define OPTIONS_BIT11                                   (0x1 << 11)
99 #else
100 #define OPTIONS_BIT11                                   0x0
101 #endif
102
103 #if defined(INTERNAL_TEST)
104 #define SGX_FEATURE_OVERLAPPED_SPM_SET_OFFSET           OPTIONS_BIT12
105 #define OPTIONS_BIT12                                   (0x1 << 12)
106 #else
107 #define OPTIONS_BIT12                                   0x0
108 #endif
109
110 #if defined(INTERNAL_TEST)
111 #define SGX_FEATURE_RENDER_TARGET_ARRAYS_SET_OFFSET     OPTIONS_BIT13
112 #define OPTIONS_BIT13                                   (0x1 << 13)
113 #else
114 #define OPTIONS_BIT13                                   0x0
115 #endif
116
117 #if defined(INTERNAL_TEST)
118 #define SGX_FEATURE_SYSTEM_CACHE_SET_OFFSET             OPTIONS_BIT14
119 #define OPTIONS_BIT14                                   (0x1 << 14)
120 #else
121 #define OPTIONS_BIT14                                   0x0
122 #endif
123
124 #if defined(INTERNAL_TEST)
125 #define SGX_SUPPORT_HWPROFILING_SET_OFFSET              OPTIONS_BIT15
126 #define OPTIONS_BIT15                                   (0x1 << 15)
127 #else
128 #define OPTIONS_BIT15                                   0x0
129 #endif
130
131 #define SUPPORT_ACTIVE_POWER_MANAGEMENT_SET_OFFSET      OPTIONS_BIT16
132 #define OPTIONS_BIT16                                   (0x1 << 16)
133
134 #if defined(INTERNAL_TEST)
135 #define SUPPORT_DISPLAYCONTROLLER_TILING_SET_OFFSET     OPTIONS_BIT17
136 #define OPTIONS_BIT17                                   (0x1 << 17)
137 #else
138 #define OPTIONS_BIT17                                   0x0
139 #endif
140
141 #define SUPPORT_PERCONTEXT_PB_SET_OFFSET                OPTIONS_BIT18
142 #define OPTIONS_BIT18                                   (0x1 << 18)
143
144 #define OPTIONS_BIT19                                   (0x1 << 19)
145
146 #if defined(INTERNAL_TEST)
147 #define SUPPORT_SGX_MMU_DUMMY_PAGE_SET_OFFSET           OPTIONS_BIT20
148 #define OPTIONS_BIT20                                   (0x1 << 20)
149 #else
150 #define OPTIONS_BIT20                                   0x0
151 #endif
152
153 #define SUPPORT_SGX_PRIORITY_SCHEDULING_SET_OFFSET      OPTIONS_BIT21
154 #define OPTIONS_BIT21                                   (0x1 << 21)
155
156 #if defined(INTERNAL_TEST)
157 #define USE_SUPPORT_NO_TA3D_OVERLAP_SET_OFFSET          OPTIONS_BIT22
158 #define OPTIONS_BIT22                                   (0x1 << 22)
159 #else
160 #define OPTIONS_BIT22                                   0x0
161 #endif
162
163 #if defined(INTERNAL_TEST)
164 #define OPTIONS_HIGHBYTE        \
165         ((SGX_FEATURE_MP_CORE_COUNT-1) << SGX_FEATURE_MP_CORE_COUNT_SET_OFFSET)
166 #define SGX_FEATURE_MP_CORE_COUNT_SET_OFFSET            28UL
167 #define SGX_FEATURE_MP_CORE_COUNT_SET_MASK              0xFF
168 #else
169 #define OPTIONS_HIGHBYTE                                0x0
170 #endif
171
172 #define SGX_BUILD_OPTIONS       (                                          \
173         OPTIONS_BIT0  | OPTIONS_BIT1  | OPTIONS_BIT2  | OPTIONS_BIT3  |    \
174         OPTIONS_BIT4  | OPTIONS_BIT5  | OPTIONS_BIT6  | OPTIONS_BIT7  |    \
175         OPTIONS_BIT8  | OPTIONS_BIT9  | OPTIONS_BIT10 | OPTIONS_BIT11 |    \
176         OPTIONS_BIT12 | OPTIONS_BIT13 | OPTIONS_BIT14 | OPTIONS_BIT15 |    \
177         OPTIONS_BIT16 | OPTIONS_BIT17 | OPTIONS_BIT18 | OPTIONS_BIT19 |    \
178         OPTIONS_BIT20 | OPTIONS_BIT21 | OPTIONS_BIT22 | OPTIONS_HIGHBYTE)