1 /*************************************************************************/ /*!
3 @Title RGX KM build options
4 @Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
5 @License Dual MIT/GPLv2
7 The contents of this file are subject to the MIT license as set out below.
9 Permission is hereby granted, free of charge, to any person obtaining a copy
10 of this software and associated documentation files (the "Software"), to deal
11 in the Software without restriction, including without limitation the rights
12 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 copies of the Software, and to permit persons to whom the Software is
14 furnished to do so, subject to the following conditions:
16 The above copyright notice and this permission notice shall be included in
17 all copies or substantial portions of the Software.
19 Alternatively, the contents of this file may be used under the terms of
20 the GNU General Public License Version 2 ("GPL") in which case the provisions
21 of GPL are applicable instead of those above.
23 If you wish to allow use of your version of this file only under the terms of
24 GPL, and not to allow others to use your version of this file under the terms
25 of the MIT license, indicate your decision by deleting the provisions above
26 and replace them with the notice and other provisions required by GPL as set
27 out in the file called "GPL-COPYING" included in this distribution. If you do
28 not delete the provisions above, a recipient may use your version of this file
29 under the terms of either the MIT license or GPL.
31 This License is also included in this distribution in the file called
34 EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
35 PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
36 BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
37 PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
38 COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
39 IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
40 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
41 */ /**************************************************************************/
43 /* Each build option listed here is packed into a dword which
44 * provides up to log2(RGX_BUILD_OPTIONS_MASK_KM + 1) flags.
45 * The corresponding bit is set if the build option
46 * was enabled at compile time.
48 * In order to extract the enabled build flags the INTERNAL_TEST
49 * switch should be enabled in a client program which includes this
50 * header. Then the client can test specific build flags by reading
51 * the bit value at ##OPTIONNAME##_SET_OFFSET in RGX_BUILD_OPTIONS_KM.
53 * IMPORTANT: add new options to unused bits or define a new dword
54 * (e.g. RGX_BUILD_OPTIONS_KM2) so that the bitfield remains backwards
58 #define RGX_BUILD_OPTIONS_MASK_KM 0x0000FFFFUL
60 #if defined(NO_HARDWARE) || defined (INTERNAL_TEST)
61 #define NO_HARDWARE_SET_OFFSET OPTIONS_BIT0
62 #define OPTIONS_BIT0 (0x1ul << 0)
63 #if OPTIONS_BIT0 > RGX_BUILD_OPTIONS_MASK_KM
64 #error "Bit exceeds reserved range"
67 #define OPTIONS_BIT0 0x0
68 #endif /* NO_HARDWARE */
71 #if defined(PDUMP) || defined (INTERNAL_TEST)
72 #define PDUMP_SET_OFFSET OPTIONS_BIT1
73 #define OPTIONS_BIT1 (0x1ul << 1)
74 #if OPTIONS_BIT1 > RGX_BUILD_OPTIONS_MASK_KM
75 #error "Bit exceeds reserved range"
78 #define OPTIONS_BIT1 0x0
82 #if defined(SUPPORT_META_SLAVE_BOOT) || defined (INTERNAL_TEST)
83 #define SUPPORT_META_SLAVE_BOOT_SET_OFFSET OPTIONS_BIT2
84 #define OPTIONS_BIT2 (0x1ul << 2)
85 #if OPTIONS_BIT2 > RGX_BUILD_OPTIONS_MASK_KM
86 #error "Bit exceeds reserved range"
89 #define OPTIONS_BIT2 0x0
90 #endif /* SUPPORT_META_SLAVE_BOOT */
93 #if defined(SUPPORT_MMU_FREELIST) || defined (INTERNAL_TEST)
94 #define SUPPORT_MMU_FREELIST_SET_OFFSET OPTIONS_BIT3
95 #define OPTIONS_BIT3 (0x1ul << 3)
96 #if OPTIONS_BIT3 > RGX_BUILD_OPTIONS_MASK_KM
97 #error "Bit exceeds reserved range"
100 #define OPTIONS_BIT3 0x0
101 #endif /* SUPPORT_MMU_FREELIST */
104 #if defined(SUPPORT_PMMIF) || defined (INTERNAL_TEST)
105 #define SUPPORT_PMMIF_SET_OFFSET OPTIONS_BIT4
106 #define OPTIONS_BIT4 (0x1ul << 4)
107 #if OPTIONS_BIT4 > RGX_BUILD_OPTIONS_MASK_KM
108 #error "Bit exceeds reserved range"
111 #define OPTIONS_BIT4 0x0
112 #endif /* SUPPORT_PMMIF */
115 #if defined(SUPPORT_RGX) || defined (INTERNAL_TEST)
116 #define SUPPORT_RGX_SET_OFFSET OPTIONS_BIT5
117 #define OPTIONS_BIT5 (0x1ul << 5)
118 #if OPTIONS_BIT5 > RGX_BUILD_OPTIONS_MASK_KM
119 #error "Bit exceeds reserved range"
122 #define OPTIONS_BIT5 0x0
123 #endif /* SUPPORT_RGX */
126 #if defined(SUPPORT_SECURE_EXPORT) || defined (INTERNAL_TEST)
127 #define SUPPORT_SECURE_EXPORT_SET_OFFSET OPTIONS_BIT6
128 #define OPTIONS_BIT6 (0x1ul << 6)
129 #if OPTIONS_BIT6 > RGX_BUILD_OPTIONS_MASK_KM
130 #error "Bit exceeds reserved range"
133 #define OPTIONS_BIT6 0x0
134 #endif /* SUPPORT_SECURE_EXPORT */
137 #if defined(SUPPORT_INSECURE_EXPORT) || defined (INTERNAL_TEST)
138 #define SUPPORT_INSECURE_EXPORT_SET_OFFSET OPTIONS_BIT7
139 #define OPTIONS_BIT7 (0x1ul << 7)
140 #if OPTIONS_BIT7 > RGX_BUILD_OPTIONS_MASK_KM
141 #error "Bit exceeds reserved range"
144 #define OPTIONS_BIT7 0x0
145 #endif /* SUPPORT_INSECURE_EXPORT */
148 #if defined(SUPPORT_VFP) || defined (INTERNAL_TEST)
149 #define SUPPORT_VFP_SET_OFFSET OPTIONS_BIT8
150 #define OPTIONS_BIT8 (0x1ul << 8)
151 #if OPTIONS_BIT8 > RGX_BUILD_OPTIONS_MASK_KM
152 #error "Bit exceeds reserved range"
155 #define OPTIONS_BIT8 0x0
156 #endif /* SUPPORT_VFP */
159 #if defined(SUPPORT_DRM) || defined (INTERNAL_TEST)
160 #define SUPPORT_DRM_SET_OFFSET OPTIONS_BIT9
161 #define OPTIONS_BIT9 (0x1ul << 9)
162 #if OPTIONS_BIT9 > RGX_BUILD_OPTIONS_MASK_KM
163 #error "Bit exceeds reserved range"
166 #define OPTIONS_BIT9 0x0
167 #endif /* SUPPORT_DRM */
170 #if defined(SUPPORT_ION) || defined (INTERNAL_TEST)
171 #define SUPPORT_ION_SET_OFFSET OPTIONS_BIT10
172 #define OPTIONS_BIT10 (0x1ul << 10)
173 #if OPTIONS_BIT10 > RGX_BUILD_OPTIONS_MASK_KM
174 #error "Bit exceeds reserved range"
177 #define OPTIONS_BIT10 0x0
178 #endif /* SUPPORT_ION */
180 #if defined(DEBUG) || defined (INTERNAL_TEST)
181 #define DEBUG_SET_OFFSET OPTIONS_BIT11
182 #define OPTIONS_BIT11 (0x1ul << 11)
183 #if OPTIONS_BIT11 > RGX_BUILD_OPTIONS_MASK_KM
184 #error "Bit exceeds reserved range"
187 #define OPTIONS_BIT11 0x0
191 #define RGX_BUILD_OPTIONS_KM \