diff options
Diffstat (limited to 'drivers/gpu/pvr/pdump_osfunc.h')
-rw-r--r-- | drivers/gpu/pvr/pdump_osfunc.h | 135 |
1 files changed, 135 insertions, 0 deletions
diff --git a/drivers/gpu/pvr/pdump_osfunc.h b/drivers/gpu/pvr/pdump_osfunc.h new file mode 100644 index 00000000000..334c98da3ad --- /dev/null +++ b/drivers/gpu/pvr/pdump_osfunc.h | |||
@@ -0,0 +1,135 @@ | |||
1 | /********************************************************************** | ||
2 | * | ||
3 | * Copyright(c) 2008 Imagination Technologies Ltd. All rights reserved. | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it | ||
6 | * under the terms and conditions of the GNU General Public License, | ||
7 | * version 2, as published by the Free Software Foundation. | ||
8 | * | ||
9 | * This program is distributed in the hope it will be useful but, except | ||
10 | * as otherwise stated in writing, without any warranty; without even the | ||
11 | * implied warranty of merchantability or fitness for a particular purpose. | ||
12 | * See the GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License along with | ||
15 | * this program; if not, write to the Free Software Foundation, Inc., | ||
16 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
17 | * | ||
18 | * The full GNU General Public License is included in this distribution in | ||
19 | * the file called "COPYING". | ||
20 | * | ||
21 | * Contact Information: | ||
22 | * Imagination Technologies Ltd. <gpl-support@imgtec.com> | ||
23 | * Home Park Estate, Kings Langley, Herts, WD4 8LZ, UK | ||
24 | * | ||
25 | ******************************************************************************/ | ||
26 | |||
27 | #include <stdarg.h> | ||
28 | |||
29 | #if defined(__cplusplus) | ||
30 | extern "C" { | ||
31 | #endif | ||
32 | |||
33 | |||
34 | #define MAX_PDUMP_STRING_LENGTH (256) | ||
35 | |||
36 | |||
37 | #define PDUMP_GET_SCRIPT_STRING() \ | ||
38 | IMG_HANDLE hScript; \ | ||
39 | IMG_UINT32 ui32MaxLen; \ | ||
40 | PVRSRV_ERROR eError; \ | ||
41 | eError = PDumpOSGetScriptString(&hScript, &ui32MaxLen);\ | ||
42 | if(eError != PVRSRV_OK) return eError; | ||
43 | |||
44 | #define PDUMP_GET_MSG_STRING() \ | ||
45 | IMG_CHAR *pszMsg; \ | ||
46 | IMG_UINT32 ui32MaxLen; \ | ||
47 | PVRSRV_ERROR eError; \ | ||
48 | eError = PDumpOSGetMessageString(&pszMsg, &ui32MaxLen);\ | ||
49 | if(eError != PVRSRV_OK) return eError; | ||
50 | |||
51 | #define PDUMP_GET_FILE_STRING() \ | ||
52 | IMG_CHAR *pszFileName; \ | ||
53 | IMG_UINT32 ui32MaxLen; \ | ||
54 | PVRSRV_ERROR eError; \ | ||
55 | eError = PDumpOSGetFilenameString(&pszFileName, &ui32MaxLen);\ | ||
56 | if(eError != PVRSRV_OK) return eError; | ||
57 | |||
58 | #define PDUMP_GET_SCRIPT_AND_FILE_STRING() \ | ||
59 | IMG_HANDLE hScript; \ | ||
60 | IMG_CHAR *pszFileName; \ | ||
61 | IMG_UINT32 ui32MaxLenScript; \ | ||
62 | IMG_UINT32 ui32MaxLenFileName; \ | ||
63 | PVRSRV_ERROR eError; \ | ||
64 | eError = PDumpOSGetScriptString(&hScript, &ui32MaxLenScript);\ | ||
65 | if(eError != PVRSRV_OK) return eError; \ | ||
66 | eError = PDumpOSGetFilenameString(&pszFileName, &ui32MaxLenFileName);\ | ||
67 | if(eError != PVRSRV_OK) return eError; | ||
68 | |||
69 | |||
70 | PVRSRV_ERROR PDumpOSGetScriptString(IMG_HANDLE *phScript, IMG_UINT32 *pui32MaxLen); | ||
71 | |||
72 | |||
73 | PVRSRV_ERROR PDumpOSGetMessageString(IMG_CHAR **ppszMsg, IMG_UINT32 *pui32MaxLen); | ||
74 | |||
75 | |||
76 | PVRSRV_ERROR PDumpOSGetFilenameString(IMG_CHAR **ppszFile, IMG_UINT32 *pui32MaxLen); | ||
77 | |||
78 | |||
79 | |||
80 | |||
81 | #define PDUMP_va_list va_list | ||
82 | #define PDUMP_va_start va_start | ||
83 | #define PDUMP_va_end va_end | ||
84 | |||
85 | |||
86 | |||
87 | IMG_HANDLE PDumpOSGetStream(IMG_UINT32 ePDumpStream); | ||
88 | |||
89 | IMG_UINT32 PDumpOSGetStreamOffset(IMG_UINT32 ePDumpStream); | ||
90 | |||
91 | IMG_UINT32 PDumpOSGetParamFileNum(IMG_VOID); | ||
92 | |||
93 | IMG_VOID PDumpOSCheckForSplitting(IMG_HANDLE hStream, IMG_UINT32 ui32Size, IMG_UINT32 ui32Flags); | ||
94 | |||
95 | IMG_BOOL PDumpOSIsSuspended(IMG_VOID); | ||
96 | |||
97 | IMG_BOOL PDumpOSJTInitialised(IMG_VOID); | ||
98 | |||
99 | IMG_BOOL PDumpOSWriteString(IMG_HANDLE hDbgStream, | ||
100 | IMG_UINT8 *psui8Data, | ||
101 | IMG_UINT32 ui32Size, | ||
102 | IMG_UINT32 ui32Flags); | ||
103 | |||
104 | IMG_BOOL PDumpOSWriteString2(IMG_HANDLE hScript, IMG_UINT32 ui32Flags); | ||
105 | |||
106 | PVRSRV_ERROR PDumpOSBufprintf(IMG_HANDLE hBuf, IMG_UINT32 ui32ScriptSizeMax, IMG_CHAR* pszFormat, ...) IMG_FORMAT_PRINTF(3, 4); | ||
107 | |||
108 | IMG_VOID PDumpOSDebugPrintf(IMG_CHAR* pszFormat, ...) IMG_FORMAT_PRINTF(1, 2); | ||
109 | |||
110 | PVRSRV_ERROR PDumpOSSprintf(IMG_CHAR *pszComment, IMG_UINT32 ui32ScriptSizeMax, IMG_CHAR *pszFormat, ...) IMG_FORMAT_PRINTF(3, 4); | ||
111 | |||
112 | PVRSRV_ERROR PDumpOSVSprintf(IMG_CHAR *pszMsg, IMG_UINT32 ui32ScriptSizeMax, IMG_CHAR* pszFormat, PDUMP_va_list vaArgs) IMG_FORMAT_PRINTF(3, 0); | ||
113 | |||
114 | IMG_UINT32 PDumpOSBuflen(IMG_HANDLE hBuffer, IMG_UINT32 ui32BufferSizeMax); | ||
115 | |||
116 | IMG_VOID PDumpOSVerifyLineEnding(IMG_HANDLE hBuffer, IMG_UINT32 ui32BufferSizeMax); | ||
117 | |||
118 | IMG_VOID PDumpOSCPUVAddrToDevPAddr(PVRSRV_DEVICE_TYPE eDeviceType, | ||
119 | IMG_HANDLE hOSMemHandle, | ||
120 | IMG_UINT32 ui32Offset, | ||
121 | IMG_UINT8 *pui8LinAddr, | ||
122 | IMG_UINT32 ui32PageSize, | ||
123 | IMG_DEV_PHYADDR *psDevPAddr); | ||
124 | |||
125 | IMG_VOID PDumpOSCPUVAddrToPhysPages(IMG_HANDLE hOSMemHandle, | ||
126 | IMG_UINT32 ui32Offset, | ||
127 | IMG_PUINT8 pui8LinAddr, | ||
128 | IMG_UINT32 ui32DataPageMask, | ||
129 | IMG_UINT32 *pui32PageOffset); | ||
130 | |||
131 | IMG_VOID PDumpOSReleaseExecution(IMG_VOID); | ||
132 | |||
133 | #if defined (__cplusplus) | ||
134 | } | ||
135 | #endif | ||