1 /*************************************************************************/ /*!
2 @Title Direct client bridge for pdumpmm
3 @Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
4 @License Dual MIT/GPLv2
6 The contents of this file are subject to the MIT license as set out below.
8 Permission is hereby granted, free of charge, to any person obtaining a copy
9 of this software and associated documentation files (the "Software"), to deal
10 in the Software without restriction, including without limitation the rights
11 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 copies of the Software, and to permit persons to whom the Software is
13 furnished to do so, subject to the following conditions:
15 The above copyright notice and this permission notice shall be included in
16 all copies or substantial portions of the Software.
18 Alternatively, the contents of this file may be used under the terms of
19 the GNU General Public License Version 2 ("GPL") in which case the provisions
20 of GPL are applicable instead of those above.
22 If you wish to allow use of your version of this file only under the terms of
23 GPL, and not to allow others to use your version of this file under the terms
24 of the MIT license, indicate your decision by deleting the provisions above
25 and replace them with the notice and other provisions required by GPL as set
26 out in the file called "GPL-COPYING" included in this distribution. If you do
27 not delete the provisions above, a recipient may use your version of this file
28 under the terms of either the MIT license or GPL.
30 This License is also included in this distribution in the file called
33 EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
34 PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
35 BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
36 PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
37 COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
38 IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
39 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
40 */ /**************************************************************************/
42 #include "client_pdumpmm_bridge.h"
44 #include "pvr_debug.h"
46 /* Module specific includes */
48 #include "pdumpdefs.h"
49 #include "pvrsrv_memallocflags.h"
50 #include "devicemem_typedefs.h"
52 #include "devicemem_server.h"
57 IMG_INTERNAL PVRSRV_ERROR IMG_CALLCONV BridgePMRPDumpLoadMem(IMG_HANDLE hBridge,
59 IMG_DEVMEM_OFFSET_T uiOffset,
60 IMG_DEVMEM_SIZE_T uiSize,
61 IMG_UINT32 ui32PDumpFlags,
66 PVR_UNREFERENCED_PARAMETER(hBridge);
68 psPMRInt = (PMR *) hPMR;
81 IMG_INTERNAL PVRSRV_ERROR IMG_CALLCONV BridgePMRPDumpLoadMemValue32(IMG_HANDLE hBridge,
83 IMG_DEVMEM_OFFSET_T uiOffset,
85 IMG_UINT32 ui32PDumpFlags)
89 PVR_UNREFERENCED_PARAMETER(hBridge);
91 psPMRInt = (PMR *) hPMR;
94 PMRPDumpLoadMemValue32(
103 IMG_INTERNAL PVRSRV_ERROR IMG_CALLCONV BridgePMRPDumpLoadMemValue64(IMG_HANDLE hBridge,
105 IMG_DEVMEM_OFFSET_T uiOffset,
106 IMG_UINT64 ui64Value,
107 IMG_UINT32 ui32PDumpFlags)
111 PVR_UNREFERENCED_PARAMETER(hBridge);
113 psPMRInt = (PMR *) hPMR;
116 PMRPDumpLoadMemValue64(
125 IMG_INTERNAL PVRSRV_ERROR IMG_CALLCONV BridgePMRPDumpSaveToFile(IMG_HANDLE hBridge,
127 IMG_DEVMEM_OFFSET_T uiOffset,
128 IMG_DEVMEM_SIZE_T uiSize,
129 IMG_UINT32 ui32ArraySize,
130 const IMG_CHAR *puiFileName,
131 IMG_UINT32 ui32uiFileOffset)
135 PVR_UNREFERENCED_PARAMETER(hBridge);
137 psPMRInt = (PMR *) hPMR;
151 IMG_INTERNAL PVRSRV_ERROR IMG_CALLCONV BridgePMRPDumpSymbolicAddr(IMG_HANDLE hBridge,
153 IMG_DEVMEM_OFFSET_T uiOffset,
154 IMG_UINT32 ui32MemspaceNameLen,
155 IMG_CHAR *puiMemspaceName,
156 IMG_UINT32 ui32SymbolicAddrLen,
157 IMG_CHAR *puiSymbolicAddr,
158 IMG_DEVMEM_OFFSET_T *puiNewOffset,
159 IMG_DEVMEM_OFFSET_T *puiNextSymName)
163 PVR_UNREFERENCED_PARAMETER(hBridge);
165 psPMRInt = (PMR *) hPMR;
168 PMR_PDumpSymbolicAddr(
181 IMG_INTERNAL PVRSRV_ERROR IMG_CALLCONV BridgePMRPDumpPol32(IMG_HANDLE hBridge,
183 IMG_DEVMEM_OFFSET_T uiOffset,
184 IMG_UINT32 ui32Value,
186 PDUMP_POLL_OPERATOR eOperator,
187 IMG_UINT32 ui32PDumpFlags)
191 PVR_UNREFERENCED_PARAMETER(hBridge);
193 psPMRInt = (PMR *) hPMR;
207 IMG_INTERNAL PVRSRV_ERROR IMG_CALLCONV BridgePMRPDumpCBP(IMG_HANDLE hBridge,
209 IMG_DEVMEM_OFFSET_T uiReadOffset,
210 IMG_DEVMEM_OFFSET_T uiWriteOffset,
211 IMG_DEVMEM_SIZE_T uiPacketSize,
212 IMG_DEVMEM_SIZE_T uiBufferSize)
216 PVR_UNREFERENCED_PARAMETER(hBridge);
218 psPMRInt = (PMR *) hPMR;
231 IMG_INTERNAL PVRSRV_ERROR IMG_CALLCONV BridgeDevmemIntPDumpSaveToFileVirtual(IMG_HANDLE hBridge,
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)
241 DEVMEMINT_CTX * psDevmemServerContextInt;
242 PVR_UNREFERENCED_PARAMETER(hBridge);
244 psDevmemServerContextInt = (DEVMEMINT_CTX *) hDevmemServerContext;
247 DevmemIntPDumpSaveToFileVirtual(
248 psDevmemServerContextInt,