1 /*************************************************************************/ /*!
3 @Title Common bridge header for pdumpmm
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 pdumpmm
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_PDUMPMM_BRIDGE_H
46 #define COMMON_PDUMPMM_BRIDGE_H
48 #include <powervr/mem_types.h>
50 #include "img_types.h"
51 #include "pvrsrv_error.h"
54 #include "pdumpdefs.h"
55 #include "pvrsrv_memallocflags.h"
56 #include "devicemem_typedefs.h"
59 #define PVRSRV_BRIDGE_PDUMPMM_CMD_FIRST 0
60 #define PVRSRV_BRIDGE_PDUMPMM_PMRPDUMPLOADMEM PVRSRV_BRIDGE_PDUMPMM_CMD_FIRST+0
61 #define PVRSRV_BRIDGE_PDUMPMM_PMRPDUMPLOADMEMVALUE32 PVRSRV_BRIDGE_PDUMPMM_CMD_FIRST+1
62 #define PVRSRV_BRIDGE_PDUMPMM_PMRPDUMPLOADMEMVALUE64 PVRSRV_BRIDGE_PDUMPMM_CMD_FIRST+2
63 #define PVRSRV_BRIDGE_PDUMPMM_PMRPDUMPSAVETOFILE PVRSRV_BRIDGE_PDUMPMM_CMD_FIRST+3
64 #define PVRSRV_BRIDGE_PDUMPMM_PMRPDUMPSYMBOLICADDR PVRSRV_BRIDGE_PDUMPMM_CMD_FIRST+4
65 #define PVRSRV_BRIDGE_PDUMPMM_PMRPDUMPPOL32 PVRSRV_BRIDGE_PDUMPMM_CMD_FIRST+5
66 #define PVRSRV_BRIDGE_PDUMPMM_PMRPDUMPCBP PVRSRV_BRIDGE_PDUMPMM_CMD_FIRST+6
67 #define PVRSRV_BRIDGE_PDUMPMM_DEVMEMINTPDUMPSAVETOFILEVIRTUAL PVRSRV_BRIDGE_PDUMPMM_CMD_FIRST+7
68 #define PVRSRV_BRIDGE_PDUMPMM_CMD_LAST (PVRSRV_BRIDGE_PDUMPMM_CMD_FIRST+7)
71 /*******************************************
73 *******************************************/
75 /* Bridge in structure for PMRPDumpLoadMem */
76 typedef struct PVRSRV_BRIDGE_IN_PMRPDUMPLOADMEM_TAG
79 IMG_DEVMEM_OFFSET_T uiOffset;
80 IMG_DEVMEM_SIZE_T uiSize;
81 IMG_UINT32 ui32PDumpFlags;
83 } __attribute__((packed)) PVRSRV_BRIDGE_IN_PMRPDUMPLOADMEM;
85 /* Bridge out structure for PMRPDumpLoadMem */
86 typedef struct PVRSRV_BRIDGE_OUT_PMRPDUMPLOADMEM_TAG
89 } __attribute__((packed)) PVRSRV_BRIDGE_OUT_PMRPDUMPLOADMEM;
92 /*******************************************
93 PMRPDumpLoadMemValue32
94 *******************************************/
96 /* Bridge in structure for PMRPDumpLoadMemValue32 */
97 typedef struct PVRSRV_BRIDGE_IN_PMRPDUMPLOADMEMVALUE32_TAG
100 IMG_DEVMEM_OFFSET_T uiOffset;
101 IMG_UINT32 ui32Value;
102 IMG_UINT32 ui32PDumpFlags;
103 } __attribute__((packed)) PVRSRV_BRIDGE_IN_PMRPDUMPLOADMEMVALUE32;
105 /* Bridge out structure for PMRPDumpLoadMemValue32 */
106 typedef struct PVRSRV_BRIDGE_OUT_PMRPDUMPLOADMEMVALUE32_TAG
109 } __attribute__((packed)) PVRSRV_BRIDGE_OUT_PMRPDUMPLOADMEMVALUE32;
112 /*******************************************
113 PMRPDumpLoadMemValue64
114 *******************************************/
116 /* Bridge in structure for PMRPDumpLoadMemValue64 */
117 typedef struct PVRSRV_BRIDGE_IN_PMRPDUMPLOADMEMVALUE64_TAG
120 IMG_DEVMEM_OFFSET_T uiOffset;
121 IMG_UINT64 ui64Value;
122 IMG_UINT32 ui32PDumpFlags;
123 } __attribute__((packed)) PVRSRV_BRIDGE_IN_PMRPDUMPLOADMEMVALUE64;
125 /* Bridge out structure for PMRPDumpLoadMemValue64 */
126 typedef struct PVRSRV_BRIDGE_OUT_PMRPDUMPLOADMEMVALUE64_TAG
129 } __attribute__((packed)) PVRSRV_BRIDGE_OUT_PMRPDUMPLOADMEMVALUE64;
132 /*******************************************
134 *******************************************/
136 /* Bridge in structure for PMRPDumpSaveToFile */
137 typedef struct PVRSRV_BRIDGE_IN_PMRPDUMPSAVETOFILE_TAG
140 IMG_DEVMEM_OFFSET_T uiOffset;
141 IMG_DEVMEM_SIZE_T uiSize;
142 IMG_UINT32 ui32ArraySize;
143 const IMG_CHAR * puiFileName;
144 IMG_UINT32 ui32uiFileOffset;
145 } __attribute__((packed)) PVRSRV_BRIDGE_IN_PMRPDUMPSAVETOFILE;
147 /* Bridge out structure for PMRPDumpSaveToFile */
148 typedef struct PVRSRV_BRIDGE_OUT_PMRPDUMPSAVETOFILE_TAG
151 } __attribute__((packed)) PVRSRV_BRIDGE_OUT_PMRPDUMPSAVETOFILE;
154 /*******************************************
156 *******************************************/
158 /* Bridge in structure for PMRPDumpSymbolicAddr */
159 typedef struct PVRSRV_BRIDGE_IN_PMRPDUMPSYMBOLICADDR_TAG
162 IMG_DEVMEM_OFFSET_T uiOffset;
163 IMG_UINT32 ui32MemspaceNameLen;
164 IMG_UINT32 ui32SymbolicAddrLen;
165 /* Output pointer puiMemspaceName is also an implied input */
166 IMG_CHAR * puiMemspaceName;
167 /* Output pointer puiSymbolicAddr is also an implied input */
168 IMG_CHAR * puiSymbolicAddr;
169 } __attribute__((packed)) PVRSRV_BRIDGE_IN_PMRPDUMPSYMBOLICADDR;
171 /* Bridge out structure for PMRPDumpSymbolicAddr */
172 typedef struct PVRSRV_BRIDGE_OUT_PMRPDUMPSYMBOLICADDR_TAG
174 IMG_CHAR * puiMemspaceName;
175 IMG_CHAR * puiSymbolicAddr;
176 IMG_DEVMEM_OFFSET_T uiNewOffset;
177 IMG_DEVMEM_OFFSET_T uiNextSymName;
179 } __attribute__((packed)) PVRSRV_BRIDGE_OUT_PMRPDUMPSYMBOLICADDR;
182 /*******************************************
184 *******************************************/
186 /* Bridge in structure for PMRPDumpPol32 */
187 typedef struct PVRSRV_BRIDGE_IN_PMRPDUMPPOL32_TAG
190 IMG_DEVMEM_OFFSET_T uiOffset;
191 IMG_UINT32 ui32Value;
193 PDUMP_POLL_OPERATOR eOperator;
194 IMG_UINT32 ui32PDumpFlags;
195 } __attribute__((packed)) PVRSRV_BRIDGE_IN_PMRPDUMPPOL32;
197 /* Bridge out structure for PMRPDumpPol32 */
198 typedef struct PVRSRV_BRIDGE_OUT_PMRPDUMPPOL32_TAG
201 } __attribute__((packed)) PVRSRV_BRIDGE_OUT_PMRPDUMPPOL32;
204 /*******************************************
206 *******************************************/
208 /* Bridge in structure for PMRPDumpCBP */
209 typedef struct PVRSRV_BRIDGE_IN_PMRPDUMPCBP_TAG
212 IMG_DEVMEM_OFFSET_T uiReadOffset;
213 IMG_DEVMEM_OFFSET_T uiWriteOffset;
214 IMG_DEVMEM_SIZE_T uiPacketSize;
215 IMG_DEVMEM_SIZE_T uiBufferSize;
216 } __attribute__((packed)) PVRSRV_BRIDGE_IN_PMRPDUMPCBP;
218 /* Bridge out structure for PMRPDumpCBP */
219 typedef struct PVRSRV_BRIDGE_OUT_PMRPDUMPCBP_TAG
222 } __attribute__((packed)) PVRSRV_BRIDGE_OUT_PMRPDUMPCBP;
225 /*******************************************
226 DevmemIntPDumpSaveToFileVirtual
227 *******************************************/
229 /* Bridge in structure for DevmemIntPDumpSaveToFileVirtual */
230 typedef struct PVRSRV_BRIDGE_IN_DEVMEMINTPDUMPSAVETOFILEVIRTUAL_TAG
232 IMG_HANDLE hDevmemServerContext;
233 IMG_DEV_VIRTADDR sAddress;
234 IMG_DEVMEM_SIZE_T uiSize;
235 IMG_UINT32 ui32ArraySize;
236 const IMG_CHAR * puiFileName;
237 IMG_UINT32 ui32FileOffset;
238 IMG_UINT32 ui32PDumpFlags;
239 } __attribute__((packed)) PVRSRV_BRIDGE_IN_DEVMEMINTPDUMPSAVETOFILEVIRTUAL;
241 /* Bridge out structure for DevmemIntPDumpSaveToFileVirtual */
242 typedef struct PVRSRV_BRIDGE_OUT_DEVMEMINTPDUMPSAVETOFILEVIRTUAL_TAG
245 } __attribute__((packed)) PVRSRV_BRIDGE_OUT_DEVMEMINTPDUMPSAVETOFILEVIRTUAL;
248 #endif /* COMMON_PDUMPMM_BRIDGE_H */