summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'jacinto6/sgx_src/eurasia_km/include4/sgx_options.h')
-rw-r--r--jacinto6/sgx_src/eurasia_km/include4/sgx_options.h258
1 files changed, 258 insertions, 0 deletions
diff --git a/jacinto6/sgx_src/eurasia_km/include4/sgx_options.h b/jacinto6/sgx_src/eurasia_km/include4/sgx_options.h
new file mode 100644
index 0000000..b64cd39
--- /dev/null
+++ b/jacinto6/sgx_src/eurasia_km/include4/sgx_options.h
@@ -0,0 +1,258 @@
1/*************************************************************************/ /*!
2@Title
3@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
4@Description
5@License Dual MIT/GPLv2
6
7The contents of this file are subject to the MIT license as set out below.
8
9Permission is hereby granted, free of charge, to any person obtaining a copy
10of this software and associated documentation files (the "Software"), to deal
11in the Software without restriction, including without limitation the rights
12to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13copies of the Software, and to permit persons to whom the Software is
14furnished to do so, subject to the following conditions:
15
16The above copyright notice and this permission notice shall be included in
17all copies or substantial portions of the Software.
18
19Alternatively, the contents of this file may be used under the terms of
20the GNU General Public License Version 2 ("GPL") in which case the provisions
21of GPL are applicable instead of those above.
22
23If you wish to allow use of your version of this file only under the terms of
24GPL, and not to allow others to use your version of this file under the terms
25of the MIT license, indicate your decision by deleting the provisions above
26and replace them with the notice and other provisions required by GPL as set
27out in the file called "GPL-COPYING" included in this distribution. If you do
28not delete the provisions above, a recipient may use your version of this file
29under the terms of either the MIT license or GPL.
30
31This License is also included in this distribution in the file called
32"MIT-COPYING".
33
34EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
35PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
36BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
37PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
38COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
39IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
40CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
41*/ /**************************************************************************/
42
43/* Each build option listed here is packed into a dword which
44 * provides up to 32 flags (or up to 28 flags plus a numeric
45 * value in the range 0-15 which corresponds to the number of
46 * cores minus one if SGX_FEATURE_MP is defined). The corresponding
47 * bit is set if the build option was enabled at compile time.
48 *
49 * In order to extract the enabled build flags the INTERNAL_TEST
50 * switch should be enabled in a client program which includes this
51 * header. Then the client can test specific build flags by reading
52 * the bit value at ##OPTIONNAME##_SET_OFFSET in SGX_BUILD_OPTIONS.
53 *
54 * IMPORTANT: add new options to unused bits or define a new dword
55 * (e.g. SGX_BUILD_OPTIONS2) so that the bitfield remains backwards
56 * compatible.
57 */
58
59
60#if defined(DEBUG) || defined (INTERNAL_TEST)
61#define DEBUG_SET_OFFSET OPTIONS_BIT0
62#define OPTIONS_BIT0 0x1U
63#else
64#define OPTIONS_BIT0 0x0
65#endif /* DEBUG */
66
67#if defined(PDUMP) || defined (INTERNAL_TEST)
68#define PDUMP_SET_OFFSET OPTIONS_BIT1
69#define OPTIONS_BIT1 (0x1U << 1)
70#else
71#define OPTIONS_BIT1 0x0
72#endif /* PDUMP */
73
74#if defined(PVRSRV_USSE_EDM_STATUS_DEBUG) || defined (INTERNAL_TEST)
75#define PVRSRV_USSE_EDM_STATUS_DEBUG_SET_OFFSET OPTIONS_BIT2
76#define OPTIONS_BIT2 (0x1U << 2)
77#else
78#define OPTIONS_BIT2 0x0
79#endif /* PVRSRV_USSE_EDM_STATUS_DEBUG */
80
81#if defined(SUPPORT_HW_RECOVERY) || defined (INTERNAL_TEST)
82#define SUPPORT_HW_RECOVERY_SET_OFFSET OPTIONS_BIT3
83#define OPTIONS_BIT3 (0x1U << 3)
84#else
85#define OPTIONS_BIT3 0x0
86#endif /* SUPPORT_HW_RECOVERY */
87
88
89
90#if defined (SUPPORT_SID_INTERFACE)
91#define PVR_SECURE_HANDLES_SET_OFFSET OPTIONS_BIT4
92#define OPTIONS_BIT4 (0x1U << 4)
93#else
94#if defined(PVR_SECURE_HANDLES) || defined (INTERNAL_TEST)
95#define PVR_SECURE_HANDLES_SET_OFFSET OPTIONS_BIT4
96#define OPTIONS_BIT4 (0x1U << 4)
97#else
98#define OPTIONS_BIT4 0x0
99#endif /* PVR_SECURE_HANDLES */
100#endif
101
102#if defined(SGX_BYPASS_SYSTEM_CACHE) || defined (INTERNAL_TEST)
103#define SGX_BYPASS_SYSTEM_CACHE_SET_OFFSET OPTIONS_BIT5
104#define OPTIONS_BIT5 (0x1U << 5)
105#else
106#define OPTIONS_BIT5 0x0
107#endif /* SGX_BYPASS_SYSTEM_CACHE */
108
109#if defined(SGX_DMS_AGE_ENABLE) || defined (INTERNAL_TEST)
110#define SGX_DMS_AGE_ENABLE_SET_OFFSET OPTIONS_BIT6
111#define OPTIONS_BIT6 (0x1U << 6)
112#else
113#define OPTIONS_BIT6 0x0
114#endif /* SGX_DMS_AGE_ENABLE */
115
116#if defined(SGX_FAST_DPM_INIT) || defined (INTERNAL_TEST)
117#define SGX_FAST_DPM_INIT_SET_OFFSET OPTIONS_BIT8
118#define OPTIONS_BIT8 (0x1U << 8)
119#else
120#define OPTIONS_BIT8 0x0
121#endif /* SGX_FAST_DPM_INIT */
122
123#if defined(SGX_FEATURE_WRITEBACK_DCU) || defined (INTERNAL_TEST)
124#define SGX_FEATURE_DCU_SET_OFFSET OPTIONS_BIT9
125#define OPTIONS_BIT9 (0x1U << 9)
126#else
127#define OPTIONS_BIT9 0x0
128#endif /* SGX_FEATURE_WRITEBACK_DCU */
129
130#if defined(SGX_FEATURE_MP) || defined (INTERNAL_TEST)
131#define SGX_FEATURE_MP_SET_OFFSET OPTIONS_BIT10
132#define OPTIONS_BIT10 (0x1U << 10)
133#else
134#define OPTIONS_BIT10 0x0
135#endif /* SGX_FEATURE_MP */
136
137#define OPTIONS_BIT11 0x0
138
139#define OPTIONS_BIT12 0x0
140
141
142#if defined(SGX_FEATURE_SYSTEM_CACHE) || defined (INTERNAL_TEST)
143#define SGX_FEATURE_SYSTEM_CACHE_SET_OFFSET OPTIONS_BIT13
144#define OPTIONS_BIT13 (0x1U << 13)
145#else
146#define OPTIONS_BIT13 0x0
147#endif /* SGX_FEATURE_SYSTEM_CACHE */
148
149#if defined(SGX_SUPPORT_HWPROFILING) || defined (INTERNAL_TEST)
150#define SGX_SUPPORT_HWPROFILING_SET_OFFSET OPTIONS_BIT14
151#define OPTIONS_BIT14 (0x1U << 14)
152#else
153#define OPTIONS_BIT14 0x0
154#endif /* SGX_SUPPORT_HWPROFILING */
155
156
157
158#if defined(SUPPORT_ACTIVE_POWER_MANAGEMENT) || defined (INTERNAL_TEST)
159#define SUPPORT_ACTIVE_POWER_MANAGEMENT_SET_OFFSET OPTIONS_BIT15
160#define OPTIONS_BIT15 (0x1U << 15)
161#else
162#define OPTIONS_BIT15 0x0
163#endif /* SUPPORT_ACTIVE_POWER_MANAGEMENT */
164
165#if defined(SUPPORT_DISPLAYCONTROLLER_TILING) || defined (INTERNAL_TEST)
166#define SUPPORT_DISPLAYCONTROLLER_TILING_SET_OFFSET OPTIONS_BIT16
167#define OPTIONS_BIT16 (0x1U << 16)
168#else
169#define OPTIONS_BIT16 0x0
170#endif /* SUPPORT_DISPLAYCONTROLLER_TILING */
171
172#if defined(SUPPORT_PERCONTEXT_PB) || defined (INTERNAL_TEST)
173#define SUPPORT_PERCONTEXT_PB_SET_OFFSET OPTIONS_BIT17
174#define OPTIONS_BIT17 (0x1U << 17)
175#else
176#define OPTIONS_BIT17 0x0
177#endif /* SUPPORT_PERCONTEXT_PB */
178
179#if defined(SUPPORT_SGX_HWPERF) || defined (INTERNAL_TEST)
180#define SUPPORT_SGX_HWPERF_SET_OFFSET OPTIONS_BIT18
181#define OPTIONS_BIT18 (0x1U << 18)
182#else
183#define OPTIONS_BIT18 0x0
184#endif /* SUPPORT_SGX_HWPERF */
185
186
187
188#if defined(SUPPORT_SGX_MMU_DUMMY_PAGE) || defined (INTERNAL_TEST)
189#define SUPPORT_SGX_MMU_DUMMY_PAGE_SET_OFFSET OPTIONS_BIT19
190#define OPTIONS_BIT19 (0x1U << 19)
191#else
192#define OPTIONS_BIT19 0x0
193#endif /* SUPPORT_SGX_MMU_DUMMY_PAGE */
194
195#if defined(SUPPORT_SGX_PRIORITY_SCHEDULING) || defined (INTERNAL_TEST)
196#define SUPPORT_SGX_PRIORITY_SCHEDULING_SET_OFFSET OPTIONS_BIT20
197#define OPTIONS_BIT20 (0x1U << 20)
198#else
199#define OPTIONS_BIT20 0x0
200#endif /* SUPPORT_SGX_PRIORITY_SCHEDULING */
201
202#if defined(SUPPORT_SGX_LOW_LATENCY_SCHEDULING) || defined (INTERNAL_TEST)
203#define SUPPORT_SGX_LOW_LATENCY_SCHEDULING_SET_OFFSET OPTIONS_BIT21
204#define OPTIONS_BIT21 (0x1U << 21)
205#else
206#define OPTIONS_BIT21 0x0
207#endif /* SUPPORT_SGX_LOW_LATENCY_SCHEDULING */
208
209#if defined(USE_SUPPORT_NO_TA3D_OVERLAP) || defined (INTERNAL_TEST)
210#define USE_SUPPORT_NO_TA3D_OVERLAP_SET_OFFSET OPTIONS_BIT22
211#define OPTIONS_BIT22 (0x1U << 22)
212#else
213#define OPTIONS_BIT22 0x0
214#endif /* USE_SUPPORT_NO_TA3D_OVERLAP */
215
216#if defined(SGX_FEATURE_MP) || defined (INTERNAL_TEST)
217#if defined(SGX_FEATURE_MP_CORE_COUNT)
218#define OPTIONS_HIGHBYTE ((SGX_FEATURE_MP_CORE_COUNT-1) << SGX_FEATURE_MP_CORE_COUNT_SET_OFFSET)
219#define SGX_FEATURE_MP_CORE_COUNT_SET_OFFSET 28UL
220#define SGX_FEATURE_MP_CORE_COUNT_SET_MASK 0xFF
221#else
222#define OPTIONS_HIGHBYTE (((SGX_FEATURE_MP_CORE_COUNT_TA-1) << SGX_FEATURE_MP_CORE_COUNT_SET_OFFSET) |\
223 ((SGX_FEATURE_MP_CORE_COUNT_3D-1) << SGX_FEATURE_MP_CORE_COUNT_SET_OFFSET_3D))
224#define SGX_FEATURE_MP_CORE_COUNT_SET_OFFSET 24UL
225#define SGX_FEATURE_MP_CORE_COUNT_SET_OFFSET_3D 28UL
226#define SGX_FEATURE_MP_CORE_COUNT_SET_MASK 0xFF
227#endif
228#else /* SGX_FEATURE_MP */
229#define OPTIONS_HIGHBYTE 0x0
230#endif /* SGX_FEATURE_MP */
231
232
233
234#define SGX_BUILD_OPTIONS \
235 OPTIONS_BIT0 |\
236 OPTIONS_BIT1 |\
237 OPTIONS_BIT2 |\
238 OPTIONS_BIT3 |\
239 OPTIONS_BIT4 |\
240 OPTIONS_BIT5 |\
241 OPTIONS_BIT6 |\
242 OPTIONS_BIT8 |\
243 OPTIONS_BIT9 |\
244 OPTIONS_BIT10 |\
245 OPTIONS_BIT11 |\
246 OPTIONS_BIT12 |\
247 OPTIONS_BIT13 |\
248 OPTIONS_BIT14 |\
249 OPTIONS_BIT15 |\
250 OPTIONS_BIT16 |\
251 OPTIONS_BIT17 |\
252 OPTIONS_BIT18 |\
253 OPTIONS_BIT19 |\
254 OPTIONS_BIT20 |\
255 OPTIONS_BIT21 |\
256 OPTIONS_BIT22 |\
257 OPTIONS_HIGHBYTE
258