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 that are used by both
6 the client and sever 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 "img_types.h"
49 #include "pvrsrv_error.h"
51 #include "rgx_bridge.h"
52 #include "rgxscript.h"
53 #include "devicemem_typedefs.h"
54 #include "rgx_fwif_shared.h"
58 #define PVRSRV_BRIDGE_RGXINIT_CMD_FIRST 0
59 #define PVRSRV_BRIDGE_RGXINIT_RGXINITALLOCFWIMGMEM PVRSRV_BRIDGE_RGXINIT_CMD_FIRST+0
60 #define PVRSRV_BRIDGE_RGXINIT_RGXINITFIRMWARE PVRSRV_BRIDGE_RGXINIT_CMD_FIRST+1
61 #define PVRSRV_BRIDGE_RGXINIT_RGXINITLOADFWIMAGE PVRSRV_BRIDGE_RGXINIT_CMD_FIRST+2
62 #define PVRSRV_BRIDGE_RGXINIT_RGXINITDEVPART2 PVRSRV_BRIDGE_RGXINIT_CMD_FIRST+3
63 #define PVRSRV_BRIDGE_RGXINIT_GPUVIRTPOPULATELMASUBARENAS PVRSRV_BRIDGE_RGXINIT_CMD_FIRST+4
64 #define PVRSRV_BRIDGE_RGXINIT_CMD_LAST (PVRSRV_BRIDGE_RGXINIT_CMD_FIRST+4)
67 /*******************************************
69 *******************************************/
71 /* Bridge in structure for RGXInitAllocFWImgMem */
72 typedef struct PVRSRV_BRIDGE_IN_RGXINITALLOCFWIMGMEM_TAG
75 IMG_DEVMEM_SIZE_T uiFWCodeLen;
76 IMG_DEVMEM_SIZE_T uiFWDataLen;
77 IMG_DEVMEM_SIZE_T uiFWCoremem;
78 } __attribute__((packed)) PVRSRV_BRIDGE_IN_RGXINITALLOCFWIMGMEM;
81 /* Bridge out structure for RGXInitAllocFWImgMem */
82 typedef struct PVRSRV_BRIDGE_OUT_RGXINITALLOCFWIMGMEM_TAG
84 DEVMEM_SERVER_EXPORTCOOKIE hFWCodeAllocServerExportCookie;
85 IMG_DEV_VIRTADDR sFWCodeDevVAddrBase;
86 DEVMEM_SERVER_EXPORTCOOKIE hFWDataAllocServerExportCookie;
87 IMG_DEV_VIRTADDR sFWDataDevVAddrBase;
88 DEVMEM_SERVER_EXPORTCOOKIE hFWCorememAllocServerExportCookie;
89 IMG_DEV_VIRTADDR sFWCorememDevVAddrBase;
90 RGXFWIF_DEV_VIRTADDR sFWCorememMetaVAddrBase;
92 } __attribute__((packed)) PVRSRV_BRIDGE_OUT_RGXINITALLOCFWIMGMEM;
94 /*******************************************
96 *******************************************/
98 /* Bridge in structure for RGXInitFirmware */
99 typedef struct PVRSRV_BRIDGE_IN_RGXINITFIRMWARE_TAG
102 IMG_BOOL bEnableSignatureChecks;
103 IMG_UINT32 ui32SignatureChecksBufSize;
104 IMG_UINT32 ui32HWPerfFWBufSizeKB;
105 IMG_UINT64 ui64HWPerfFilter;
106 IMG_UINT32 ui32RGXFWAlignChecksSize;
107 IMG_UINT32 * pui32RGXFWAlignChecks;
108 IMG_UINT32 ui32ConfigFlags;
109 IMG_UINT32 ui32LogType;
110 IMG_UINT32 ui32FilterFlags;
111 IMG_UINT32 ui32JonesDisableMask;
112 IMG_UINT32 ui32ui32HWRDebugDumpLimit;
113 RGXFWIF_COMPCHECKS_BVNC sClientBVNC;
114 IMG_UINT32 ui32HWPerfCountersDataSize;
115 RGX_RD_POWER_ISLAND_CONF eRGXRDPowerIslandConf;
116 } __attribute__((packed)) PVRSRV_BRIDGE_IN_RGXINITFIRMWARE;
119 /* Bridge out structure for RGXInitFirmware */
120 typedef struct PVRSRV_BRIDGE_OUT_RGXINITFIRMWARE_TAG
122 RGXFWIF_DEV_VIRTADDR spsRGXFwInit;
123 DEVMEM_SERVER_EXPORTCOOKIE hHWPerfDataAllocServerExportCookie;
125 } __attribute__((packed)) PVRSRV_BRIDGE_OUT_RGXINITFIRMWARE;
127 /*******************************************
129 *******************************************/
131 /* Bridge in structure for RGXInitLoadFWImage */
132 typedef struct PVRSRV_BRIDGE_IN_RGXINITLOADFWIMAGE_TAG
134 IMG_HANDLE hImgDestImport;
135 IMG_HANDLE hImgSrcImport;
136 IMG_UINT64 ui64ImgLen;
137 IMG_HANDLE hSigImport;
138 IMG_UINT64 ui64SigLen;
139 } __attribute__((packed)) PVRSRV_BRIDGE_IN_RGXINITLOADFWIMAGE;
142 /* Bridge out structure for RGXInitLoadFWImage */
143 typedef struct PVRSRV_BRIDGE_OUT_RGXINITLOADFWIMAGE_TAG
146 } __attribute__((packed)) PVRSRV_BRIDGE_OUT_RGXINITLOADFWIMAGE;
148 /*******************************************
150 *******************************************/
152 /* Bridge in structure for RGXInitDevPart2 */
153 typedef struct PVRSRV_BRIDGE_IN_RGXINITDEVPART2_TAG
156 RGX_INIT_COMMAND * psInitScript;
157 RGX_INIT_COMMAND * psDbgScript;
158 RGX_INIT_COMMAND * psDbgBusScript;
159 RGX_INIT_COMMAND * psDeinitScript;
160 IMG_UINT32 ui32ui32KernelCatBaseIdReg;
161 IMG_UINT32 ui32KernelCatBaseId;
162 IMG_UINT32 ui32KernelCatBaseReg;
163 IMG_UINT32 ui32KernelCatBaseWordSize;
164 IMG_UINT32 ui32KernelCatBaseAlignShift;
165 IMG_UINT32 ui32KernelCatBaseShift;
166 IMG_UINT64 ui64KernelCatBaseMask;
167 IMG_UINT32 ui32DeviceFlags;
168 IMG_UINT32 ui32RGXActivePMConf;
169 DEVMEM_SERVER_EXPORTCOOKIE hFWCodeAllocServerExportCookie;
170 DEVMEM_SERVER_EXPORTCOOKIE hFWDataAllocServerExportCookie;
171 DEVMEM_SERVER_EXPORTCOOKIE hFWCorememAllocServerExportCookie;
172 DEVMEM_SERVER_EXPORTCOOKIE hHWPerfDataAllocServerExportCookie;
173 } __attribute__((packed)) PVRSRV_BRIDGE_IN_RGXINITDEVPART2;
176 /* Bridge out structure for RGXInitDevPart2 */
177 typedef struct PVRSRV_BRIDGE_OUT_RGXINITDEVPART2_TAG
180 } __attribute__((packed)) PVRSRV_BRIDGE_OUT_RGXINITDEVPART2;
182 /*******************************************
183 GPUVIRTPopulateLMASubArenas
184 *******************************************/
186 /* Bridge in structure for GPUVIRTPopulateLMASubArenas */
187 typedef struct PVRSRV_BRIDGE_IN_GPUVIRTPOPULATELMASUBARENAS_TAG
190 IMG_UINT32 ui32NumElements;
191 IMG_UINT32 * pui32Elements;
192 } __attribute__((packed)) PVRSRV_BRIDGE_IN_GPUVIRTPOPULATELMASUBARENAS;
195 /* Bridge out structure for GPUVIRTPopulateLMASubArenas */
196 typedef struct PVRSRV_BRIDGE_OUT_GPUVIRTPOPULATELMASUBARENAS_TAG
199 } __attribute__((packed)) PVRSRV_BRIDGE_OUT_GPUVIRTPOPULATELMASUBARENAS;
201 #endif /* COMMON_RGXINIT_BRIDGE_H */