1 /*************************************************************************/ /*!
3 @Title Common bridge header for rgxinit
4 @Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
5 @Description Declares common defines and structures used by both the client
6 and server side of the bridge for rgxinit
7 @License Dual MIT/GPLv2
9 The contents of this file are subject to the MIT license as set out below.
11 Permission is hereby granted, free of charge, to any person obtaining a copy
12 of this software and associated documentation files (the "Software"), to deal
13 in the Software without restriction, including without limitation the rights
14 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15 copies of the Software, and to permit persons to whom the Software is
16 furnished to do so, subject to the following conditions:
18 The above copyright notice and this permission notice shall be included in
19 all copies or substantial portions of the Software.
21 Alternatively, the contents of this file may be used under the terms of
22 the GNU General Public License Version 2 ("GPL") in which case the provisions
23 of GPL are applicable instead of those above.
25 If you wish to allow use of your version of this file only under the terms of
26 GPL, and not to allow others to use your version of this file under the terms
27 of the MIT license, indicate your decision by deleting the provisions above
28 and replace them with the notice and other provisions required by GPL as set
29 out in the file called "GPL-COPYING" included in this distribution. If you do
30 not delete the provisions above, a recipient may use your version of this file
31 under the terms of either the MIT license or GPL.
33 This License is also included in this distribution in the file called
36 EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
37 PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
38 BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
39 PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
40 COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
41 IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
42 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
43 */ /**************************************************************************/
45 #ifndef COMMON_RGXINIT_BRIDGE_H
46 #define COMMON_RGXINIT_BRIDGE_H
48 #include <powervr/mem_types.h>
50 #include "img_types.h"
51 #include "pvrsrv_error.h"
53 #include "rgx_bridge.h"
54 #include "rgxscript.h"
55 #include "devicemem_typedefs.h"
59 #define PVRSRV_BRIDGE_RGXINIT_CMD_FIRST 0
60 #define PVRSRV_BRIDGE_RGXINIT_RGXINITALLOCFWIMGMEM PVRSRV_BRIDGE_RGXINIT_CMD_FIRST+0
61 #define PVRSRV_BRIDGE_RGXINIT_RGXINITFIRMWARE PVRSRV_BRIDGE_RGXINIT_CMD_FIRST+1
62 #define PVRSRV_BRIDGE_RGXINIT_RGXINITFINALISEFWIMAGE PVRSRV_BRIDGE_RGXINIT_CMD_FIRST+2
63 #define PVRSRV_BRIDGE_RGXINIT_RGXINITDEVPART2 PVRSRV_BRIDGE_RGXINIT_CMD_FIRST+3
64 #define PVRSRV_BRIDGE_RGXINIT_GPUVIRTPOPULATELMASUBARENAS PVRSRV_BRIDGE_RGXINIT_CMD_FIRST+4
65 #define PVRSRV_BRIDGE_RGXINIT_RGXINITGUEST PVRSRV_BRIDGE_RGXINIT_CMD_FIRST+5
66 #define PVRSRV_BRIDGE_RGXINIT_RGXINITFIRMWAREEXTENDED PVRSRV_BRIDGE_RGXINIT_CMD_FIRST+6
67 #define PVRSRV_BRIDGE_RGXINIT_CMD_LAST (PVRSRV_BRIDGE_RGXINIT_CMD_FIRST+6)
70 /*******************************************
72 *******************************************/
74 /* Bridge in structure for RGXInitAllocFWImgMem */
75 typedef struct PVRSRV_BRIDGE_IN_RGXINITALLOCFWIMGMEM_TAG
77 IMG_DEVMEM_SIZE_T uiFWCodeLen;
78 IMG_DEVMEM_SIZE_T uiFWDataLen;
79 IMG_DEVMEM_SIZE_T uiFWCoremem;
80 } __attribute__((packed)) PVRSRV_BRIDGE_IN_RGXINITALLOCFWIMGMEM;
82 /* Bridge out structure for RGXInitAllocFWImgMem */
83 typedef struct PVRSRV_BRIDGE_OUT_RGXINITALLOCFWIMGMEM_TAG
85 IMG_HANDLE hFWCodePMR;
86 IMG_DEV_VIRTADDR sFWCodeDevVAddrBase;
87 IMG_HANDLE hFWDataPMR;
88 IMG_DEV_VIRTADDR sFWDataDevVAddrBase;
89 IMG_HANDLE hFWCorememPMR;
90 IMG_DEV_VIRTADDR sFWCorememDevVAddrBase;
91 RGXFWIF_DEV_VIRTADDR sFWCorememMetaVAddrBase;
93 } __attribute__((packed)) PVRSRV_BRIDGE_OUT_RGXINITALLOCFWIMGMEM;
96 /*******************************************
98 *******************************************/
100 /* Bridge in structure for RGXInitFirmware */
101 typedef struct PVRSRV_BRIDGE_IN_RGXINITFIRMWARE_TAG
103 IMG_BOOL bEnableSignatureChecks;
104 IMG_UINT32 ui32SignatureChecksBufSize;
105 IMG_UINT32 ui32HWPerfFWBufSizeKB;
106 IMG_UINT64 ui64HWPerfFilter;
107 IMG_UINT32 ui32RGXFWAlignChecksArrLength;
108 IMG_UINT32 * pui32RGXFWAlignChecks;
109 IMG_UINT32 ui32ConfigFlags;
110 IMG_UINT32 ui32LogType;
111 IMG_UINT32 ui32FilterFlags;
112 IMG_UINT32 ui32JonesDisableMask;
113 IMG_UINT32 ui32ui32HWRDebugDumpLimit;
114 RGXFWIF_COMPCHECKS_BVNC sClientBVNC;
115 IMG_UINT32 ui32HWPerfCountersDataSize;
116 RGX_RD_POWER_ISLAND_CONF eRGXRDPowerIslandConf;
117 FW_PERF_CONF eFirmwarePerf;
118 } __attribute__((packed)) PVRSRV_BRIDGE_IN_RGXINITFIRMWARE;
120 /* Bridge out structure for RGXInitFirmware */
121 typedef struct PVRSRV_BRIDGE_OUT_RGXINITFIRMWARE_TAG
123 RGXFWIF_DEV_VIRTADDR spsRGXFwInit;
124 IMG_HANDLE hHWPerfPMR;
126 } __attribute__((packed)) PVRSRV_BRIDGE_OUT_RGXINITFIRMWARE;
129 /*******************************************
130 RGXInitFinaliseFWImage
131 *******************************************/
133 /* Bridge in structure for RGXInitFinaliseFWImage */
134 typedef struct PVRSRV_BRIDGE_IN_RGXINITFINALISEFWIMAGE_TAG
136 IMG_UINT32 ui32EmptyStructPlaceholder;
137 } __attribute__((packed)) PVRSRV_BRIDGE_IN_RGXINITFINALISEFWIMAGE;
139 /* Bridge out structure for RGXInitFinaliseFWImage */
140 typedef struct PVRSRV_BRIDGE_OUT_RGXINITFINALISEFWIMAGE_TAG
143 } __attribute__((packed)) PVRSRV_BRIDGE_OUT_RGXINITFINALISEFWIMAGE;
146 /*******************************************
148 *******************************************/
150 /* Bridge in structure for RGXInitDevPart2 */
151 typedef struct PVRSRV_BRIDGE_IN_RGXINITDEVPART2_TAG
153 RGX_INIT_COMMAND * psDbgScript;
154 IMG_UINT32 ui32DeviceFlags;
155 IMG_UINT32 ui32HWPerfHostBufSize;
156 IMG_UINT32 ui32HWPerfHostFilter;
157 IMG_UINT32 ui32RGXActivePMConf;
158 IMG_HANDLE hFWCodePMR;
159 IMG_HANDLE hFWDataPMR;
160 IMG_HANDLE hFWCorememPMR;
161 IMG_HANDLE hHWPerfPMR;
162 } __attribute__((packed)) PVRSRV_BRIDGE_IN_RGXINITDEVPART2;
164 /* Bridge out structure for RGXInitDevPart2 */
165 typedef struct PVRSRV_BRIDGE_OUT_RGXINITDEVPART2_TAG
168 } __attribute__((packed)) PVRSRV_BRIDGE_OUT_RGXINITDEVPART2;
171 /*******************************************
172 GPUVIRTPopulateLMASubArenas
173 *******************************************/
175 /* Bridge in structure for GPUVIRTPopulateLMASubArenas */
176 typedef struct PVRSRV_BRIDGE_IN_GPUVIRTPOPULATELMASUBARENAS_TAG
178 IMG_UINT32 ui32NumElements;
179 IMG_UINT32 * pui32Elements;
180 IMG_BOOL bEnableTrustedDeviceAceConfig;
181 } __attribute__((packed)) PVRSRV_BRIDGE_IN_GPUVIRTPOPULATELMASUBARENAS;
183 /* Bridge out structure for GPUVIRTPopulateLMASubArenas */
184 typedef struct PVRSRV_BRIDGE_OUT_GPUVIRTPOPULATELMASUBARENAS_TAG
187 } __attribute__((packed)) PVRSRV_BRIDGE_OUT_GPUVIRTPOPULATELMASUBARENAS;
190 /*******************************************
192 *******************************************/
194 /* Bridge in structure for RGXInitGuest */
195 typedef struct PVRSRV_BRIDGE_IN_RGXINITGUEST_TAG
197 IMG_BOOL bEnableSignatureChecks;
198 IMG_UINT32 ui32SignatureChecksBufSize;
199 IMG_UINT32 ui32RGXFWAlignChecksArrLength;
200 IMG_UINT32 * pui32RGXFWAlignChecks;
201 IMG_UINT32 ui32DeviceFlags;
202 RGXFWIF_COMPCHECKS_BVNC sClientBVNC;
203 } __attribute__((packed)) PVRSRV_BRIDGE_IN_RGXINITGUEST;
205 /* Bridge out structure for RGXInitGuest */
206 typedef struct PVRSRV_BRIDGE_OUT_RGXINITGUEST_TAG
209 } __attribute__((packed)) PVRSRV_BRIDGE_OUT_RGXINITGUEST;
212 /*******************************************
213 RGXInitFirmwareExtended
214 *******************************************/
216 /* Bridge in structure for RGXInitFirmwareExtended */
217 typedef struct PVRSRV_BRIDGE_IN_RGXINITFIRMWAREEXTENDED_TAG
219 IMG_UINT32 ui32RGXFWAlignChecksArrLength;
220 IMG_UINT32 * pui32RGXFWAlignChecks;
221 RGX_FW_INIT_IN_PARAMS spsInParams;
222 } __attribute__((packed)) PVRSRV_BRIDGE_IN_RGXINITFIRMWAREEXTENDED;
224 /* Bridge out structure for RGXInitFirmwareExtended */
225 typedef struct PVRSRV_BRIDGE_OUT_RGXINITFIRMWAREEXTENDED_TAG
227 RGXFWIF_DEV_VIRTADDR spsRGXFwInit;
228 IMG_HANDLE hHWPerfPMR2;
230 } __attribute__((packed)) PVRSRV_BRIDGE_OUT_RGXINITFIRMWAREEXTENDED;
233 #endif /* COMMON_RGXINIT_BRIDGE_H */